Skip to content
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

爬取视频失败 #618

Open
cqc01 opened this issue Dec 9, 2024 · 1 comment
Open

爬取视频失败 #618

cqc01 opened this issue Dec 9, 2024 · 1 comment
Labels
failed 程序运行出错

Comments

@cqc01
Copy link

cqc01 commented Dec 9, 2024

为了更好的解决问题,请认真回答下面的问题。等到问题解决,请及时关闭本issue。

  • 问:请您指明哪个版本运行出错(github版/PyPi版/全部)?

答:github版

  • 问:您使用的是否是最新的程序(是/否)?

答:是

  • 问:爬取任意用户都会运行出错吗(是/否)?

答:是

  • 问:若只有爬特定微博时才出错,能否提供出错微博的weibo_id或url(非必填)?

答:

  • 问:若您已提供出错微博的weibo_id或url,可忽略此内容,否则能否提供出错账号的user_id及您配置的since_date,方便我们定位出错微博(非必填)?

答:

  • 问:如果方便,请您描述出错详情,最好附上错误提示。

答:所有视频都无法下载,configure文件内容如下图,错误提示代码如下
image

HTTPSConnectionPool(host='login.sina.com.cn', port=443): Max retries exceeded with url: /sso/login.php?url=https%3A%2F%2Fm.weibo.cn%2Fs%2Fvideo%2Fobject%3Fobject_id%3D1034%3A4821590823862336%26fromWap%3D1&_rand=1733723181.9406&gateway=1&service=sinawap&entry=sinawap&useticket=1&returntype=META&sudaref=&_client_version=0.6.36 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4745ae5880>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f4745ae5880>: Failed to establish a new connection: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='login.sina.com.cn', port=443): Max retries exceeded with url: /sso/login.php?url=https%3A%2F%2Fm.weibo.cn%2Fs%2Fvideo%2Fobject%3Fobject_id%3D1034%3A4821590823862336%26fromWap%3D1&_rand=1733723181.9406&gateway=1&service=sinawap&entry=sinawap&useticket=1&returntype=META&sudaref=&_client_version=0.6.36 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4745ae5880>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cqc/weiboSpider/weibo_spider/parser/page_parser.py", line 304, in get_video_url
video_url = to_video_download_url(self.cookie, video_page_url)
File "/home/cqc/weiboSpider/weibo_spider/parser/util.py", line 95, in to_video_download_url
wb_info = requests.get(video_object_url, headers=headers).json()
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in
history = [resp for resp in gen] if allow_redirects else []
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 239, in resolve_redirects
resp = self.send(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='login.sina.com.cn', port=443): Max retries exceeded with url: /sso/login.php?url=https%3A%2F%2Fm.weibo.cn%2Fs%2Fvideo%2Fobject%3Fobject_id%3D1034%3A4821590823862336%26fromWap%3D1&_rand=1733723181.9406&gateway=1&service=sinawap&entry=sinawap&useticket=1&returntype=META&sudaref=&_client_version=0.6.36 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4745ae5880>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
#演员的番外# 《平凡英雄》,记录一下🎥 我是娜扎的微博视频  
微博发布位置:无
发布时间:2022-10-06 15:16
发布工具:微博视频号
点赞数:14932
转发数:7261
评论数:14
url:https://weibo.cn/comment/M93HLjTyO

@cqc01 cqc01 added the failed 程序运行出错 label Dec 9, 2024
@dataabc
Copy link
Owner

dataabc commented Dec 9, 2024

看起来像是网络问题,过一段时间再看看。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed 程序运行出错
Projects
None yet
Development

No branches or pull requests

2 participants