DemonDamon / FinnewsHunter

从新浪财经、每经网、金融界、中国证券网、证券时报网上,爬取上市公司(个股)的历史新闻文本数据进行文本分析、提取特征集,然后利用SVM、随机森林等分类器进行训练,最后对实施抓取的新闻数据进行分类预测
MIT License
994 stars 267 forks source link

请问运行history_starter_stock_price.py,字符处理报错。。。 #7

Open Antoniowu opened 1 year ago

Antoniowu commented 1 year ago

(base) C:\stock\Listed-company-news-crawl-and-text-analysis-master\src\Gon>python ./history_starter_stock_price.py Traceback (most recent call last): File "C:\stock\Listed-company-news-crawl-and-text-analysis-master\src\Gon\history_starter_stock_price.py", line 13, in stock_info_spyder.get_historical_news() File "C:\stock\Listed-company-news-crawl-and-text-analysis-master\src\Gon\stockinfospyder.py", line 59, in get_historical_news self.get_stock_code_info() File "C:\stock\Listed-company-news-crawl-and-text-analysis-master\src\Gon\stockinfospyder.py", line 46, in get_stock_code_info stock_symbol_code = ak.stock_zh_a_spot().get(["symbol", "code"]) # 获取A股所有股票的symbol和code File "C:\ProgramData\Anaconda3\lib\site-packages\akshare\stock\stock_zh_a_sina.py", line 61, in stock_zh_a_spot data_json = demjson.decode(r.text) File "C:\ProgramData\Anaconda3\lib\site-packages\akshare\utils\demjson.py", line 5740, in decode result = j.decode(txt, File "C:\ProgramData\Anaconda3\lib\site-packages\akshare\utils\demjson.py", line 4957, in decode raise errors[0] akshare.utils.demjson.JSONDecodeError: Can not decode value starting with character '<'