Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ws.search不能用了吗? requests.exceptions.JSONDecodeError #30

Closed
Vincent1893 opened this issue Jun 12, 2023 · 1 comment
Closed

Comments

@Vincent1893
Copy link

Traceback (most recent call last):
File "D:\develope\IdeaProjects\PythonHelloword.idea\src\WenCaiAPI.py", line 192, in
str =wc.search('今日热股')
File "D:\develope\IdeaProjects\python3.9_space\lib\site-packages\wencai\core\event.py", line 48, in search
return Wencai(proxies=globals()['global_proxies'], verify=globals()['verify']).search(query_string=query)
File "D:\develope\IdeaProjects\python3.9_space\lib\site-packages\wencai\core\crawler.py", line 102, in search
result = r.json()['data']['answer'][0]['txt'][0]['content']['components'][0]['data']['datas']
File "D:\develope\IdeaProjects\python3.9_space\lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

这个是被反爬限制了吗?

@Vincent1893
Copy link
Author

貌似是偶发性问题 似乎是频繁调用后会出现这种错误

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant