Can't download twitter private videos.
See original GitHub issueChecklist
- I’m reporting a broken site
- I’ve verified that I’m running yt-dlp version 2022.02.04. (update instructions)
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
anywhere
Description
First of all, I appreciate your time and efforts involved in making and maintaining yt-dlp. I found it very useful and convenient.
I wanna download a twitter video which is only available for the uploader’s followers. I extracted cookies in twitter with Get cookies.txt (chrome extension), named ‘cookies.txt’, and placed it in the folder in which I’m gonna download the private video. And then, I openned cmd in the folder and typed the following command;
yt-dlp --cookies cookies.txt -F https://twitter.com/[UserID]/status/[TweetID]
(I blinded a detailed pin number because of concern about privacy being exposed. I’m so sorry and would appreciate if you could be willing to understand me.)
And it responded like this;
[twitter] [TweetID]: Downloading guest token ERROR: [twitter] [TweetID]: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: ‘Forbidden’>); please report this issue on https://github.com/yt-dlp/yt-dlp , filling out the “Broken site” issue template properly. Confirm you are on the latest version using -U (caused by <HTTPError 403: ‘Forbidden’>); please report this issue on https://github.com/yt-dlp/yt-dlp , filling out the “Broken site” issue template properly. Confirm you are on the latest version using -U
I changed the cookies text file into new one and executed all the rest of the process once again, but the result was the same. Did I miss something? Are there more processes that I have to do? It would be great if anyone could help me. Thank you.
Verbose log
[debug] Command-line config: ['-vU', '--cookies', 'cookies.txt', '-F', 'https://twitter.com/[UserID]/status/[TweetID]']
[debug] Encodings: locale cp949, fs utf-8, out utf-8, err utf-8, pref cp949
[debug] yt-dlp version 2022.02.04 [c1653e9] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] exe versions: ffmpeg git-2020-06-28-4cfcfb3, ffprobe git-2020-06-28-4cfcfb3
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [twitter] Extracting URL: https://twitter.com/[UserID]/status/[TweetID]
[twitter] [TweetID]: Downloading guest token
ERROR: [twitter] [TweetID]: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U
File "yt_dlp\extractor\common.py", line 730, in _request_webpage
File "yt_dlp\YoutubeDL.py", line 3558, in urlopen
File "urllib\request.py", line 531, in open
File "urllib\request.py", line 640, in http_response
File "urllib\request.py", line 569, in error
File "urllib\request.py", line 502, in _call_chain
File "urllib\request.py", line 649, in http_error_default
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
If you have python installed, see this https://github.com/yt-dlp/yt-dlp#with-pip
Otherwise, wait for next release
This is easy to implement. Similar code for reference: https://github.com/yt-dlp/yt-dlp/blob/e0ddbd02bd1c365b95bb88eaa6e4e0238faf35eb/yt_dlp/extractor/minds.py#L20-L26