[QUESTION]推特视频无法下载了
几天前就无法下载了,提示 WARNING 第 N 次响应内容为空, 状态码: 404,
最后一行错误代码: AttributeError: 'NoneType' object has no attribute 'split'
Similarity Issues
- 60% #145
- 53% #305
- 53% #218
- 50% #197
- 50% #92
- 50% #90
The error you're encountering is likely due to the code attempting to access a method on a 'NoneType' object, which suggests that the video URL or data is missing or inaccessible. This can happen if the expected fields in the response have changed or if the video is no longer available.
To address this issue, you can add a null check before attempting to split the video URL. Here's an example of how you might handle this:
if self.tweet_video_url is not None:
video_url_parts = self.tweet_video_url.split('/')
else:
# Handle the case where tweet_video_url is None
logging.warning("Video URL is None, unable to download.")
Additionally, there has been a recent update in the codebase to ensure the highest quality video link is used by selecting the last URL in the video URL list, which might help avoid issues with unplayable .m3u8 format files [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other