我构建了一个简单的项目,其中只有一篇文章,标题是yahoo股票历史数据下载,文件yahoo股票历史数据下载.rst,只有一个句子问题:为何可以通过浏览器下载yahoo股票历史数据,无法使用wget curl下载?字符串的英文可以搜索。

使用grep命令搜索cjk(中文)单词"股票“。
grep -n -r "股票" myproject
/source/research/yahoo股票历史数据下载.rst:yahoo股票历史数据下载
/source/research/yahoo股票历史数据下载.rst:问题:为何可以通过浏览器下载yahoo股票历史数据,无法使用wget curl下载?
/build/html/research/yahoo股票历史数据下载.html: <title>1. yahoo股票历史数据下载 — documents 1 documentation</title>
/build/html/research/yahoo股票历史数据下载.html:<h1>1. yahoo股票历史数据下载<a class="headerlink" href="#yahoo" title="Permalink to this headline">¶</a></h1>
/build/html/research/yahoo股票历史数据下载.html:<p>问题:为何可以通过浏览器下载yahoo股票历史数据,无法使用wget curl下载?</p>
/build/html/research/yahoo股票历史数据下载.html:<li class="toctree-l1 current"><a class="current reference internal" href="#">1. yahoo股票历史数据下载</a></li>
/build/html/research/yahoo股票历史数据下载.html: <a href="../_sources/research/yahoo股票历史数据下载.rst.txt"在python的文档生成器中搜索cjk(中文)单词"股票“--斯芬克斯搜索栏。

您可以看到,yahoo是标题和内容中的第一个单词,标题和内容中的第二个单词都是要搜索的目标股票。
为什么你的搜索不匹配任何文件?
发布于 2019-07-27 02:45:06
来安装jieba。
sudo pip install jieba来定位jieba字典文件。
sudo find /usr -name "jieba"
/usr/local/lib/python3.5/dist-packages/jieba
ls /usr/local/lib/python3.5/dist-packages/jieba
analyse dict.txt __init__.py posseg
_compat.py finalseg __main__.py __pycache__位于/usr/local/lib/python3.5/dist-packages/jieba/dict.txt中的jieba字典文件。
编辑狮身人面像的conf.py。
vim source/conf.py
html_search_language = 'zh'
html_search_options = {'dict': '/usr/local/lib/python3.5/dist-packages/jieba/dict.txt'} 若要重新编译项目目录中的所有文件,请执行以下操作。
cd yourproject
make html重新启动apache2。
sudo systemctl restart apache2 #maybe it is not neccessary.现在可以搜索汉字了。
https://stackoverflow.com/questions/57221406
复制相似问题