inteoryx / twitter-video-dl

Download twitter videos as mp4 files
The Unlicense
216 stars 52 forks source link

error mainjs url when to download video from https://twitter.com/nocontextelin/status/1825886964920496605 #41

Open azzam2912 opened 4 weeks ago

azzam2912 commented 4 weeks ago

python3 twitter-video-dl.py https://twitter.com/nocontextelin/status/1825886964920496605 elin.mp4 Traceback (most recent call last): File "/Users/xeratha-hagavi/programming/Python/twitter-video-dl/twitter-video-dl.py", line 25, in tvdl.download_video(args.twitter_url, file_name) File "/Users/xeratha-hagavi/programming/Python/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/xeratha-hagavi/programming/Python/twitter-video-dl/src/twitter_video_dl/twitter_video_dl.py", line 41, in get_tokens assert mainjs_url is not None and len( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: Failed to find main.js file. 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. Tweet url: https://twitter.com/nocontextelin/status/1825886964920496605

GeniusMK2 commented 1 week ago

main.js does not be contained in tweet_url html. Need to fetch it from request.