Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crunchyroll beta - KeyError('byId') #4692

Closed
10 tasks done
chainikdn opened this issue Aug 18, 2022 · 21 comments · Fixed by #4704
Closed
10 tasks done

Crunchyroll beta - KeyError('byId') #4692

chainikdn opened this issue Aug 18, 2022 · 21 comments · Fixed by #4704
Labels
site-bug Issue with a specific website

Comments

@chainikdn
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

Region

No response

Provide a description that is worded well enough to be understood

The error occurs when openening URL from the beta UI w/o providing authentication info to yt-dlp:
An extractor error has occurred. (caused by KeyError('byId'));

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU', 'https://beta.crunchyroll.com/watch/G69P9MD9Y/asta-and-yuno']
[debug] Encodings: locale cp1251, fs utf-8, pref cp1251, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.14 [5593720] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg n4.4-19-g8d172d9409 (setts)
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.08.14, Current version: 2022.08.14
yt-dlp is up to date (2022.08.14)
[debug] [crunchyroll:beta] Extracting URL: https://beta.crunchyroll.com/watch/G69P9MD9Y/asta-and-yuno
[crunchyroll:beta] asta-and-yuno: Downloading webpage
ERROR: G69P9MD9Y: An extractor error has occurred. (caused by KeyError('byId')); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 666, in extract
  File "yt_dlp\extractor\crunchyroll.py", line 805, in _real_extract
  File "yt_dlp\extractor\crunchyroll.py", line 752, in _redirect_from_beta
KeyError: 'byId'
@chainikdn chainikdn added site-bug Issue with a specific website triage Untriaged issue labels Aug 18, 2022
@pukkandan
Copy link
Member

@tejing1

@tejing1
Copy link
Contributor

tejing1 commented Aug 19, 2022

It seems they changed the datastructure embedded in the page. It's content.media.byId now instead of content.byId, but the bigger problem is that the external_id field is gone. I'm not sure how to support the redirect functionality without it.

@pukkandan
Copy link
Member

I don't know if it's due to some geoblock, but the website doesn't redirect me to any video either. If that is global, we should just throw an error when not logged in. We can't be expected to support redirects that crunchyroll itself no longer supports

@pukkandan pukkandan removed the triage Untriaged issue label Aug 19, 2022
@tejing1
Copy link
Contributor

tejing1 commented Aug 19, 2022

Crunchyroll never redirected you to the actual video on the non-beta site iirc. It always dumped you on the main page.

I see 2 options here:

  • Fail with an error when not logged in.
  • Use the anonymous access mechanism for the beta api, which browsers actually already momentarily use before they get sent to the non-beta main page. It's there and it works, but I was hesitant to rely on it when originally coding this, given that the browser doesn't use it for more than a second before redirecting, normally.

Thoughts on option 2?

@pukkandan
Copy link
Member

if you can implement it, why not

@tejing1
Copy link
Contributor

tejing1 commented Aug 19, 2022

Ok, then, will do. It's dead simple, really. In _get_params, just use cxApiParams.anonClientId instead of cxApiParams.accountAuthClientId and send grant_type=client_id instead of grant_type=etp_rt_cookie.

@nachfuellbar
Copy link

nachfuellbar commented Aug 22, 2022

@tejing1 your PR seems to fix the inital problem but seems fail for me in the end

I tried using cookies, netrc and username + password via cli - logs seem identical for all of em.
Would i need to try something else?

