You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python twitter-video-dl.py https://twitter.com/iamyomas/status/1745417287631347837 test_twitter/test.mp4
Traceback (most recent call last):
File "/Users/ylogachev/Development/fuckvpnbot/twitter-video-dl/twitter-video-dl.py", line 25, in
tvdl.download_video(args.twitter_url, file_name)
File "/Users/ylogachev/Development/fuckvpnbot/twitter-video-dl/src/twitter_video_dl/twitter_video_dl.py", line 347, in download_video
bearer_token, guest_token = get_tokens(tweet_url)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/ylogachev/Development/fuckvpnbot/twitter-video-dl/src/twitter_video_dl/twitter_video_dl.py", line 37, in get_tokens
assert html.status_code == 200, f'Failed to get tweet page. If you are using the correct Twitter URL this suggests a bug in the script. Please open a GitHub issue and copy and paste this message. Status code: {html.status_code}. Tweet url: {tweet_url}'
AssertionError: Failed to get tweet page. If you are using the correct Twitter URL this suggests a bug in the script. Please open a GitHub issue and copy and paste this message. Status code: 400. Tweet url: https://twitter.com/iamyomas/status/1745417287631347837
The text was updated successfully, but these errors were encountered:
This issue is the same as 7rikazhexde#7.
Some of the error output is different, but the function(get_tokens) in issue is the same.
In other words, this problem is caused by the browser not supporting it. You can access the tweet page by specifying the User-Agent in the header of the GET request, as shown below.
python twitter-video-dl.py https://twitter.com/iamyomas/status/1745417287631347837 test_twitter/test.mp4
Traceback (most recent call last):
File "/Users/ylogachev/Development/fuckvpnbot/twitter-video-dl/twitter-video-dl.py", line 25, in
tvdl.download_video(args.twitter_url, file_name)
File "/Users/ylogachev/Development/fuckvpnbot/twitter-video-dl/src/twitter_video_dl/twitter_video_dl.py", line 347, in download_video
bearer_token, guest_token = get_tokens(tweet_url)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/ylogachev/Development/fuckvpnbot/twitter-video-dl/src/twitter_video_dl/twitter_video_dl.py", line 37, in get_tokens
assert html.status_code == 200, f'Failed to get tweet page. If you are using the correct Twitter URL this suggests a bug in the script. Please open a GitHub issue and copy and paste this message. Status code: {html.status_code}. Tweet url: {tweet_url}'
AssertionError: Failed to get tweet page. If you are using the correct Twitter URL this suggests a bug in the script. Please open a GitHub issue and copy and paste this message. Status code: 400. Tweet url: https://twitter.com/iamyomas/status/1745417287631347837
The text was updated successfully, but these errors were encountered: