Closed rusemode closed 2 years ago
C:\Users\Lenovo\Downloads\youtube.com_cookies.txt
Official guide for cookies is here for reference: https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl
- See the last error. You need to fix the path to your cookies file. I think it should be
C:\Users\Lenovo\Downloads\youtube.com_cookies.txt
- Remove -u and -p, it doesn't work for YouTube.
Official guide for cookies is here for reference: https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl
Ok, that worked, but now I have a different problem?
C:\Users\Lenovo>youtube-dl --cookies ""C:\Users\Lenovo\Downloads\youtube.com_cookies.txt"" https://m.youtube.com/watch?v=xH9FtFmYxOM [youtube] xH9FtFmYxOM: Downloading webpage [youtube] xH9FtFmYxOM: Downloading MPD manifest WARNING: Requested formats are incompatible for merge and will be merged into mkv. [dashsegments] Total fragments: 1044 [download] Destination: Io monaca per 3 carogne e 7 peccatrici (1972) FILM COMPLETO-xH9FtFmYxOM.f244.webm [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 1 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 2 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 3 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 4 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 5 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 6 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 7 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 8 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 9 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 10 of 10)... ERROR: giving up after 10 fragment retries
See also #29811.
It's trying to download format 244 and according to this there is one (an alternative formulation using {"clientName":"ANDROID","clientScreen":"EMBED","clientVersion":"16.05"}
doesn't list it, presumably listing formats suitable for mobile):
wget -O- -q --header='Content-Type: application/json' --header='X-Goog-Api-Key: AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8' --method=POST --body-data='{"context" :{"client":{"clientName": "WEB", "clientScreen": "EMBED", "clientVersion": "2.20210721.00.00"}}, "videoId": "xH9FtFmYxOM"}' 'https://www.youtube.com/youtubei/v1/player' | grep '"itag"'
"itag": 18,
"itag": 135,
"itag": 244,
"itag": 134,
"itag": 243,
"itag": 133,
"itag": 242,
"itag": 160,
"itag": 278,
"itag": 140,
"itag": 249,
"itag": 250,
"itag": 251,
$
As you have the cookies, you can use -F
(with the cookies) to list the available formats. From the above list, try format 135 (ie f 135
):
"mimeType": "video/mp4; codecs=\"avc1.4d401e\"",
"bitrate": 3438815,
"width": 640,
"height": 480,
See #29832 for why the link listed in the YT API response for format 244 gives 404.
- See the last error. You need to fix the path to your cookies file. I think it should be
C:\Users\Lenovo\Downloads\youtube.com_cookies.txt
- Remove -u and -p, it doesn't work for YouTube.
Official guide for cookies is here for reference: https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl
Ok, that worked, but now I have a different problem?
C:\Users\Lenovo>youtube-dl --cookies ""C:\Users\Lenovo\Downloads\youtube.com_cookies.txt"" https://m.youtube.com/watch?v=xH9FtFmYxOM [youtube] xH9FtFmYxOM: Downloading webpage [youtube] xH9FtFmYxOM: Downloading MPD manifest WARNING: Requested formats are incompatible for merge and will be merged into mkv. [dashsegments] Total fragments: 1044 [download] Destination: Io monaca per 3 carogne e 7 peccatrici (1972) FILM COMPLETO-xH9FtFmYxOM.f244.webm [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 1 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 2 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 3 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 4 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 5 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 6 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 7 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 8 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 9 of 10)... [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 10 of 10)... ERROR: giving up after 10 fragment retries
This is a different issue that is not related to cookies. Related: https://github.com/ytdl-org/youtube-dl/issues/29404 https://github.com/ytdl-org/youtube-dl/issues/29395 https://github.com/yt-dlp/yt-dlp/issues/502
This is likely a server side issue.
This is likely a server side issue.
I'm not familiar with this, but the problem was fixed by choosing a different format as dirkf last adviced.
Checklist
Verbose log
Description
I followed different guides and setup the cookie.txt file but I can't seem to be able to login in order to download the link.