old URL style>
[debug] Command-line config: ['-v']
[debug] User config "/home/XXX/.config/yt-dlp/config": ['--cookies-from-browser', 'chrome', '--video-multistreams', '--audio-multistreams', '--sub-lang', 'enUS', '--abort-on-unavailable-fragment', '--abort-on-error', '-a', '/tmp/download.txt', '-o', '/XXX/Download/%(title)s-%(id)s%(language)s.%(ext)s', '-k', '--no-color']
[debug] Batch file urls: ['https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-1-i-came-i-saw-i-sponsored-833706', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-2-love-does-much-money-does-everything-833707', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-3-the-sinews-of-war-are-infinite-money-833708', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-4-nothing-makes-a-man-so-adventerous-as-an-empty-pocket-833710', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-5-if-money-be-not-thy-servant-it-will-be-thy-master-833712', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-6-ill-got-ill-spent-833714', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-7-money-is-the-root-of-all-evil-833715', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-8-money-burns-a-hole-in-the-pocket-833717', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-9-a-golden-key-can-open-any-door-833719', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-10-life-shouldnt-be-printed-on-dollar-bills-833720', 'https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-11-all-that-glitters-is-not-gold-833722']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.19 [48c88e0] (pip)
[debug] Python 3.10.6 (CPython 64bit) - Linux-5.19.2-zen1-1-zen-x86_64-with-glibc2.36 (glibc 2.36)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1 (setts), ffprobe 5.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.12.0, brotlicffi-1.0.9.2, certifi-2022.06.15, mutagen-1.45.1, secretstorage-3.3.2, sqlite3-2.6.0, websockets-10.3
[Cookies] Extracting cookies from chrome
[debug] Extracting cookies from: "/home/XXX/.config/google-chrome/Default/Cookies"
[debug] detected desktop environment: GNOME
[debug] Chosen keyring: GNOMEKEYRING
[Cookies] Extracted 433 cookies from chrome
[debug] cookie version breakdown: {'v10': 0, 'v11': 425, 'other': 0, 'unencrypted': 8}
[debug] Proxy map: {}
[debug] [crunchyroll] Extracting URL: https://www.crunchyroll.com/en-gb/the-millionaire-detective-balance-unlimited/episode-1-i-came-i-saw-i-sponsored-833706
[crunchyroll] 833706: Downloading webpage
[crunchyroll] 833706: Redirected to beta site - https://beta.crunchyroll.com/watch/G4VUQZ4XN/i-came-i-saw-i-sponsored
[debug] [crunchyroll:beta] Extracting URL: https://beta.crunchyroll.com/watch/G4VUQZ4XN/i-came-i-saw-i-sponsored
[crunchyroll:beta] Retrieving main page
[crunchyroll:beta] Authenticating with grant_type=client_id
[crunchyroll:beta] Retrieving signed policy
[crunchyroll:beta] i-came-i-saw-i-sponsored: Retrieving episode metadata
ERROR: [crunchyroll:beta] G4VUQZ4XN: This video is for premium members only.
  File "/home/XXX/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 666, in extract
    ie_result = self._real_extract(url)
  File "/home/XXX/.local/lib/python3.10/site-packages/yt_dlp/extractor/crunchyroll.py", line 799, in _real_extract
    raise ExtractorError('This video is for premium members only.', expected=True)

new URL style>
[debug] Command-line config: ['-v']
[debug] User config "/home/XXX/.config/yt-dlp/config": ['--cookies-from-browser', 'chrome', '--video-multistreams', '--audio-multistreams', '--sub-lang', 'enUS', '--abort-on-unavailable-fragment', '--abort-on-error', '-a', '/tmp/download.txt', '-o', '/XXX/Download/%(title)s-%(id)s%(language)s.%(ext)s', '-k', '--no-color']
[debug] Batch file urls: ['https://beta.crunchyroll.com/series/GP5HJ855D/the-millionaire-detective---balance-unlimited']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.19 [48c88e0] (pip)
[debug] Python 3.10.6 (CPython 64bit) - Linux-5.19.2-zen1-1-zen-x86_64-with-glibc2.36 (glibc 2.36)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1 (setts), ffprobe 5.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.12.0, brotlicffi-1.0.9.2, certifi-2022.06.15, mutagen-1.45.1, secretstorage-3.3.2, sqlite3-2.6.0, websockets-10.3
[Cookies] Extracting cookies from chrome
[debug] Extracting cookies from: "/home/XXX/.config/google-chrome/Default/Cookies"
[debug] detected desktop environment: GNOME
[debug] Chosen keyring: GNOMEKEYRING
[Cookies] Extracted 434 cookies from chrome
[debug] cookie version breakdown: {'v10': 0, 'v11': 426, 'other': 0, 'unencrypted': 8}
[debug] Proxy map: {}
[debug] [crunchyroll:playlist:beta] Extracting URL: https://beta.crunchyroll.com/series/GP5HJ855D/the-millionaire-detective---balance-unlimited
[crunchyroll:playlist:beta] Retrieving main page
[crunchyroll:playlist:beta] Authenticating with grant_type=client_id
[crunchyroll:playlist:beta] Retrieving signed policy
[crunchyroll:playlist:beta] the-millionaire-detective---balance-unlimited: Retrieving series metadata
[crunchyroll:playlist:beta] the-millionaire-detective---balance-unlimited: Retrieving season list
[download] Downloading playlist: The Millionaire Detective - Balance: UNLIMITED
[crunchyroll:playlist:beta] the-millionaire-detective---balance-unlimited: Retrieving episode list for the-millionaire-detective---balance-unlimited
[crunchyroll:playlist:beta] the-millionaire-detective---balance-unlimited: Retrieving episode list for the-millionaire-detective---balance-unlimited-english-dub
[crunchyroll:playlist:beta] Playlist The Millionaire Detective - Balance: UNLIMITED: Downloading 22 videos of 22
[download] Downloading video 1 of 22
[debug] [crunchyroll:beta] Extracting URL: https://beta.crunchyroll.com/watch/G4VUQZ4XN/i-came-i-saw-i-sponsored
[crunchyroll:beta] i-came-i-saw-i-sponsored: Retrieving episode metadata
ERROR: [crunchyroll:beta] G4VUQZ4XN: This video is for premium members only.
  File "/home/XXX/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 666, in extract
    ie_result = self._real_extract(url)
  File "/home/XXX/.local/lib/python3.10/site-packages/yt_dlp/extractor/crunchyroll.py", line 799, in _real_extract
    raise ExtractorError('This video is for premium members only.', expected=True)

@tejing1
Copy link
Contributor

tejing1 commented Aug 22, 2022

@nachfuellbar Can't reproduce. Just tried the same url with -u and -p for my account with no issue. Are you sure you can actually access that video with your account?

@tejing1
Copy link
Contributor

tejing1 commented Aug 22, 2022

Also, incidentally, you'll need to use --sub-lang en-US rather than --sub-lang enUS when the extractor ultimately in use is the beta extractor. The beta api uses different language codes.

@tejing1
Copy link
Contributor

tejing1 commented Aug 22, 2022

Oh, hmm. Something odd is happening after all: Authenticating with grant_type=client_id means it's using anonymous access, but Redirected to beta site suggests you're properly logged in.

@nachfuellbar
Copy link

@tejing1 thanks for the help
just tried some more - when i remove cookies-from-browser from my config completly, it starts to work with -u and -p

@tejing1
Copy link
Contributor

tejing1 commented Aug 22, 2022

when i remove cookies-from-browser from my config completly, it starts to work with -u and -p

Good, but it's still strange to me that that combination of events could happen at all. We had a bug we could never figure out a while back where it was redirecting in a loop, which seems to have a similar underlying cause. Somehow crunchyroll thinks you're logged in, but yt-dlp thinks you're not, and I'm not sure what the disconnect is between crunchyroll's conditions and yt-dlp's.

iirc that bug also happened with --cookies-from-browser...

@nachfuellbar
Copy link

Don't know if this helps but they removed the option to opt out of beta for logged in users some time ago.
That would at least explain a redirect loop but not why yt-dlp thinks it's not logged in :/

Same here if I unterstand - it uses the cookie but doesn't think it's logged in

Maybe because the cookies used on beta.crunchyroll.com are from www.crunchyroll.com, beta.crunchyroll.com and crunchyroll.com? At least it seems like it uses cookies from all 3 domains

@tejing1
Copy link
Contributor

tejing1 commented Aug 22, 2022

Yeah, I'm well aware of the thing where they force logged in users to beta in some regions. Mine (US) is one of them.

My code in yt-dlp takes different paths based on whether a cookie with name etp_rt exists (for beta.crunchyroll.com). It's the cookie crunchyroll uses to authenticate you as far as I'm aware, but if crunchyroll thinks you're logged in and my code doesn't, there must be some wrinkle to crunchyroll's authentication scheme or cookie handling in browsers/yt-dlp that I'm not aware of.

@nachfuellbar
Copy link

nachfuellbar commented Aug 22, 2022

Also, incidentally, you'll need to use --sub-lang en-US rather than --sub-lang enUS when the extractor ultimately in use is the beta extractor. The beta api uses different language codes.

Something else - seems like the subtitles didn't get downloaded with --sub-lang en-US

--sub-lang en-US
[debug] Command-line config: ['-v', '-n']
[debug] User config "/home/XXX/.config/yt-dlp/config": ['--sub-lang', 'en-US', '--abort-on-unavailable-fragment', '--abort-on-error', '-a', '/tmp/download.txt', '-o', '/XXX/Download/%(title)s-%(id)s.%(ext)s', '-k', '--no-color']
[debug] Batch file urls: ['https://beta.crunchyroll.com/watch/G4VUQZ4XN/i-came-i-saw-i-sponsored', 'https://beta.crunchyroll.com/watch/G14U42ZEM/love-does-much-money-does-everything', 'https://beta.crunchyroll.com/watch/GJWU28DXE/the-sinews-of-war-are-infinite-money', 'https://beta.crunchyroll.com/watch/GK9U3QP4K/nothing-makes-a-man-so-adventerous-as-an-empty-pocket', 'https://beta.crunchyroll.com/watch/GVWU0JGJN/if-money-be-not-thy-servant-it-will-be-thy-master', 'https://beta.crunchyroll.com/watch/GPWUKE2EX/ill-got-ill-spent', 'https://beta.crunchyroll.com/watch/G2XU0JPJ0/money-is-the-root-of-all-evil', 'https://beta.crunchyroll.com/watch/GZ7UVJ5J9/money-burns-a-hole-in-the-pocket', 'https://beta.crunchyroll.com/watch/GQJUG787X/a-golden-key-can-open-any-door', 'https://beta.crunchyroll.com/watch/G50UZW3WJ/life-shouldnt-be-printed-on-dollar-bills', 'https://beta.crunchyroll.com/watch/GG1U20P0D/all-that-glitters-is-not-gold']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.19 [48c88e0] (pip)
[debug] Python 3.10.6 (CPython 64bit) - Linux-5.19.2-zen1-1-zen-x86_64-with-glibc2.36 (glibc 2.36)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1 (setts), ffprobe 5.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.12.0, brotlicffi-1.0.9.2, certifi-2022.06.15, mutagen-1.45.1, secretstorage-3.3.2, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[crunchyroll:beta] Getting session id
[crunchyroll:beta] Logging in
[debug] [crunchyroll:beta] Extracting URL: https://beta.crunchyroll.com/watch/G4VUQZ4XN/i-came-i-saw-i-sponsored
[crunchyroll:beta] Retrieving main page
[crunchyroll:beta] Authenticating with grant_type=etp_rt_cookie
[crunchyroll:beta] Retrieving signed policy
[crunchyroll:beta] i-came-i-saw-i-sponsored: Retrieving episode metadata
[crunchyroll:beta] i-came-i-saw-i-sponsored: Retrieving stream info
[crunchyroll:beta] i-came-i-saw-i-sponsored: Downloading adaptive_hls HLS manifest
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] G4VUQZ4XN: Downloading 1 format(s): adaptive_hls-8084
[debug] Invoking hlsnative downloader on "https://pl.crunchyroll.com/evs3/4813826e282fd96373da300a03b43707/assets/c84532af988766fe1627f5c7ca7d93e1_4327390.mp4/index-v1-a1.m3u8?Expires=1661354115&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wbC5jcnVuY2h5cm9sbC5jb20vZXZzMy80ODEzODI2ZTI4MmZkOTYzNzNkYTMwMGEwM2I0MzcwNy9hc3NldHMvYzg0NTMyYWY5ODg3NjZmZTE2MjdmNWM3Y2E3ZDkzZTFfNDMyNzM5MC5tcDQvaW5kZXgtdjEtYTEubTN1OCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY2MTM1NDExNX19fV19&Signature=lgM35OkqYnROqCU6btiNWnEtCy0lhbkL85lwVlzd291o9yvqN6GkOvutgLNt49H56zNbV~JBYjrj2tbBvLZ~q8H1BcdtJSigR~VfhAR2sbDjZnfFIBgEtpNU1UrAzdjjlvEpwmtH8lv6Vn-8b2nMb09k84J0xxqYQjacixW84nTDYDehEVEQgnD-bXMQgoqRLxzxnoxbZFSuVW5eOrUPTgqFlBFDNZYEhhrs9YF7qAQcPDuaFN1fA5QLTTlXpI~X1QtnnUUa1idUMjFuwygRpZgD727vqGSgZ0d-mhgi5TOjZgwIW3uMCcLqNaobVc3mvo2wawjimnxmWkNzNvYvTA__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA"
[download] /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.mp4 has already been downloaded
--all-subs
[debug] Command-line config: ['-v', '-n']
[debug] User config "/home/XXX/.config/yt-dlp/config": ['--all-subs', '--write-sub', '--abort-on-unavailable-fragment', '--abort-on-error', '-a', '/tmp/download.txt', '-o', '/XXX/Download/%(title)s-%(id)s.%(ext)s', '-k', '--no-color']
[debug] Batch file urls: ['https://beta.crunchyroll.com/watch/G4VUQZ4XN/i-came-i-saw-i-sponsored', 'https://beta.crunchyroll.com/watch/G14U42ZEM/love-does-much-money-does-everything', 'https://beta.crunchyroll.com/watch/GJWU28DXE/the-sinews-of-war-are-infinite-money', 'https://beta.crunchyroll.com/watch/GK9U3QP4K/nothing-makes-a-man-so-adventerous-as-an-empty-pocket', 'https://beta.crunchyroll.com/watch/GVWU0JGJN/if-money-be-not-thy-servant-it-will-be-thy-master', 'https://beta.crunchyroll.com/watch/GPWUKE2EX/ill-got-ill-spent', 'https://beta.crunchyroll.com/watch/G2XU0JPJ0/money-is-the-root-of-all-evil', 'https://beta.crunchyroll.com/watch/GZ7UVJ5J9/money-burns-a-hole-in-the-pocket', 'https://beta.crunchyroll.com/watch/GQJUG787X/a-golden-key-can-open-any-door', 'https://beta.crunchyroll.com/watch/G50UZW3WJ/life-shouldnt-be-printed-on-dollar-bills', 'https://beta.crunchyroll.com/watch/GG1U20P0D/all-that-glitters-is-not-gold']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.19 [48c88e0] (pip)
[debug] Python 3.10.6 (CPython 64bit) - Linux-5.19.2-zen1-1-zen-x86_64-with-glibc2.36 (glibc 2.36)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1 (setts), ffprobe 5.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.12.0, brotlicffi-1.0.9.2, certifi-2022.06.15, mutagen-1.45.1, secretstorage-3.3.2, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[crunchyroll:beta] Getting session id
[crunchyroll:beta] Logging in
[debug] [crunchyroll:beta] Extracting URL: https://beta.crunchyroll.com/watch/G4VUQZ4XN/i-came-i-saw-i-sponsored
[crunchyroll:beta] Retrieving main page
[crunchyroll:beta] Authenticating with grant_type=etp_rt_cookie
[crunchyroll:beta] Retrieving signed policy
[crunchyroll:beta] i-came-i-saw-i-sponsored: Retrieving episode metadata
[crunchyroll:beta] i-came-i-saw-i-sponsored: Retrieving stream info
[crunchyroll:beta] i-came-i-saw-i-sponsored: Downloading adaptive_hls HLS manifest
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Downloading subtitles: de-DE, en-US, es-LA, fr-FR, pt-BR
[debug] Default format spec: bestvideo*+bestaudio/best
[info] G4VUQZ4XN: Downloading 1 format(s): adaptive_hls-8084
[info] Writing video subtitles to: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.de-DE.ass
[debug] Invoking http downloader on "https://v.vrv.co/evs3/4813826e282fd96373da300a03b43707/assets/c84532af988766fe1627f5c7ca7d93e1_280018.txt?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly92LnZydi5jby9ldnMzLzQ4MTM4MjZlMjgyZmQ5NjM3M2RhMzAwYTAzYjQzNzA3L2Fzc2V0cy9jODQ1MzJhZjk4ODc2NmZlMTYyN2Y1YzdjYTdkOTNlMV8yODAwMTgudHh0IiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjYxMjc1OTk5fX19XX0_&Signature=gxeyjMSsdYNsK05v2zmi3nioPl~3hTvNPULT2Wf5YoH-z5ncwwj2Zz3rHk1hPOQ6J8ar5uWbJzzDlwGPAhU4PDTaYpczMAB-seEBjl5UQtCYx1sLCGw~6RUzKioL-rGbRsqFJhzRCXDCxgVJMjLt4NlbrHHJRcvbMehj5T8xwCWwAgTmaNnJm628pHBMMq-qg5ArDSNmq9K1s-J5PlLje1lQRGCWmhAhkUZKU7vfLyJnEOhi~wjlJOi8P0y9uJsKfmEZLTqWWU1oxRuciGXGnQIMt4i1BMAUPqpdsjFHfBFsaQiWdF-RgTGCRgNdkEwj4Usolw6d7STouTIMJ5ztrg__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA"
[download] Destination: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.de-DE.ass
[download] 100% of 30.19KiB in 00:00 at 79.31KiB/s
Deleting existing file /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.en-US.ass
[info] Writing video subtitles to: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.en-US.ass
[debug] Invoking http downloader on "https://v.vrv.co/evs3/4813826e282fd96373da300a03b43707/assets/c84532af988766fe1627f5c7ca7d93e1_280037.txt?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly92LnZydi5jby9ldnMzLzQ4MTM4MjZlMjgyZmQ5NjM3M2RhMzAwYTAzYjQzNzA3L2Fzc2V0cy9jODQ1MzJhZjk4ODc2NmZlMTYyN2Y1YzdjYTdkOTNlMV8yODAwMzcudHh0IiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjYxMjc1OTk5fX19XX0_&Signature=VXuf3igRyztqiWi~OkJMX9Ui~~LpSGNMXNkjJktH7-JeLnXibGZ~dOrCACTIXh2azEF~HSn3ofW~AGSMyvmvwuFUm~KDPU7Pcov~7PYyUSY9hJwqdFZNtnXIzkBy9oiX61Z3ZM5JuZSVwLLxK4NdsvJuYAHUq6TZpwTA6uWltxs3jlkembL0LAcTlkdiNBU9hTaY68Cp8iHl-ufn0RttvfwDzz80mRJfCnmFubSkiCltb1nW80GrzImUkVuQustYdGx3c17nh2syi-83hs8f6v-xV7~vgOJMIuQFsFUA0P2RiWo~sO3phs2z8MtUlBRqYJEXcxSgsIKAieGbiMR16A__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA"
[download] Destination: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.en-US.ass
[download] 100% of 24.80KiB in 00:00 at 289.69KiB/s
[info] Writing video subtitles to: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.es-LA.ass
[debug] Invoking http downloader on "https://v.vrv.co/evs3/4813826e282fd96373da300a03b43707/assets/c84532af988766fe1627f5c7ca7d93e1_275081.txt?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly92LnZydi5jby9ldnMzLzQ4MTM4MjZlMjgyZmQ5NjM3M2RhMzAwYTAzYjQzNzA3L2Fzc2V0cy9jODQ1MzJhZjk4ODc2NmZlMTYyN2Y1YzdjYTdkOTNlMV8yNzUwODEudHh0IiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjYxMjc1OTk5fX19XX0_&Signature=GDnhG8kmhYTW4OjtN6XqPNuyr4rIISMtdEEaxkNQWA21ijfUhIpEDyBlaWL1zt1qpeBp6RcdNfMmlVhUaXESSpYIQeiHZrLp7EA19r9E45j7wN5VInFKBsgmYSjIbNkrOgHPjEOSw3E0NSUgqNjc2DK93nEPtA~j5sl8CyqhsDZb7WP4Ef5EPfbZVJQ4txW6BZ7AwJdgGa3hawhmYmEvBAlRGNpkGHaVcabsu-5kX8szKZfu~Ch4MB7ajpHbKAE8uWdyPmgv1E3XJIgfaTLc19ROPc6fVHV8vRv06x2U3wjSrXbd7QnwTkSEVSzCugkFp~gj8GuDCdaCQEf~vUV8kw__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA"
[download] Destination: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.es-LA.ass
[download] 100% of 26.42KiB in 00:00 at 92.00KiB/s
[info] Writing video subtitles to: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.fr-FR.ass
[debug] Invoking http downloader on "https://v.vrv.co/evs3/4813826e282fd96373da300a03b43707/assets/c84532af988766fe1627f5c7ca7d93e1_273646.txt?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly92LnZydi5jby9ldnMzLzQ4MTM4MjZlMjgyZmQ5NjM3M2RhMzAwYTAzYjQzNzA3L2Fzc2V0cy9jODQ1MzJhZjk4ODc2NmZlMTYyN2Y1YzdjYTdkOTNlMV8yNzM2NDYudHh0IiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjYxMjc1OTk5fX19XX0_&Signature=iqVpPJ5vbU5V2rwX2F6JPXM7Bs9ovKvA6rdKsXWVGLMHP8eTYgl2iXt6iXjcVLfL5BOTRY91sQvL2CF4nAxlC1oVHCEEQQyCcAAT4DNFOJ7P5nvUO7sv67jzCRePniUGE5LKDiz39BGbOLleJAKLQrzY9OnHtOEEBeDP4r-RhIEf0aw0QGz3K~7f2Z58RfO5kKbDIqLblOfxEQDuQCeu-K5CCcXlX7pPDvLDVwHIgfIS9qmrYjsQv6-x1rgh7Ye3G5PihX-0DdoEqnG1SoWnPXhYYoHphjSuKGJr8F0pUuT0aDo5s4z90Nxvd021D-LhEA2PpM~Bd6YxvSFK8~0qRg__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA"
[download] Destination: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.fr-FR.ass
[download] 100% of 26.31KiB in 00:00 at 78.89KiB/s
[info] Writing video subtitles to: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.pt-BR.ass
[debug] Invoking http downloader on "https://v.vrv.co/evs3/4813826e282fd96373da300a03b43707/assets/c84532af988766fe1627f5c7ca7d93e1_272439.txt?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly92LnZydi5jby9ldnMzLzQ4MTM4MjZlMjgyZmQ5NjM3M2RhMzAwYTAzYjQzNzA3L2Fzc2V0cy9jODQ1MzJhZjk4ODc2NmZlMTYyN2Y1YzdjYTdkOTNlMV8yNzI0MzkudHh0IiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjYxMjc1OTk5fX19XX0_&Signature=YEiCBHr1nKccuB5cJUu7xU1hKq1zZhAAtlT6FFzPouYTXFeiVLp4LZq7-YsjGy-nDnzFuTEKSamOxbrhrnsgtKCUVG5-6rzHhq2e4Tvq1Niwk26KZqRJV9ok2yyMIL4A2o065L4zGtJBNfPAlVc~~GxcvmyVV1RGYjPXzpMOQwD2X8mdXS~igCUj573SHTc6QyPxcw7K4bd2g68sZT-DHRQhr1dPaDUoJ-A8u7EU~ruI9qw8A~wVdGIldNZrxQ4KkSxqYRa9kcOXPmLmT1YWujsPAtwSOyI-QLwdXxCC2PkxIr7538Pr9G5FV5QqcyL4heH6c--YGU4tnkO7uoEceQ__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA"
[download] Destination: /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.pt-BR.ass
[download] 100% of 25.11KiB in 00:00 at 97.22KiB/s
[debug] Invoking hlsnative downloader on "https://pl.crunchyroll.com/evs3/4813826e282fd96373da300a03b43707/assets/c84532af988766fe1627f5c7ca7d93e1_4327390.mp4/index-v1-a1.m3u8?Expires=1661359035&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wbC5jcnVuY2h5cm9sbC5jb20vZXZzMy80ODEzODI2ZTI4MmZkOTYzNzNkYTMwMGEwM2I0MzcwNy9hc3NldHMvYzg0NTMyYWY5ODg3NjZmZTE2MjdmNWM3Y2E3ZDkzZTFfNDMyNzM5MC5tcDQvaW5kZXgtdjEtYTEubTN1OCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY2MTM1OTAzNX19fV19&Signature=FCT6MXpRHUO7fSTImVVRa4MNWraSlVfNh28enJ4chev85Ni5sItNwYL-wT-QXwKxv8OLKS1U5lwkMn3cWiBI~ygwP-LrnAD1dGAEVf8hnyD77tqRY1Fv0jFwOooEW~3azd2Oz-zjxAu8tjNXr1gpqQUjxrsHuyoc-m9aooYWF3AXs2yocEMJujyEagEHMLvqPjLkmsn4YHCvGVoGrDGdJdIYGKdbT2DaZavXDHm6xScZVQ2Nlk5eMy-QWKXUmqczLrSY6LiBHT9dseHx4U1STRYRfV3B1isUbxra1zK4jtXcsgZWL~O4NF32wbDW9zr0n~5IRecpRBTnucxU6UPdfQ__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA"
[download] /XXX/Download/The Millionaire Detective - Balance: UNLIMITED Episode 1 – I Came, I Saw, I Sponsored-G4VUQZ4XN.mp4 has already been downloaded

