We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微博爬取评论数据返回302
async def request(self, method, url, **kwargs) -> Union[Response, Dict]: enable_return_response = kwargs.pop("return_response", False) async with httpx.AsyncClient(proxies=self.proxies, verify=False) as client: response = await client.request( method, url, timeout=self.timeout, **kwargs ) if enable_return_response: return response data: Dict = response.json() ok_code = data.get("ok") if ok_code not in [0, 1]: utils.logger.error(f"[WeiboClient.request] request {method}:{url} err, res:{data}") raise DataFetchError(data.get("msg", "unkonw error")) else: return data.get("data", {})
data: Dict = response.json()报错 JSONDecodeError('Expecting value: line 1 column 1 (char 0)') debug发现response状态码为302
The text was updated successfully, but these errors were encountered:
No branches or pull requests
❓ 问题描述
微博爬取评论数据返回302
🔍 使用场景
💻 环境信息
📋 错误日志
data: Dict = response.json()报错 JSONDecodeError('Expecting value: line 1 column 1 (char 0)') debug发现response状态码为302
📷 错误截图
The text was updated successfully, but these errors were encountered: