yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
86.87k stars 6.78k forks source link

Crunchyroll 404 for resolution XML #2561

Open BuyMyMojo opened 2 years ago

BuyMyMojo commented 2 years ago

Checklist

Region

Australia

Description

yt-dlp is unable to find the URL for media info on Crunchyroll.

Verbose log

PS R:\Anime> yt-dlp -vU --cookies C:\Users\hello\Downloads\crunchyroll.com_cookies.txt -F "https://www.crunchyroll.com/attack-on-titan/episode-79-memories-of-the-future-823857"
[debug] Command-line config: ['-vU', '--cookies', 'C:\\Users\\hello\\Downloads\\crunchyroll.com_cookies.txt', '-F', 'https://www.crunchyroll.com/attack-on-titan/episode-79-memories-of-the-future-823857']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.01.21 [f20d607] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] exe versions: ffmpeg 2021-12-23-git-60ead5cd68-full_build-www.gyan.dev (setts), ffprobe 2021-12-23-git-60ead5cd68-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.01.21, Current version: 2022.01.21
yt-dlp is up to date (2022.01.21)
[debug] [crunchyroll] Extracting URL: https://www.crunchyroll.com/attack-on-titan/episode-79-memories-of-the-future-823857
[crunchyroll] 823857: Downloading webpage
[crunchyroll] 823857: Downloading media info for 360p
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
[crunchyroll] 823857: Downloading stream info for 360p
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
[crunchyroll] 823857: Downloading media info for 480p
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
[crunchyroll] 823857: Downloading stream info for 480p
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
[crunchyroll] 823857: Downloading media info for 720p
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
[crunchyroll] 823857: Downloading stream info for 720p
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
[crunchyroll] 823857: Downloading media info for 1080p
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
[crunchyroll] 823857: Downloading stream info for 1080p
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
[crunchyroll] 823857: Downloading media info
WARNING: [crunchyroll] Unable to download XML: HTTP Error 404: Not Found
WARNING: [crunchyroll] unable to extract series; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
ERROR: [crunchyroll] 823857: No video formats found!; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1367, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1451, in __extract_info
  File "yt_dlp\YoutubeDL.py", line 1503, in process_ie_result
  File "yt_dlp\YoutubeDL.py", line 2413, in process_video_result
  File "yt_dlp\YoutubeDL.py", line 954, in raise_no_formats
yt_dlp.utils.ExtractorError: [crunchyroll] 823857: No video formats found!; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
Burve commented 2 years ago

It would be nice to be fixed (l.ike before, with sub download, etc.), so I wonder, for "account-needed", does cookie suffice? And if so, how shall I go about that?

Jules-A commented 2 years ago

account-needed ? It occurs without an account using cookies of a session that's not even logged in.

Burve commented 2 years ago

Hmm, I am not that comfortable sharing username and password for Crunchyroll but can share cookies after logging in (that I would use with yt-dlp to do wnload), if that can help.

pukkandan commented 2 years ago

I was not able to access the video. So I assumed account is needed. But it could be due to geo-restriction

Burve commented 2 years ago

Surprisingly, when I tried the latest yt-dlp with -u and -p instead of the --cookies, all worked fine, and there was no error. So not all look bad at this point.

nmills3 commented 2 years ago

getting the same xml error on https://beta.crunchyroll.com/watch/G2XU0J84D/the-monster-in-a-perpetual-cycle-of-death-and-rebirth-struggles-to-break-its-chains-until-seduced-by-a-soul-entrapped-by-destiny Can confirm that i have access to the video in my region via the browser but youtube dlp will not work

nmills3 commented 2 years ago

for me the fix for this was opting OUT of the beta on my account

mjevans commented 2 years ago

I may be having a similar issue with https://beta.crunchyroll.com/watch/G6P8QVW16/sword I also can't find anywhere to opt out of "beta"...

mjevans commented 2 years ago

My mistake, other videos had worked at what I expect is full quality, so I had assumed the login stuff worked.

yt-dlp has an easier to use --cookies-from-browser firefox or --cookies-from-browser chrome OR it's possible (and more secure) to hand it just the cookies for a specific site --cookies ~/.crunchy-cookies.txt E.G.

#!/bin/sh
set -e

OUTFILE="${1:-~/.crunchy-cookies.txt}"
SQLFILE="${2:-~/.mozilla/firefox/FIXME.PROFILE/cookies.sqlite}"

# Have to copy cookies.sqlite, because FireFox has a lock on it
TMPFILE=`mktemp /tmp/cookies.sqlite.XXXXXXXXXX`
cp "$SQLFILE" $TMPFILE

# This is the format of the sqlite database:
# CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT,expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER);

echo "# Netscape HTTP Cookie File" > "$OUTFILE"
sqlite3 -separator $'\t' $TMPFILE >> "$OUTFILE" << "EOF"
.mode tabs
.header off
select host,
    case substr(host,1,1)='.' when 0 then 'FALSE' else 'TRUE' end,
    path,
    case isSecure when 0 then 'FALSE' else 'TRUE' end,
    expiry,
    name,
    value
    from moz_cookies
    where host LIKE '%crunchyroll.com';
EOF

rm $TMPFILE 2>/dev/null || true