@pukkandan
Copy link
Member

Something else - seems like the subtitles didn't get downloaded with --sub-lang en-US

You have to add --write-subtitles

@nachfuellbar
Copy link

@pukkandan thanks for spotting it - thought i had it in config but you are right, the log says otherwise

@Grub4K
Copy link
Member

Grub4K commented Aug 27, 2022

Somehow crunchyroll thinks you're logged in, but yt-dlp thinks you're not, and I'm not sure what the disconnect is between crunchyroll's conditions and yt-dlp's.
iirc that bug also happened with --cookies-from-browser...

The problem is that InfoExtractor._get_cookies uses http.cookies.SimpleCookie to process the cookies. For me _evidon_consent_cookie as well as _evidon_suppress_notification_cookie contained quotes, which SimpleCookie does not handle. This caused self._get_cookies(url).get('etp_rt') to fail, causing the mismatch. If I remove the cookies in question it works normally again.

The solution could be something like the one in Django, overwriting _get_cookies either on CrunchyrollBetaBaseIE or InfoExtractor.

@tejing1
Copy link
Contributor

tejing1 commented Aug 27, 2022

Now that sounds like the reason! Thanks for tracking that down.

@Grub4K
Copy link
Member

Grub4K commented Aug 27, 2022

No problem.

Should we track this in another issue entirely since it could potentially affect every extractor using _get_cookies (And therefore by extension the "faulty" SimpleCookie)?

@tejing1
Copy link
Contributor

tejing1 commented Aug 27, 2022

I'd say so, yeah, especially since it isn't actually even related to the OP here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants