-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
知乎爬虫 Request error: {"error":{"code":101,"name":"AuthenticationError","message":"ZERR_NOT_LOGIN"}} #517
Comments
而且这一错误抛出的是tenacity.RetryError,无法被DataFetchError捕获 MediaCrawler/media_platform/zhihu/core.py Line 141 in dc9116e
Traceback (most recent call last):
File "/opt/conda/envs/media/lib/python3.9/site-packages/tenacity/_asyncio.py", line 50, in __call__
result = await fn(*args, **kwargs)
File "/data/media_platform/zhihu/client.py", line 96, in request
raise DataFetchError(response.text)
media_platform.zhihu.exception.DataFetchError: {"error":{"code":101,"name":"AuthenticationError","message":"ZERR_NOT_LOGIN"}}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/main.py", line 66, in <module>
asyncio.get_event_loop().run_until_complete(main())
File "/opt/conda/envs/media/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/data/main.py", line 56, in main
await crawler.start()
File "/data/media_platform/zhihu/core.py", line 96, in start
await self.search()
File "/data/media_platform/zhihu/core.py", line 127, in search
content_list: List[ZhihuContent] = await self.zhihu_client.get_note_by_keyword(
File "/data/media_platform/zhihu/client.py", line 211, in get_note_by_keyword
search_res = await self.get(uri, params)
File "/data/media_platform/zhihu/client.py", line 128, in get
return await self.request(method="GET", url=zhihu_constant.ZHIHU_URL + final_uri, headers=headers, **kwargs)
File "/opt/conda/envs/media/lib/python3.9/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
File "/opt/conda/envs/media/lib/python3.9/site-packages/tenacity/_asyncio.py", line 47, in __call__
do = self.iter(retry_state=retry_state)
File "/opt/conda/envs/media/lib/python3.9/site-packages/tenacity/__init__.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f2fadc7fbb0 state=finished raised DataFetchError>] |
这是知乎问答吗 ? |
知乎,关键词搜索,不太清楚跟问答有没有关系 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
对于这个错误尚不清楚如何解决,还大佬指导一下~
The text was updated successfully, but these errors were encountered: