[crunchyroll] error 403 - forbiden for pretty much everything now

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm reporting that yt-dlp is broken on a supported site
[X] I've verified that I'm running yt-dlp version 2023.06.22 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
Brazil
Provide a description that is worded well enough to be understood
CR probably broke CR plugin... again.
I tryed to download lists for taking links for new episodes just to get a 403 error. Downloading episodes also don't work anymore.
KODI plugin is working fine. Website is working fine. Tested the PS4 app and also working fine.
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
The nightly verbose:
yt-dlp.exe -vU
[debug] Command-line config: ['-vU']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[5b4b92769] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-12-04-git-6c814093d8-full_build-www.gyan.dev (setts), ffprobe 2022-12-04-git-6c814093d8-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1852 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 9eb7dae08abf2a5c725c0635519bb9568f0892e6b2145850e16ecff62186b637
yt-dlp is up to date<EMAIL_ADDRESS>
The output when trying to download anything (also for trying to retrieve playlist):
yt-dlp.exe -vU --cookies-from-browser vivaldi --sub-langs pt-BR --remux-video mkv --embed-subs -a "C:\animetemp\queue2.txt" -o "%(season)s - %(episode_number)s.%(ext)s" --paths "C:\animetemp"
[debug] Command-line config: ['-vU', '--cookies-from-browser', 'vivaldi', '--sub-langs', 'pt-BR', '--remux-video', 'mkv', '--embed-subs', '-a', 'C:\\animetemp\\queue2.txt', '-o', '%(season)s - %(episode_number)s.%(ext)s', '--paths', 'C:\\animetemp']
[debug] Batch file urls: ['https://www.crunchyroll.com/pt-br/watch/G0DUNJKE4/scrambling-and-dripping']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[5b4b92769] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-12-04-git-6c814093d8-full_build-www.gyan.dev (setts), ffprobe 2022-12-04-git-6c814093d8-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[Cookies] Extracting cookies from vivaldi
[debug] Extracting cookies from: "C:\Users\tamod\AppData\Local\Vivaldi\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\tamod\AppData\Local\Vivaldi\User Data\Local State"
[Cookies] Extracted 2856 cookies from vivaldi
[debug] cookie version breakdown: {'v10': 2856, 'other': 0, 'unencrypted': 0}
[debug] Proxy map: {}
[debug] Loaded 1852 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 9eb7dae08abf2a5c725c0635519bb9568f0892e6b2145850e16ecff62186b637
yt-dlp is up to date<EMAIL_ADDRESS>[crunchyroll] Extracting URL: https://www.crunchyroll.com/pt-br/watch/G0DUNJKE4/scrambling-and-dripping
[crunchyroll] Retrieving main page (lang=pt-br/)
ERROR: [crunchyroll] G0DUNJKE4: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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 708, in extract
  File "yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
  File "yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
  File "yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
  File "yt_dlp\extractor\crunchyroll.py", line 69, in _update_query
  File "yt_dlp\extractor\common.py", line 1111, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1062, in download_content
  File "yt_dlp\extractor\common.py", line 896, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 853, in _request_webpage

  File "yt_dlp\extractor\common.py", line 835, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3786, 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
urllib.error.HTTPError: HTTP Error 403: Forbidden

It's the same for version 2023.06.22.

This looks like a cloudflare issue, and I can't reproduce it. This has happened before, and has been temporary. Hopefully that's the case again.
Something you could try:

refresh your CR cookies in browser
pass your browser's user-agent with --user-agent "USERAGENT" along with --cookies-from-browser

This looks like a cloudflare issue, and I can't reproduce it. This has happened before, and has been temporary. Hopefully that's the case again.
Something you could try:

refresh your CR cookies in browser
find your browser's user-agent string; you can type "what is my user-agent" into duckduckgo, google, etc
pass your browser's user-agent with --user-agent "USERAGENT" along with --cookies-from-browser

Ok, cookies refreshed. Also tested with another browser.
user agent added to code
Still forbidden...
yt-dlp.exe -vU --cookies-from-browser vivaldi --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Vivaldi/6.1.3035.111" --sub-langs pt-BR --remux-video mkv --embed-subs -a "C:\animetemp\queue2.txt" -o "%(season)s - %(episode_number)s.%(ext)s" --paths "C:\animetemp"
[debug] Command-line config: ['-vU', '--cookies-from-browser', 'vivaldi', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Vivaldi/6.1.3035.111', '--sub-langs', 'pt-BR', '--remux-video', 'mkv', '--embed-subs', '-a', 'C:\\animetemp\\queue2.txt', '-o', '%(season)s - %(episode_number)s.%(ext)s', '--paths', 'C:\\animetemp']
[debug] Batch file urls: ['https://www.crunchyroll.com/pt-br/watch/G0DUNJKE4/scrambling-and-dripping']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[5b4b92769] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-12-04-git-6c814093d8-full_build-www.gyan.dev (setts), ffprobe 2022-12-04-git-6c814093d8-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[Cookies] Extracting cookies from vivaldi
[debug] Extracting cookies from: "C:\Users\tamod\AppData\Local\Vivaldi\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\tamod\AppData\Local\Vivaldi\User Data\Local State"
[Cookies] Extracted 2819 cookies from vivaldi
[debug] cookie version breakdown: {'v10': 2819, 'other': 0, 'unencrypted': 0}
[debug] Proxy map: {}
[debug] Loaded 1852 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 9eb7dae08abf2a5c725c0635519bb9568f0892e6b2145850e16ecff62186b637
yt-dlp is up to date<EMAIL_ADDRESS>[crunchyroll] Extracting URL: https://www.crunchyroll.com/pt-br/watch/G0DUNJKE4/scrambling-and-dripping
[crunchyroll] Retrieving main page (lang=pt-br/)
ERROR: [crunchyroll] G0DUNJKE4: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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 708, in extract
  File "yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
  File "yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
  File "yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
  File "yt_dlp\extractor\crunchyroll.py", line 69, in _update_query
  File "yt_dlp\extractor\common.py", line 1111, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1062, in download_content
  File "yt_dlp\extractor\common.py", line 896, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 853, in _request_webpage

  File "yt_dlp\extractor\common.py", line 835, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3786, 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
urllib.error.HTTPError: HTTP Error 403: Forbidden

I can confirm that this is an issue at the moment. All links load and play fine in Chrome, Edge, and Firefox. In US Central timezone region. When using yt-dlp, all links produce the same error.
Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>);

This looks like a cloudflare issue, and I can't reproduce it. This has happened before, and has been temporary. Hopefully that's the case again.
Something you could try:

refresh your CR cookies in browser
find your browser's user-agent string; you can type "what is my user-agent" into duckduckgo, google, etc
pass your browser's user-agent with --user-agent "USERAGENT" along with --cookies-from-browser

FYI:
The --user-agent option hasn't worked with Crunchyroll for the last several months.

The --user-agent option hasn't worked with Crunchyroll for the last several months.

It does though? Use and and add --print-traffic to your command. You'll see the UA you passed being sent with requests

Yeah, I used to use the --user-agent option with Crunchyroll out of habit since that was the best way to use the old platform, but several months back it caused it to throw a similar 403 forbidden error. Took it out and it has worked fine since then.
But yeah, I still get the same error/output as OP. It does not appear that you are using the Windows version. Maybe you can try it from a Windows cmd shell and see how it goes.
`
yt-dlp -vU -F --extractor-args "crunchyrollbeta:hardsub=en-US,none" --cookies "cookies-crunchyroll-com.txt" -a "LinksCR.txt"
[debug] Command-line config: ['-vU', '-F', '--extractor-args', 'crunchyrollbeta:hardsub=en-US,none', '--cookies', 'cookies-crunchyroll-com.txt', '-a', 'LinksCR.txt']
[debug] Batch file urls: ['https://www.crunchyroll.com/pt-br/watch/G0DUNJKE4/scrambling-and-dripping']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[812cdfa06] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-106957-g27cffd16aa-20220521 (setts), ffprobe N-106957-g27cffd16aa-20220521
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1851 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 37e7ffe204309357cfd1388b0e2c782a30e293ddd0f2761a9a8f6afa185b3566
yt-dlp is up to date<EMAIL_ADDRESS>[crunchyroll] Extracting URL: https://www.crunchyroll.com/pt-br/watch/G0DUNJKE4/scrambling-and-dripping
[crunchyroll] Retrieving main page (lang=pt-br/)
ERROR: [crunchyroll] G0DUNJKE4: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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 708, in extract
File "yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
File "yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
File "yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
File "yt_dlp\extractor\crunchyroll.py", line 69, in _update_query
File "yt_dlp\extractor\common.py", line 1111, in _download_webpage
File "yt_dlp\extractor\common.py", line 1062, in download_content
File "yt_dlp\extractor\common.py", line 896, in _download_webpage_handle
File "yt_dlp\extractor\common.py", line 853, in _request_webpage
File "yt_dlp\extractor\common.py", line 835, in _request_webpage
File "yt_dlp\YoutubeDL.py", line 3786, 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
urllib.error.HTTPError: HTTP Error 403: Forbidden
`

Switching from Edge to a clean install of Firefox did solve the problem for me. Just to let you know.

I had the same issue yesterday evening, but later in the night, it fixed itself only to appear now back.
It is hard to conclude if it is Crunchyroll's fault or Claudfare, but with random on/off and not for everyone, I think more in Cloudfare direction.

This looks like a cloudflare issue, and I can't reproduce it. This has happened before, and has been temporary. Hopefully that's the case again.
Something you could try:
1. refresh your CR cookies in browser

2. find your browser's user-agent string; you can type "what is my user-agent" into duckduckgo, google, etc

3. pass your browser's user-agent with `--user-agent "USERAGENT"` along with `--cookies-from-browser`

Thank you very much, this worked for me on Firefox on Linux.

This looks like a cloudflare issue, and I can't reproduce it. This has happened before, and has been temporary. Hopefully that's the case again.
Something you could try:

refresh your CR cookies in browser
find your browser's user-agent string; you can type "what is my user-agent" into duckduckgo, google, etc
pass your browser's user-agent with --user-agent "USERAGENT" along with --cookies-from-browser

How can I do this on the linux terminal? Is there anyway to copy cookies from other PC to linux?

How can I do this on the linux terminal? Is there anyway to copy cookies from other PC to linux?

See the wiki for browser extension recommendations, or you can run yt-dlp --cookies-from-browser firefox --cookies cookies.txt on the other PC  and it will dump all of its cookies to cookies.txt (so be very careful with this file!).
However, if the linux pc and the other pc do not have the same IP address, the chances of this method working drop significantly

Switching from Edge to a clean install of Firefox did solve the problem for me. Just to let you know.
Edit: The usage of --user-agent was necessary to make it work on Firefox! Using --user-agent with Edge did not solve the problem.

I confirm that using firefox as source of cookies and user-agent works. This seems to be a change on how CR are handling incoming requests. Probably related on how it is interpreting what is "genuine" and what is not. This may be caused by how yt-dlp handle this. I have no knoledge in this but at least it's a clue of what could be the problem now that CR seems to be exploiting this...

For some context: this 403 issue originally showed up last year, right after the site fully migrated from the old API to the "beta" API. I wrote about it here: https://github.com/yt-dlp/yt-dlp/pull/5294#issuecomment-1289735453
It has popped up a few times since then, but those times it was only a transient/temporary issue. It seems to be more widespread and long-lasting this time.
It's cloudflare fingerprinting. But if you have cookies from a browser that already has "passed" the cloudflare test, you can circumvent the fingerprint check by passing those cookies and the same user-agent as the browser. It's possible that only Firefox has been reported to work because there are additional http header checks done for chromium-based browsers (Sec-CH-UA etc maybe?)

For some context: this 403 issue originally showed up last year, right after the site fully migrated from the old API to the "beta" API. I wrote about it here: #5294 (comment) It has popped up a few times since then, but those times it was only a transient/temporary issue. It seems to be more widespread and long-lasting this time.
It's cloudflare fingerprinting. But if you have cookies from a browser that already has "passed" the cloudflare test, you can circumvent the fingerprint check by passing those cookies and the same user-agent as the browser. It's possible that only Firefox has been reported to work because there are additional http header checks done for chromium-based browsers (Sec-CH-UA etc maybe?)

I got a warning at CR site today about merging lists from Funimation. Maybe that's why things are strange. But also can't discard that yt-dlp have a problem because yt-dlp can't login directly anymore and no browser is failing in accessing CR.

yt-dlp can't login directly anymore

This is because of the cloudflare fingerprinting. It's detecting that yt-dlp isn't a browser and blocking it. Hence the need to pass the user-agent and cookies from a browser.

yt-dlp can't login directly anymore

This is because of the cloudflare fingerprinting. It's detecting that yt-dlp isn't a browser and blocking it. Hence the need to pass the user-agent and cookies from a browser.

I tested the MrKrabat's KODI plugin (that isn't update for some years now) and it's working fine. And also isn't a browser. So maybe something else is the problem.

@tamodolo are you still able to download from CR? I've tried downloading firefox to test on it but still getting 403.
cmd line:
yt-dlp -vU "https://www.crunchyroll.com/pt-br/watch/GJWU2EK7Z/sparkling-fresh" --user-agent {myUserAgent} --cookie-from-web firefox
doesn't matter firefox // chrome // edge they are the same issue.

I confirm that using firefox as source of cookies and user-agent works.

Seems after a while it also get 403 then need to open the browser and refresh the page then it work again.

I suspect that the Crunchyroll Cookies have been shortened to be valid for only 30 minutes. I was able to get downloads using the --user-agent "USERAGENT" along with --cookies-from-browser firefox, however it started to fail about 30 minutes in to downloads.
[download] 100% of    1.38GiB in 00:03:32 at 6.65MiB/s [Metadata] Adding metadata to "downloads\Wandering_Witch_-_The_Journey_of_Elaina\01\002 - The_Land_of_Mages(8).mp4" [crunchyroll] Extracting URL: https://www.crunchyroll.com/watch/G14U4E27X/the-girl-as-pretty-as-a-flower--bottled-happiness [crunchyroll] Authenticating with grant_type=etp_rt_cookie ERROR: [crunchyroll] G14U4E27X: 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/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
I then refreshed Firefox and played a short video segment and then it allowed me to download again for 30 minutes before failing again (Approx 8 episodes). Rinse and repeat the actions.
If you are playing through a recognized browser the browser would automatically update the authentication cookie upon trying to play a video. yt-dlp does not automatically refresh cookies from the site.
I am now limiting myself to 7 - 8 downloads at a time.

@tamodolo are you still able to download from CR? I've tried downloading firefox to test on it but still getting 403.
cmd line: yt-dlp -vU "https://www.crunchyroll.com/pt-br/watch/GJWU2EK7Z/sparkling-fresh" --user-agent {myUserAgent} --cookie-from-web firefox
doesn't matter firefox // chrome // edge they are the same issue.

@BraveSail got a working solution for that. It's was the same here until I opened firefox.
@livelife68 I run 2 downloads at once. But not dare to try more than that.

I tried to use selenium to force the cr page refresh. the cloudflare captcha appeared, whitout solve it still get the 403 error

I've got the same problem from germany with credential and also cookie authentication. On Monday it still worked, so i think its like suggested that crunchyroll/cloudflare changed something.
credentials:
[debug] Command-line config: ['-vU', '-f', 'best', '--user-agent', 'Firefox', '--username', 'PRIVATE', '--password', 'PRIVATE', '--ffmpeg-location', '.\\ffmpeg\\bin\\ffmpeg.exe', '--batch-file', '.\\links.txt']
[debug] Batch file urls: ['https://www.crunchyroll.com/de/watch/GG1U2ZNEV/ray-of-despair-ray-of-hope', 'https://www.crunchyroll.com/de/watch/G7PU4J108/miranjo-and-the-demon--the-prince-and-his-treasures']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[812cdfa06] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-03-24-git-28d011516b-full_build-www.gyan.dev (setts), ffprobe 2022-03-24-git-28d011516b-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
WARNING: "-f best" selects the best pre-merged format which is often not the best option.
         To let yt-dlp download and merge the best available formats, simply do not pass any format selection.
         If you know what you are doing and want only the best pre-merged format, use "-f b" instead to suppress this warning
[debug] Loaded 1851 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 37e7ffe204309357cfd1388b0e2c782a30e293ddd0f2761a9a8f6afa185b3566
yt-dlp is up to date<EMAIL_ADDRESS>[crunchyroll] Getting session id
[crunchyroll] Logging in
[crunchyroll] Extracting URL: https://www.crunchyroll.com/de/watch/GG1U2ZNEV/ray-of-despair-ray-of-hope
[crunchyroll] Retrieving main page (lang=de/)
ERROR: [crunchyroll] GG1U2ZNEV: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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 708, in extract
  File "yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
  File "yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
  File "yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
  File "yt_dlp\extractor\crunchyroll.py", line 69, in _update_query
  File "yt_dlp\extractor\common.py", line 1111, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1062, in download_content
  File "yt_dlp\extractor\common.py", line 896, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 853, in _request_webpage

  File "yt_dlp\extractor\common.py", line 835, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3786, 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
urllib.error.HTTPError: HTTP Error 403: Forbidden

cookies (also tried the --cookie-from-web firefox option):
[debug] Command-line config: ['-vU', '-f', 'best', '--user-agent', 'firefox', '--cookies', '.\\cookies.txt', '--ffmpeg-location', '.\\ffmpeg\\bin\\ffmpeg.exe', '--batch-file', '.\\links.txt']
[debug] Batch file urls: ['https://www.crunchyroll.com/de/watch/GG1U2ZNEV/ray-of-despair-ray-of-hope', 'https://www.crunchyroll.com/de/watch/G7PU4J108/miranjo-and-the-demon--the-prince-and-his-treasures']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[812cdfa06] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-03-24-git-28d011516b-full_build-www.gyan.dev (setts), ffprobe 2022-03-24-git-28d011516b-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
WARNING: "-f best" selects the best pre-merged format which is often not the best option.
         To let yt-dlp download and merge the best available formats, simply do not pass any format selection.
         If you know what you are doing and want only the best pre-merged format, use "-f b" instead to suppress this warning
[debug] Loaded 1851 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 37e7ffe204309357cfd1388b0e2c782a30e293ddd0f2761a9a8f6afa185b3566
yt-dlp is up to date<EMAIL_ADDRESS>[crunchyroll] Extracting URL: https://www.crunchyroll.com/de/watch/GG1U2ZNEV/ray-of-despair-ray-of-hope
[crunchyroll] Retrieving main page (lang=de/)
ERROR: [crunchyroll] GG1U2ZNEV: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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 708, in extract
  File "yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
  File "yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
  File "yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
  File "yt_dlp\extractor\crunchyroll.py", line 69, in _update_query
  File "yt_dlp\extractor\common.py", line 1111, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1062, in download_content
  File "yt_dlp\extractor\common.py", line 896, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 853, in _request_webpage

  File "yt_dlp\extractor\common.py", line 835, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3786, 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
urllib.error.HTTPError: HTTP Error 403: Forbidden

Now I can only open the firefox and login to crunchyroll then use yt-dlp with --cookie-from-web firefox  and same IP address to avoid the 403 error.

My Firefox useragent string was out of date by a version. Updating it to match the browser the cookies came from solved it.

So i am on Windows 10 on Version 2023.06.22 of yt-dlp using following command (cookies on Firefox already remove and renewed for crunchyroll):
.\yt-dlp.exe -vU -f best --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0" --cookies-from-browser firefox --cookies .\auto_cookies.txt --ffmpeg-location .\ffmpeg\bin\ffmpeg.exe --batch-file .\links.txt
and trying to download some german dubbed episodes and getting the following error:
ERROR: [crunchyroll] GG1U2ZNEV: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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 708, in extract
  File "yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
  File "yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
  File "yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
  File "yt_dlp\extractor\crunchyroll.py", line 69, in _update_query
  File "yt_dlp\extractor\common.py", line 1111, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1062, in download_content
  File "yt_dlp\extractor\common.py", line 896, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 853, in _request_webpage

  File "yt_dlp\extractor\common.py", line 835, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3786, 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
urllib.error.HTTPError: HTTP Error 403: Forbidden

Anybody got any suggestions what the problem could be?

@moeter87-real Could you test this method after half hour or an hour without renew the cookie manually?

Update:
Ok it works now but not with the --cookies-from-browser firefox option. I've extracted the cookies with a browser addon on Firefox and used that cookie file and that worked. So the command that worked for me:

Same here. I use the Add-On cookies.txt, login in Crunchyroll, open a Stream and play it for five Seconds. Then export the Cookies with the Add-On and start the download
yt-dlp --cookies cookies.txt
--user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
--write-description
--write-thumbnail
--sub-langs "de-DE"
--extractor-args "crunchyrollbeta:hardsub=de-DE" $URL1 $URL2 $URL3
In a second window i tried the same. And: Wow this works.
moeter87-real: You are my Hero. The Tip with the Add-On helps. Thank You.

I used the "--user-agent" of my browser in the command, and it worked correctly! Thank you for the tips.

So i am on Windows 10 on Version 2023.06.22 of yt-dlp using following command (cookies on Firefox already remove and renewed for crunchyroll):
.\yt-dlp.exe -vU -f best --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0" --cookies-from-browser firefox --cookies .\auto_cookies.txt --ffmpeg-location .\ffmpeg\bin\ffmpeg.exe --batch-file .\links.txt

I don't use cookies from browser but if you do aren't you meant to omit --cookies ?

Update:

EDIT: After 30 Minutes you get ERROR 403 again. After refresh it works.

Confirmed but not only that.
It seems that the cookies get updated every time a new video is played.

Strange, the error occurred again
I thought it was resolved just by using the --user-agent, I have no idea what it could be.

Strange, the error occurred again I thought it was resolved just by using the --user-agent, I have no idea what it could be.

You need to refresh the cookies directly on firefox. Open something and it'll work again. yt-dlp need to implement this feature to work without this.

It worked when I did it the way you mentioned. However, for me, it only works if I use the same type of user agent that was used to generate the cookies. In other words, cookies from the Firefox browser only worked for me with "--user-agent "firefox"", whereas using the "edge" agent resulted in an error 🤔

To clarify it to everyone: Crunchyroll has changed the access to the videos. You need a cookie that is at max. 30 minutes old and includes your login to the page. The cookie itself is updated everytime you open a CR Website in your browser. If you open a link with yt-dlp the cookies aren't updated, because yt-dlp is not a browser itself and just uses the cookies of the browser you give in the options. And at least on my system, I have to use Firefox at the moment, because Edge does not work, even if I use --cookies-from-browser edge and the correct --user-agent option for my browser.
I don't think, this can be updated in yt-dlp easily to work like before. yt-dlp isn't a full feature web-browser and I wonder if it will be possible at all to keep the cookie updated by yt-dlp.
So as far as I see, there's only one option to download from CR at this time:

use Firefox
have an up to date cookie for CR website (max. 30 minutes old)
use --cookies-from-browser firefox
use --user-agent "..."
the value of the --user-agent option must fit to the browser, you generated the cookie with

If you know any other working scenario, feel free to report here.

If you try http://www.crunchyroll.com/media-904606 or older links like http://www.crunchyroll.com/fatestrange-fake-whispers-of-dawn-/fatestrange-fake-whispers- of-dawn-english-dub-unknown-904606 This error will not occur but once the new version of the link https://www.crunchyroll.com/watch/G9DUEG0ZD/ is used, a 403 error will appear

To clarify it to everyone: Crunchyroll has changed the access to the videos. You need a cookie that is at max. 30 minutes old and includes your login to the page. The cookie itself is updated everytime you open a CR Website in your browser. If you open a link with yt-dlp the cookies aren't updated, because yt-dlp is not a browser itself and just uses the cookies of the browser you give in the options. And at least on my system, I have to use Firefox at the moment, because Edge does not work, even if I use --cookies-from-browser edge and the correct --user-agent option for my browser.
I don't think, this can be updated in yt-dlp easily to work like before. yt-dlp isn't a full feature web-browser and I wonder if it will be possible at all to keep the cookie updated by yt-dlp.
So as far as I see, there's only one option to download from CR at this time:

use Firefox
have an up to date cookie for CR website (max. 30 minutes old)
use --cookies-from-browser firefox
use --user-agent "..."
the value of the --user-agent option must fit to the browser, you generated the cookie with

If you know any other working scenario, feel free to report here.

Or yt-dlp could implement the console API instead. But the mice and cat struggle probably will make it won't work anymore for MrKrabat's KODI unoficial plugin. Also, I don't know if it's possible to download soft subs with this method.

Hello,
I found a workaround.
I try with ytdl-patched version<EMAIL_ADDRESS>(need more test with yt-dlp)
ytdl-patched --cookies-from-browser firefox --socket-timeout 120 --cookies cookies.txt -U https://www.crunchyroll.com/fatestrange-fake-whispers-of-dawn-/fatestrange-fake-whispers-of-dawn-inconnue-904607 --no-download -s --user-agent 'Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0' --no-update

[Cookies] Extracting cookies from firefox
[Cookies] Extracted 32 cookies from firefox
[generic] Extracting URL: https://www.crunchyroll.com/fr/fatestrange-fake-whispers-of-dawn-/fatestrange-fake-whispers-of-dawn-inconnue-904607
[generic] fatestrange-fake-whispers-of-dawn-inconnue-904607: Downloading webpage
[redirect] Following redirect to https://www.crunchyroll.com/watch/GX9UQZE17/
[crunchyroll] Extracting URL: https://www.crunchyroll.com/watch/GX9UQZE17/
[crunchyroll] Retrieving main page (lang=None)
[crunchyroll] Authenticating with grant_type=etp_rt_cookie
[crunchyroll] GX9UQZE17: Downloading object info JSON (cms)
[crunchyroll] Retrieving signed policy
[crunchyroll] GX9UQZE17: Downloading stream info JSON (signed cms)
[crunchyroll] To get all formats of a hardsub language, use "--extractor-args crunchyrollbeta:hardsub=<language_code or all>". See https://github.com/yt-dlp/yt-dlp#crunchyrollbeta-crunchyroll for more info
[crunchyroll] GX9UQZE17: Downloading adaptive_hls HLS manifest
[crunchyroll] GX9UQZE17: Downloading chapter info
[info] GX9UQZE17: Downloading 1 format(s): adaptive_hls-8100

But if i try with http:// it doesn't work anymore.
[Cookies] Extracting cookies from firefox
[Cookies] Extracted 32 cookies from firefox
[generic] Extracting URL: http://www.crunchyroll.com/fr/fatestrange-fake-whispers-of-dawn-/fatestrange-fake-whispers-of-dawn-inconnue-904607
[generic] fatestrange-fake-whispers-of-dawn-inconnue-904607: Downloading webpage
ERROR: [generic] None: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on  https://github.com/ytdl-patched/ytdl-patched/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U

@ArturiaPendragon What is this ytdlp patched you're using?

@tamodolo ytdlp-patched 2<IP_ADDRESS>8268193 or 2<IP_ADDRESS>6453250 works for me.
Found here : https://github.com/ytdl-patched/ytdl-patched/releases/tag/2<IP_ADDRESS>8268193

Thanks! But just to be sure as I didn't understood the workaround you found was for as https is the default behavior on yt-dlp. The workaround you found was for the 30 minute cookies limit or for something else?

I use by default the RSS from Crunchyroll and it's http and not https, when i tried with https + ytdlp-patched with --cookies-from-browser firefox --cookies cookies.txt it's works again for me. (So, its my workaround for 403 Forbidden ;))

Use cookies and user agent from a legit browser. That worked for me.

Will there anything be done about this. Or can anything be done?

Will there anything be done about this. Or can anything be done?

As for a no input workaround I just added a pass to my script that open firefox on CR main site. It's working but it's not ideal. Just a dirty patch.

What about the ytdlp-patched WA?

What about the ytdlp-patched WA?

They did one? afaik it works the same and have the same problem as MASTER.

My bad, I just read that it worked but not tried. Anyway the selenium trick restarting CR site did not worked for me

My bad, I just read that it worked but not tried. Anyway the selenium trick restarting CR site did not worked for me

You need to use firefox as browser and pass the user agent. Something like this:
--cookies-from-browser firefox --user-agent "put it here quotes included". You can get your user agent on duckduckgo asking "what is my user agent"

I know, already using --cookies-from-browser  and --user-agent since last year but after 8 dwl ore 30 minutes i need to refresh

I know, already using --cookies-from-browser and --user-agent since last year but after 8 dwl ore 30 minutes i need to refresh

yeah, that's why I put that in my script. I finish long queues with a firefox filled with tabs of CR.

For me it's working fine with ytdl-patched (works for last days)

from curl_cffi import requests

requests.get(
        url,
        impersonate="chrome110",
    )

Setting like I do when requesting resolves this issue

from curl_cffi import requests

requests.get(
        url,
        impersonate="chrome110",
    )

Setting like I do when requesting resolves this issue

Can you please elaborate on how/where exactly you perform this setting?

from curl_cffi import requests

requests.get(
        url,
        impersonate="chrome110",
    )

Setting like I do when requesting resolves this issue

we have discussed about the possibility adding support for curl-impersonate sometime in the future. requires #2861 and some other things to be done before though.

Another way is to request api through beta-api.crunchyroll.com without being intercepted (but this method can only request api)

I somehow still can't reproduce this (I don't have an account):
yt-dlp https://www.crunchyroll.com/watch/G64P1GE8R/fortune-is-unpredictable-and-mutable --simulate --verbose
[debug] Command-line config: ['https://www.crunchyroll.com/watch/G64P1GE8R/fortune-is-unpredictable-and-mutable', '--simulate', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[92315c037] (linux_exe)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-6.4.2-surface-x86_64-with-glibc2.37 (OpenSSL 3.1.1 30 May 2023, glibc 2.37)
[debug] exe versions: ffmpeg 5.1.2 (setts), ffprobe 5.1.2, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[crunchyroll] Extracting URL: https://www.crunchyroll.com/watch/G64P1GE8R/fortune-is-unpredictable-and-mutable
[crunchyroll] Retrieving main page (lang=None)
[debug] [crunchyroll] Using cxApiParam=cr_web
[crunchyroll] Authenticating with grant_type=client_id
[crunchyroll] G64P1GE8R: Downloading object info JSON (cms)
[crunchyroll] Retrieving signed policy
[crunchyroll] G64P1GE8R: Downloading stream info JSON (signed cms)
[crunchyroll] To get all formats of a hardsub language, use "--extractor-args crunchyrollbeta:hardsub=<language_code or all>". See https://github.com/yt-dlp/yt-dlp#crunchyrollbeta-crunchyroll for more info
[crunchyroll] G64P1GE8R: Downloading adaptive_hls HLS manifest
[crunchyroll] G64P1GE8R: Downloading chapter info
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] G64P1GE8R: Downloading 1 format(s): adaptive_hls-6560

As for a no input workaround I just added a pass to my script that open firefox on CR main site. It's working but it's not ideal. Just a dirty patch.

For those who love using scripts, I believe curl is capable of generating valid cookies if you pass an invalid user agent to it. For example, this should work, but I can't test it:
curl https://www.crunchyroll.com/ -c crunchyrollcookies.txt -H "User-Agent: ujhgtfjhgfbv" > /dev/null
yt-dlp URL --cookies crunchyrollcookies.txt --add-header "User-Agent: ujhgtfjhgfbv"

(don't bother editing the URL sent to Curl, any Crunchyroll URL should generate working cookies)

On that note, I highly doubt this will work, but can someone who's experiencing this issue please test if --add-header "User-Agent: ujhgtfjhgfbv" (and no cookies) fixes it

from curl_cffi import requests

requests.get(
        url,
        impersonate="chrome110",
    )

Setting like I do when requesting resolves this issue

we have discussed about the possibility adding support for curl-impersonate sometime in the future. requires #2861 and some other things to be done before though.

This is not the setting of yt-dlp. I am a program that accesses the crunchyroll api. If I do it like this, I can access it normally, otherwise there will be a 403 error.

I'm sure this is the correct solution

Yes, adding support for Curl Impersonate is the ultimate solution to this problem. It can't be added until https://github.com/yt-dlp/yt-dlp/pull/2861 is merged, but that PR is actually extremely close to being ready to be merged!

It can't be added until #2861 is merged, but that PR is actually extremely close to being ready to be merged!

It only adds the framework that would be needed to support this. Actually adding support would be quite a ways away.

On that note, I highly doubt this will work, but can someone who's experiencing this issue please test if --add-header "User-Agent: ujhgtfjhgfbv" (with no cookies) fixes it

Doesent work for me :/

On that note, I highly doubt this will work, but can someone who's experiencing this issue please test if --add-header "User-Agent: ujhgtfjhgfbv" (with no cookies) fixes it

Also, can someone please test if cookies from Brave browser work, since Brave is based on Chrome but seems to send less headers

Also doesent work FOR ME :/

Also doesent work for me :/

Did you pass Brave's --user-agent, after visiting Crunchyroll at least once?

whoops, visiting crunchyroll once won't work, you have to have visited it within the last few minutes
Do you get a "checking your browser" page every time you visit crunchyroll in brave?

For me: yes - I can't even pass this "checking your browser" page from Brave browser.

@rdamas do you have javascript disabled or something?
Also, can you access kick.com (an unrelated site that also uses cloudflare ddos protection)

No, kick.com has the same issues. No, javascript is enabled, and joyn.de (e.g.) works perfectly well in brave with the same settings.

It's somewhat a waste of time disabling javascript nowadays. You can't possible scape it anymore. The internet is javascript now. So disabling it will give more headaches that will solve without it. Also, the extra "privacy" you think it gives is ilusion. You put a cable in your PC, end of privacy period.

@rdamas does kick.com work in guest mode (click the 3 lines in the top right and then click open guest window, which is on top of the zoom controls)?
It sounds like you have some setting that's making cloudflare DDOS protection hate you, and I'm really curious what that setting is? Are you using a VPN? Do you get that same screen in a different browser (in incognito mode)?

Works in private mode of the browser; it seems they can detect the installed "VideoDownloadHelper" extension. When deactivated, kick.com works.
Crunchyroll is usable in private mode as well, and I could download a video with yt-dlp using --cookies-from-browser brave and braves' user agent string. Platform: MacOs.

I could download a video with yt-dlp using --cookies-from-browser brave and braves' user agent string

So, just to clarify, the download works with --cookies-from-browser brave (with brave's user agent, right after visiting the site and going through that screen), but not --cookies-from-browser chrome (with chrome's user-agent, right after visiting the site and going through that screen)?
If that's the case, can you please compare https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending in both browsers, and try passing all the headers that only chrome has to yt-dlp, using --add-header 'HEADER: VALUE' (eg --add-header 'SEC-CH-UA: "Not.A/Brand";v="8", "Chromium";v="114"')

Need to reinstall chrome first - haven't used chrome since ages. I'll check.

If anyone can reproduce this and can test if https://github.com/yt-dlp/yt-dlp/pull/7595 can help to fix this that would be greatly appreciated.
In this dev branch you can hackily force curl-impersonate to be used for all urls with a env var like:
YT_DLP_CCI_IMPERSONATE=chrome110 yt-dlp -v URL

Same cookie file, same machine,
NOT WORKING using Windows, command running in Powershell (yt-dlp --version, 2023.07.06)

-v output.
[debug] Command-line config: ['--cookies', 'D:/Crunchyroll/www.crunchyroll.com_cookies.txt', '--print', '%(season_number)s;%(season)s;%(episode_number)s;%(episode)s;%(webpage_url)s;%(playlist_autonumber)s', '--no-download', '--no-warnings', '--match-filter', 'language=ja-JP', '--extractor-args', 'crunchyrollbeta:hardsub=es-ES', 'https://www.crunchyroll.com/es/series/G63K98PZ6/one-punch-man', '-v']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481] (pip)
[debug] Python 3.11.4 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1u  30 May 2023)
[debug] exe versions: phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[crunchyroll:playlist] Extracting URL: https://www.crunchyroll.com/es/series/G63K98PZ6/one-punch-man
[crunchyroll:playlist] Retrieving main page (lang=es/)
ERROR: [crunchyroll:playlist] G63K98PZ6: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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 "C:\Python311\Lib\site-packages\yt_dlp\extractor\common.py", line 710, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\crunchyroll.py", line 476, in _real_extract
    **traverse_obj(self._call_api(f'series/{internal_id}', internal_id, lang, 'series'), ('data', 0, {
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
    result = self._call_base_api(
             ^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
    self._update_query(lang)
  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\crunchyroll.py", line 69, in _update_query
    webpage = self._download_webpage(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\common.py", line 1113, in _download_webpage
    return self.__download_webpage(url_or_request, video_id, note, errnote, None, fatal, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\common.py", line 1064, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\common.py", line 898, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\common.py", line 855, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "C:\Python311\Lib\site-packages\yt_dlp\extractor\common.py", line 837, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3863, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\urllib\request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Python311\Lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

WORKING using Ubuntu, command running in WSL2 ubuntu shell (yt-dlp --version, 2023.07.06)

-v output
[debug] Command-line config: ['--cookies', '/mnt/d/Crunchyroll/www.crunchyroll.com_cookies.txt', '--print', '%(season_number)s;%(season)s;%(episode_number)s;%(episode)s;%(webpage_url)s;%(playlist_autonumber)s', '--no-download', '--no-warnings', '--match-filter', 'language=ja-JP', '--extractor-args', 'crunchyrollbeta:hardsub=es-ES', 'https://www.crunchyroll.com/es/series/G63K98PZ6/one-punch-man', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481]
[debug] Lazy loading extractors is disabled
[debug] Python 3.10.6 (CPython x86_64 64bit) - Linux-<IP_ADDRESS>-microsoft-standard-WSL2-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, secretstorage-3.3.1, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[crunchyroll:playlist] Extracting URL: https://www.crunchyroll.com/es/series/G63K98PZ6/one-punch-man
[crunchyroll:playlist] Retrieving main page (lang=es/)
[debug] [crunchyroll:playlist] Using cxApiParam=cr_web
[crunchyroll:playlist] Authenticating with grant_type=client_id
[crunchyroll:playlist] G63K98PZ6: Downloading series JSON (cms)
[download] Downloading playlist: One-Punch Man
[crunchyroll:playlist] Retrieving signed policy
[crunchyroll:playlist] G63K98PZ6: Downloading seasons JSON (signed cms)
[crunchyroll:playlist] GR9PC2PJX: Downloading episode list JSON (signed cms)
[crunchyroll:playlist] G6X0C47XK: Downloading episode list JSON (signed cms)
[crunchyroll:playlist] G6P509G96: Downloading episode list JSON (signed cms)
[crunchyroll:playlist] Playlist One-Punch Man: Downloading 37 items of 37
[download] One-Punch Man (French Dub) Episode 1 – El hombre más poderoso del mundo does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 2 – El androide solitario does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 3 – El científico tenaz does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 4 – El ninja moderno does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 5 – El gran profesor does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 6 – El guerrero extremo does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 7 – El aprendiz supremo does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 8 – Rey del Mar Profundo does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 9 – Justicia indomable does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 10 – Peligro sin precedentes does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 11 – Conquistador del universo does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (French Dub) Episode 12 – El mayor héroe does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 1 – El retorno del héroe does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 2 – El monstruo humano does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 3 – Empieza la caza does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 4 – Bate Metálico does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 5 – Torneo de artes marciales does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 6 – La sublevación de los monstruos does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 7 – Héroe de clase S does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 8 – La resistencia de los fuertes does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 9 – Las preocupaciones del más fuerte does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 10 – Asedio justiciero does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 11 – El orgullo de cada uno does not pass filter (language=ja-JP), skipping ..
[download] One-Punch Man (Season 2) (French Dub) Episode 12 – Responsabilizarse por un discípulo does not pass filter (language=ja-JP), skipping ..
[download] Downloading item 25 of 37
[crunchyroll] Extracting URL: https://www.crunchyroll.com/es/watch/GR247ZD96
[crunchyroll] GR247ZD96: Downloading object info JSON (cms)
[crunchyroll] GR247ZD96: Downloading stream info JSON (signed cms)
[crunchyroll] To get all formats of a hardsub language, use "--extractor-args crunchyrollbeta:hardsub=<language_code or all>". See https://github.com/yt-dlp/yt-dlp#crunchyrollbeta-crunchyroll for more info
[crunchyroll] GR247ZD96: Downloading adaptive_hls-hardsub-es-ES HLS manifest
[crunchyroll] GR247ZD96: Downloading chapter info
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
....

@fe80Grau cookies expire after 30 minutes. Have you run that multiple times to make sure it's not just random? Which OS and browser created the cookies?

I have tryed it. Its always 30 min after refreshing the page in your browser/ making a new request and starting the ytdlp session.

@JajajTec tried what?

Oh sorry, i was in a hurry.
I have tryed it with multiple browsers: chrome, brave, firefox
All are the same. The cookies work for 30min after the last request the browser made (refreshing/loading a link, getting a video fragment) and inport into ytdlp.
That means if you keep a video playing in the background and make ytdlp reload the cookies every 30 min, it would work no prob.

Hmm. Crunchy went through a maintenance outage about an hour ago. Now I get this error message, no matter what I try. Looks like support for Crunchy is gone for the moment...
ERROR: [crunchyroll] G14U4WXJ9: Unable to extract initial state; 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
Anyone else having this problem or is it just me?

@Killua-Zolldyck having the same problem

It's the same here now.
I tested MrKrabat's KODI plugin and still works. This plugin is amazing haha!
This is the verbose:
 yt-dlp.exe -v --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0" --cookies-from-browser firefox --sub-langs pt-BR --remux-video mkv --embed-subs https://www.crunchyroll.com/pt-br/watch/GK9U3MVX8 -o "%(season)s - %(episode_number)s.%(ext)s" --paths "C:\animetemp"
[debug] Command-line config: ['-v', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0', '--cookies-from-browser', 'firefox', '--sub-langs', 'pt-BR', '--remux-video', 'mkv', '--embed-subs', 'https://www.crunchyroll.com/pt-br/watch/GK9U3MVX8', '-o', '%(season)s - %(episode_number)s.%(ext)s', '--paths', 'C:\animetemp']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[812cdfa06] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-12-04-git-6c814093d8-full_build-www.gyan.dev (setts), ffprobe 2022-12-04-git-6c814093d8-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\tamod\AppData\Roaming\Mozilla\Firefox\Profiles\dxxfcfla.default-release-1688405545434\cookies.sqlite"
[Cookies] Extracted 228 cookies from firefox
[debug] Proxy map: {}
[debug] Loaded 1851 extractors
[crunchyroll] Extracting URL: https://www.crunchyroll.com/pt-br/watch/GK9U3MVX8
[crunchyroll] Retrieving main page (lang=pt-br/)
ERROR: [crunchyroll] GK9U3MVX8: Unable to extract initial state; 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 708, in extract
File "yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
File "yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
File "yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
File "yt_dlp\extractor\crunchyroll.py", line 72, in _update_query
File "yt_dlp\extractor\common.py", line 1270, in _search_json
File "yt_dlp\extractor\common.py", line 1256, in _search_regex
`

Good news: Cloudflare 403s are gone(?)
Bad news: crunchy has removed all locale info from the webpage html, so yt-dlp doesn't have a way of knowing the user's default language
Here's a quick patch to make the extractor not-totally-broken. Not a proper fix, though:
diff --git a/yt_dlp/extractor/crunchyroll.py b/yt_dlp/extractor/crunchyroll.py
index adb3d5dcf..ee8f86949 100644
--- a/yt_dlp/extractor/crunchyroll.py
+++ b/yt_dlp/extractor/crunchyroll.py
@@ -69,10 +69,10 @@ def _update_query(self, lang):
         webpage = self._download_webpage(
             f'{self._BASE_URL}/{lang}', None, note=f'Retrieving main page (lang={lang or None})')

-        initial_state = self._search_json(r'__INITIAL_STATE__\s*=', webpage, 'initial state', None)
+        initial_state = self._search_json(r'__INITIAL_STATE__\s*=', webpage, 'initial state', None, default={})
         CrunchyrollBaseIE._QUERY[lang] = traverse_obj(initial_state, {
             'locale': ('localization', 'locale'),
-        }) or None
+        }) or {}

         if CrunchyrollBaseIE._BASIC_AUTH:
             return

Can confirm: the patch works for me.

Compiled master with patch. Confirm that works.

Same here. Compiled with the patch from 'bashonly'. Can confirm the patch. Works fine.

Good news: Cloudflare 403s are gone(?)

They're still there if you use  --user-agent curl/7. Perhaps crunchyroll just reduced their settings :eyes:

I wonder what I am doing wrong.
I got a fresh copy from the main page, I changed lines as per bashonly suggestion.
And I am still getting 404 (even with Firefox cookies, as it worked yesterday fine)

Stack trace
[debug] Command-line config: ['--cookies-from-browser', 'edge', '-F', 'https://www.crunchyroll.com/mobile-suit-gundam-the-witch-from-mercury/episode-23-unrelenting-tenderness-905987', '--verbose']
Extracting cookies from edge
[debug] Extracting cookies from: "C:\***\AppData\Local\Microsoft\Edge\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\***\AppData\Local\Microsoft\Edge\User Data\Local State"
Extracted 2966 cookies from edge
[debug] cookie version breakdown: {'v10': 2966, 'other': 0, 'unencrypted': 0}
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481]
[debug] Lazy loading extractors is disabled
[debug] Python 3.11.2 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1s  1 Nov 2022)
[debug] exe versions: ffmpeg 6.0-essentials_build-www.gyan.dev (setts), ffprobe 6.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[generic] Extracting URL: https://www.crunchyroll.com/mobile-suit-gundam-the-witch-from-mercury/episode-23-unrelenting-tenderness-905987
[generic] episode-23-unrelenting-tenderness-905987: Downloading webpage
ERROR: [generic] None: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: Forbidden>); 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 "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\extractor\common.py", line 715, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\extractor\generic.py", line 2430, in _real_extract
    full_response = self._request_webpage(url, video_id, headers={
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\extractor\common.py", line 860, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\networking\_urllib.py", line 432, in _send
    res = opener.open(urllib_req, timeout=float(request.extensions.get('timeout') or self.timeout))

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\AlexI\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\AlexI\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "C:\Users\AlexI\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\AlexI\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\AlexI\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\YoutubeDL.py", line 4059, in urlopen
    return self._request_director.send(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\networking\common.py", line 89, in send
    response = handler.send(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\networking\_helper.py", line 203, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\networking\common.py", line 297, in send
    return self._send(request)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\networking\_urllib.py", line 437, in _send
    raise HTTPError(UrllibResponseAdapter(e.fp), redirect_loop='redirect error' in str(e)) from e
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\extractor\common.py", line 847, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\***\yt-dlp-master\yt-dlp-master\yt_dlp\YoutubeDL.py", line 4078, in urlopen
    raise _CompatHTTPError(e) from e
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden```

</details>

@Burve Try passing the --user-agent of the browser you are loading cookies from

hmm, it looks like the user agent helps. and works with edge

@bashonly I'm not used to compiling python scripts. Is there any chance, there will be a nighty release including the patch?

Not sure why but I got this error for the first time today (maybe because I was already using both --cookies 'pathto/cookies.txt' and  --user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/109.0.1518.78'
Today I got the same error as everybody else even with bashonly fix (I was able to compile my exe, but the error is the same) I think there is still a problem with the script:
`[debug] Command-line config: ['https://www.crunchyroll.com/it/watch/G50UZ10D5', '--username', 'PRIVATE', '--password', 'PRIVATE', '--write-subs', '--sub-langs', 'it-IT', '--prefer-ffmpeg', '--no-check-certificate', '--cookies', 'PathToCookieFile\cookies.txt', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/109.0.1518.78', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481] (py2exe)
[debug] Python 3.11.0 (CPython AMD64 64bit) - Windows-10-10.0.19045 (OpenSSL 1.1.1q  5 Jul 2022)
[debug] exe versions: ffmpeg git-2020-08-02-b48397e, ffprobe git-2020-08-02-b48397e, rtmpdump 2.3
[debug] Optional libraries: brotli-1.0.9, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[crunchyroll] Extracting URL: https://www.crunchyroll.com/it/watch/G50UZ10D5
[crunchyroll] Retrieving main page (lang=it/)
ERROR: [crunchyroll] G50UZ10D5: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: Forbidden>); 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.pyc", line 715, in extract
File "yt_dlp\extractor\crunchyroll.pyc", line 320, in _real_extract
File "yt_dlp\extractor\crunchyroll.pyc", line 114, in _call_api
File "yt_dlp\extractor\crunchyroll.pyc", line 99, in _call_base_api
File "yt_dlp\extractor\crunchyroll.pyc", line 69, in _update_query
File "yt_dlp\extractor\common.pyc", line 1118, in _download_webpage
File "yt_dlp\extractor\common.pyc", line 1069, in download_content
File "yt_dlp\extractor\common.pyc", line 903, in _download_webpage_handle
File "yt_dlp\extractor\common.pyc", line 860, in _request_webpage
File "yt_dlp\networking_urllib.pyc", line 432, in _send
File "urllib\request.pyc", line 525, in open
File "urllib\request.pyc", line 634, in http_response
File "urllib\request.pyc", line 563, in error
File "urllib\request.pyc", line 496, in _call_chain
File "urllib\request.pyc", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 403: Forbidden
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "yt_dlp\YoutubeDL.pyc", line 4059, in urlopen
File "yt_dlp\networking\common.pyc", line 89, in send
File "yt_dlp\networking_helper.pyc", line 203, in wrapper
File "yt_dlp\networking\common.pyc", line 297, in send
File "yt_dlp\networking_urllib.pyc", line 437, in _send
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "yt_dlp\extractor\common.pyc", line 847, in _request_webpage
File "yt_dlp\YoutubeDL.pyc", line 4078, in urlopen
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden`

Not sure why but I got this error for the first time today (maybe because I was already using both --cookies 'pathto/cookies.txt' and --user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/109.0.1518.78' Today I got the same error as everybody else even with bashonly fix (I was able to compile my exe, but the error is the same) I think there is still a problem with the script:
[debug] Command-line config: ['https://www.crunchyroll.com/it/watch/G50UZ10D5', '--username', 'PRIVATE', '--password', 'PRIVATE', '--write-subs', '--sub-langs', 'it-IT', '--prefer-ffmpeg', '--no-check-certificate', '--cookies', 'PathToCookieFile\\cookies.txt', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/109.0.1518.78', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481] (py2exe)
[debug] Python 3.11.0 (CPython AMD64 64bit) - Windows-10-10.0.19045 (OpenSSL 1.1.1q  5 Jul 2022)
[debug] exe versions: ffmpeg git-2020-08-02-b48397e, ffprobe git-2020-08-02-b48397e, rtmpdump 2.3
[debug] Optional libraries: brotli-1.0.9, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[crunchyroll] Extracting URL: https://www.crunchyroll.com/it/watch/G50UZ10D5
[crunchyroll] Retrieving main page (lang=it/)
ERROR: [crunchyroll] G50UZ10D5: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: Forbidden>); 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.pyc", line 715, in extract
  File "yt_dlp\extractor\crunchyroll.pyc", line 320, in _real_extract
  File "yt_dlp\extractor\crunchyroll.pyc", line 114, in _call_api
  File "yt_dlp\extractor\crunchyroll.pyc", line 99, in _call_base_api
  File "yt_dlp\extractor\crunchyroll.pyc", line 69, in _update_query
  File "yt_dlp\extractor\common.pyc", line 1118, in _download_webpage
  File "yt_dlp\extractor\common.pyc", line 1069, in download_content
  File "yt_dlp\extractor\common.pyc", line 903, in _download_webpage_handle
  File "yt_dlp\extractor\common.pyc", line 860, in _request_webpage

  File "yt_dlp\networking\_urllib.pyc", line 432, in _send
  File "urllib\request.pyc", line 525, in open
  File "urllib\request.pyc", line 634, in http_response
  File "urllib\request.pyc", line 563, in error
  File "urllib\request.pyc", line 496, in _call_chain
  File "urllib\request.pyc", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.pyc", line 4059, in urlopen
  File "yt_dlp\networking\common.pyc", line 89, in send
  File "yt_dlp\networking\_helper.pyc", line 203, in wrapper
  File "yt_dlp\networking\common.pyc", line 297, in send
  File "yt_dlp\networking\_urllib.pyc", line 437, in _send
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "yt_dlp\extractor\common.pyc", line 847, in _request_webpage
  File "yt_dlp\YoutubeDL.pyc", line 4078, in urlopen
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden

bashonly fix only the initial state, for 403 the workaround is to use a cookie form the browser.

Not sure why but I got this error for the first time today (maybe because I was already using both --cookies 'pathto/cookies.txt' and --user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/109.0.1518.78' Today I got the same error as everybody else even with bashonly fix (I was able to compile my exe, but the error is the same) I think there is still a problem with the script:
[debug] Command-line config: ['https://www.crunchyroll.com/it/watch/G50UZ10D5', '--username', 'PRIVATE', '--password', 'PRIVATE', '--write-subs', '--sub-langs', 'it-IT', '--prefer-ffmpeg', '--no-check-certificate', '--cookies', 'PathToCookieFile\\cookies.txt', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/109.0.1518.78', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481] (py2exe)
[debug] Python 3.11.0 (CPython AMD64 64bit) - Windows-10-10.0.19045 (OpenSSL 1.1.1q  5 Jul 2022)
[debug] exe versions: ffmpeg git-2020-08-02-b48397e, ffprobe git-2020-08-02-b48397e, rtmpdump 2.3
[debug] Optional libraries: brotli-1.0.9, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[crunchyroll] Extracting URL: https://www.crunchyroll.com/it/watch/G50UZ10D5
[crunchyroll] Retrieving main page (lang=it/)
ERROR: [crunchyroll] G50UZ10D5: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: Forbidden>); 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.pyc", line 715, in extract
  File "yt_dlp\extractor\crunchyroll.pyc", line 320, in _real_extract
  File "yt_dlp\extractor\crunchyroll.pyc", line 114, in _call_api
  File "yt_dlp\extractor\crunchyroll.pyc", line 99, in _call_base_api
  File "yt_dlp\extractor\crunchyroll.pyc", line 69, in _update_query
  File "yt_dlp\extractor\common.pyc", line 1118, in _download_webpage
  File "yt_dlp\extractor\common.pyc", line 1069, in download_content
  File "yt_dlp\extractor\common.pyc", line 903, in _download_webpage_handle
  File "yt_dlp\extractor\common.pyc", line 860, in _request_webpage

  File "yt_dlp\networking\_urllib.pyc", line 432, in _send
  File "urllib\request.pyc", line 525, in open
  File "urllib\request.pyc", line 634, in http_response
  File "urllib\request.pyc", line 563, in error
  File "urllib\request.pyc", line 496, in _call_chain
  File "urllib\request.pyc", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.pyc", line 4059, in urlopen
  File "yt_dlp\networking\common.pyc", line 89, in send
  File "yt_dlp\networking\_helper.pyc", line 203, in wrapper
  File "yt_dlp\networking\common.pyc", line 297, in send
  File "yt_dlp\networking\_urllib.pyc", line 437, in _send
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "yt_dlp\extractor\common.pyc", line 847, in _request_webpage
  File "yt_dlp\YoutubeDL.pyc", line 4078, in urlopen
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden

This is the prior error 403 this topic is about. To workaround it use a real browser cache (command --cookies-from-browser). Firefox and Edge are known to work (I didn't tested Edge but Firefox works here). You need to use that with it's real --user-agent. You can get what it the browser user agent by searching "What is my user agent" in duckduckgo search engine. Then log in on CR using firefox and try to use yt-dlp (cookies last for 30 minutes)

bashonly fix only the initial state, for 403 the workaround is to use a cookie form the browser.

Ah so the cookie generated by yt-dlp will not work?
Also I notice it now that my cookie generated is edited by yt-dlp when I use --cookie 'pathtocookie'... not sure why... I used to just create that file from my webview in my own interface so I'm not sure if I can still use my own or of I need to use yt-dlp generated file

bashonly fix only the initial state, for 403 the workaround is to use a cookie form the browser.

Ah so the cookie generated by yt-dlp will not work? Also I notice it now that my cookie generated is edited by yt-dlp when I use --cookie 'pathtocookie'... not sure why... I used to just create that file from my webview in my own interface so I'm not sure if I can still use my own or of I need to use yt-dlp generated file

yt-dlp isn't a real browser so it won't update the cookies ever. User firefox instead and the commands I wrote in my previous comment.

yt-dlp isn't a real browser so it won't update the cookies ever. User firefox instead and the commands I wrote in my previous comment.

Ok I got the initial state error now (so I should be able to fix it with bashonly fix
But I still got a question.
Since I can still generate a cookie.txt file from a real browser (a webview that use edge)... how can I use that file instead of the one generated by yt-dlp or from a supported browser? In previous version yt-dlp did not generate a cookie.txt file when I used --cookie it just readed my file... now it will ovverride it... I think my own cookie file should work file. Do you know if there is any way to use it?

yt-dlp isn't a real browser so it won't update the cookies ever. User firefox instead and the commands I wrote in my previous comment.

Ok I got the initial state error now (so I should be able to fix it with bashonly fix But I still got a question. Since I can still generate a cookie.txt file from a real browser (a webview that use edge)... how can I use that file instead of the one generated by yt-dlp or from a supported browser? In previous version yt-dlp did not generate a cookie.txt file when I used --cookie it just readed my file... now it will ovverride it... I think my own cookie file should work file. Do you know if there is any way to use it?

Because CR limit cookies to 30 minutes you'll have to generate cookies.txt whatever you want to use yt-dlp. It's an extra step doing that way. Just leave Firefox logged at your account and open CR site when you want to use yt-dlp. If you have a script that calls yt-dlp, add a line to open firefox on CR site and that's it.

yt-dlp isn't a real browser so it won't update the cookies ever. User firefox instead and the commands I wrote in my previous comment.

Ok I got the initial state error now (so I should be able to fix it with bashonly fix But I still got a question. Since I can still generate a cookie.txt file from a real browser (a webview that use edge)... how can I use that file instead of the one generated by yt-dlp or from a supported browser? In previous version yt-dlp did not generate a cookie.txt file when I used --cookie it just readed my file... now it will ovverride it... I think my own cookie file should work file. Do you know if there is any way to use it?

Because CR limit cookies to 30 minutes you'll have to generate cookies.txt whatever you want to use yt-dlp. It's an extra step doing that way. Just leave Firefox logged at your account and open CR site when you want to use yt-dlp. If you have a script that calls yt-dlp, add a line to open firefox on CR site and that's it.

I don't need to... My interface just extract a cookies.txt file pressing a button from my webview and it will also extract the user-agent at the same time... I made it just for me to use yt-dl (before yt-dlp). If I can still use that cookie.txt file I will... if I cannot use it anymore because there is no way to do it I will change the interface... I just want to be sure I have to change it.
No way to use my own cookie.txt file?

PS. I can confirm that it work with Opera browser too.

yt-dlp isn't a real browser so it won't update the cookies ever. User firefox instead and the commands I wrote in my previous comment.

Ok I got the initial state error now (so I should be able to fix it with bashonly fix But I still got a question. Since I can still generate a cookie.txt file from a real browser (a webview that use edge)... how can I use that file instead of the one generated by yt-dlp or from a supported browser? In previous version yt-dlp did not generate a cookie.txt file when I used --cookie it just readed my file... now it will ovverride it... I think my own cookie file should work file. Do you know if there is any way to use it?

Because CR limit cookies to 30 minutes you'll have to generate cookies.txt whatever you want to use yt-dlp. It's an extra step doing that way. Just leave Firefox logged at your account and open CR site when you want to use yt-dlp. If you have a script that calls yt-dlp, add a line to open firefox on CR site and that's it.

I don't need to... My interface just extract a cookies.txt file pressing a button from my webview and it will also extract the user-agent at the same time... I made it just for me to use yt-dl (before yt-dlp). If I can still use that cookie.txt file I will... if I cannot use it anymore because there is no way to do it I will change the interface... I just want to be sure I have to change it. No way to use my own cookie.txt file?

If you want to keep changes to a minimun then add a line to open CR site at the desired browser and a wait time before geting the cookies.txt. This is what I did so solve mine (only that I use --cookies-from-browser instead)

If you want to keep changes to a minimun then add a line to open CR site at the desired browser and a wait time before geting the cookies.txt. This is what I did so solve mine (only that I use --cookies-from-browser instead)

Like I said, that's ok if there is no way to pass my own cookies.txt file. Since I use a real browser (a webview that use edge) to make it I think it should work... but only if there is an alternative to --cookie that will not override my own file.
I don't really want to open another browser if I can avoid it.

@federicorosso1993 you can pass your own cookie file with --cookies option, the option's argument needs to be the path to the cookies file

If you want to keep changes to a minimun then add a line to open CR site at the desired browser and a wait time before geting the cookies.txt. This is what I did so solve mine (only that I use --cookies-from-browser instead)

Like I said, that's ok if there is no way to pass my own cookies.txt file. Since I use a real browser (a webview that use edge) to make it I think it should work... but only if there is an alternative to --cookie that will not override my own file. I don't really want to open another browser if I can avoid it.

Ah sorry. I don't know a way to prevent changes to cookies.txt. Afaik yt-dlp isn't supose to change that buy I don't know it actualy change it. To be sure yt-dlp won't change it you can mark the file as read only before calling yt-dlp.

@Killua-Zolldyck a proper fix is being worked on currently

you can pass your own cookie file with --cookies option, the option's argument needs to be the path to the cookies file

I did it but my own file
that just start with
Netscape HTTP Cookie File
get override by yt-dlp cookies file that start with
Netscape HTTP Cookie File
This file is generated by yt-dlp.  Do not edit.
I pass it like this
--cookies "C:\Users\myusername\cookies.txt"

Ah sorry. I don't know a way to prevent changes to cookies.txt. Afaik yt-dlp isn't supose to change that but I don't know if it actualy change it. To be sure yt-dlp won't change it you can mark the file as read only before calling yt-dlp.

It will actually give me this error
PermissionError: [Errno 13] Permission denied

@federicorosso1993

--user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/109.0.1518.78'

Hmmm, your Edge browser looks a little outdated to me. My user-agent value is "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/114.0.1823.82". Be aware that this value must exactly fit the browser version, you generated the cookie with. Otherwise it will result in "403 forbidden". Looks like the browser version is part of the cookie itself and cross-checked by Crunchy. When there is a difference: forbidden...

Hmmm, your Edge browser looks a little outdated to me. My user-agent value is "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/114.0.1823.82". Be aware that this value must exactly fit the browser version, you generated the cookie with. Otherwise it will result in "403 forbidden". Looks like the browser version is part of the cookie itself and cross-checked by Crunchy. When there is a difference: forbidden...

That's not the problem. I just set my edge browser user-agent manually that's why it's old... The problem is that yt-dlp will override the cookies.txt file that I pass as a parameter... that's why it will not match (yt-dlp use it's own cookies.txt file, with my real browser user agent, instead of using also my real cookies.txt file).
I'm still looking the code (because it's different from the yt-dl that I used before). The FAQ of yt-dlp still say that you can pass a cookies.txt file but I'm not sure when that changed because my own interface will pass username and password before cookies and user-agent so while it worked I didn't need to use the --cookies --user-agent parameter... Also for what I understand this week it was working with is own cookies.txt file (now I know that it override it... I didn't know yesterday it was doing that).

Ok maybe something is actually wrong with my own cookies.txt file... because if I use this code
--cookies-from-browser "opera" --cookies "Path"
It will save my cookies.txt file from opera browser at the path
and if I try to use it
--cookies "Path"
it will work...
So maybe I need to fix my own cookies.txt file.

I think I found my problem. My extractor does not get sso cookie

@federicorosso1993 try using your cookie file without --username and --password

@federicorosso1993 the cookie you need is set by cloudflare, and iirc starts with _cf

Ah so the cookie generated by yt-dlp will not work?

no, but Curl's cookies will, see https://github.com/yt-dlp/yt-dlp/issues/7442#issuecomment-1628362077

@federicorosso1993 the cookie you need is set by cloudflare, and iirc starts with _cf

I already got that one... I need to add sso.crunchyroll.com (two of them) and (maybe) static.crunchyroll.com... those are missing from my original cookies.txt file. I think because I only extract cookies.txt on my current page (while the yt-dlp extractor work with all browser cookies.. but it still works even if I delete all not crunchyroll related cookies... it still get the sso cookies that where created during log in).

Ok I was able to fix it just by adding the extraction of cookies for sso.crunchyroll.com url. I know this was my own problem but I can at least confirm for everybody that it still works by passing a correct cookies.txt file manually (it will still override the file but it will just add the comment # This file is generated by yt-dlp.  Do not edit. the file stay the same as the one passed manually). It just need crunchyroll.com cookies and sso.crunchyroll.com cookies

Now it gives this error, I've already tried with cookies.txt, from browser, and nothing works. Here the error seems to be unrelated to cookies, it seems that yt-dlp can't access CR

F:[01]\FUNi>yt-dlp.exe -a "URLs.txt" --username "xxxxxxxxx" --password "xxxxxxxxx" --write-subs --sub-langs "pt-BR" --prefer-ffmpeg --no-check-certificate --cookies-from-browser "firefox" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0" --verbose
[debug] Command-line config: ['-a', 'URLs.txt', '--username', 'PRIVATE', '--password', 'PRIVATE', '--write-subs', '--sub-langs', 'pt-BR', '--prefer-ffmpeg', '--no-check-certificate', '--cookies-from-browser', 'firefox', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0', '--verbose']
[debug] Batch file urls: ['https://www.crunchyroll.com/pt-br/watch/G4VUQ10V8/yuuya-and-kaori']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 6.0-full_build-www.gyan.dev (setts), ffprobe 6.0-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\r2sce\AppData\Roaming\Mozilla\Firefox\Profiles\1919np28.default-release\cookies.sqlite"
[Cookies] Extracted 46 cookies from firefox
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[crunchyroll] Extracting URL: https://www.crunchyroll.com/pt-br/watch/G4VUQ10V8/yuuya-and-kaori
[crunchyroll] Retrieving main page (lang=pt-br/)
ERROR: [crunchyroll] G4VUQ10V8: Unable to extract initial state; 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 710, in extract
File "yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
File "yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
File "yt_dlp\extractor\crunchyroll.py", line 99, in _call_base_api
File "yt_dlp\extractor\crunchyroll.py", line 72, in _update_query
File "yt_dlp\extractor\common.py", line 1272, in _search_json
File "yt_dlp\extractor\common.py", line 1258, in _search_regex
F:[01]\FUNi>pause
It gave the same error; it must be the extractor 🤔

As Federico already said: "for the initial state error use bashonly fix" and compile yourself of course.
Or wait fior the next yt-dlp version which will include the fix.

Fixes for both the 403 and the initial state have been worked on in #7632, but they need testing.
A pre-release build is available: https://github.com/yt-dlp/yt-dlp/pull/7632#issuecomment-1641074939.
Please test it and see if the fixes worked for you.

with edge

with firefox

So I tried it the way I used to before, and it still gave an error.
And I refreshed the Crunchyroll page, also logged out and logged back in, and it didn't work 🤔

So I tried it the way I used to before, and it still gave an error.

@Rafawell you need to add ua_workaround to your crunchyrollbeta extractor-args for the "old" way to work with this build
e.g. --extractor-args "crunchyrollbeta:format=vo_adaptive_dash;ua_workaround"
or, if you aren't passing any other extractor args: --extractor-args "crunchyrollbeta:ua_workaround"

F:[01]\FUNi>yt-dlp -v --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36" --match-filter "language=pt-BR" --extractor-args "crunchyrollbeta:format=vo_adaptive_dash;ua_workaround" -f "ba" -a "URLs.txt" --cookies-from-browser edge -o "%(series)s - S%(season_number)sE%(episode_number)02d - %(episode)s" --print filename  --print urls  1>>OVER.txt
[debug] Command-line config: ['-v', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36', '--match-filter', 'language=pt-BR', '--extractor-args', 'crunchyrollbeta:format=vo_adaptive_dash;ua_workaround', '-f', 'ba', '-a', 'URLs.txt', '--cookies-from-browser', 'edge', '-o', '%(series)s - S%(season_number)sE%(episode_number)02d - %(episode)s', '--print', 'filename', '--print', 'urls']
[debug] Batch file urls: ['https://www.crunchyroll.com/pt-br/series/GEXH3W49E/i-got-a-cheat-skill-in-another-world-and-became-unrivaled-in-the-real-world-too']
Extracting cookies from edge
[debug] Extracting cookies from: "C:\Users\r2sce\AppData\Local\Microsoft\Edge\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\r2sce\AppData\Local\Microsoft\Edge\User Data\Local State"
Extracted 4089 cookies from edge
[debug] cookie version breakdown: {'v10': 4089, 'other': 0, 'unencrypted': 0}
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out cp1252 (No VT), error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[c558917fa] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 6.0-full_build-www.gyan.dev (setts), ffprobe 6.0-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[crunchyroll:playlist] Extracting URL: https://www.crunchyroll.com/pt-br/series/GEXH3W49E/i-got-a-cheat-skill-in-another-world-and-became-unrivaled-in-the-real-world-too
[debug] [crunchyroll:playlist] Using cxApiParam=noaihdevm_6iyg0a8l0q
[crunchyroll:playlist] Authenticating with grant_type=etp_rt_cookie
ERROR: [crunchyroll:playlist] GEXH3W49E: 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/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 715, in extract
File "yt_dlp\extractor\crunchyroll.py", line 500, in _real_extract
File "yt_dlp\extractor\crunchyroll.py", line 138, in _call_api
File "yt_dlp\extractor\crunchyroll.py", line 119, in _call_base_api
File "yt_dlp\extractor\crunchyroll.py", line 98, in _update_auth
File "yt_dlp\extractor\common.py", line 1069, in download_content
File "yt_dlp\extractor\common.py", line 1033, in download_handle
File "yt_dlp\extractor\common.py", line 903, in _download_webpage_handle
File "yt_dlp\extractor\common.py", line 860, in _request_webpage
File "yt_dlp\networking_urllib.py", line 432, in _send
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
urllib.error.HTTPError: HTTP Error 403: Forbidden
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "yt_dlp\YoutubeDL.py", line 4059, in urlopen
File "yt_dlp\networking\common.py", line 89, in send
File "yt_dlp\networking_helper.py", line 203, in wrapper
File "yt_dlp\networking\common.py", line 297, in send
File "yt_dlp\networking_urllib.py", line 437, in _send
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "yt_dlp\extractor\common.py", line 847, in _request_webpage
File "yt_dlp\YoutubeDL.py", line 4078, in urlopen
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden
F:[01]\FUNi>pause
I tried with the command that I used the most and it gave this error 🤔

It's strange, using cookies from Edge gave an error here, but testing it now with Firefox cookies worked 🤔

It's working well up to the present moment, thank you very much 🤗

I noticed that whenever I used cookies from Edge, this appeared in it

#7632 is working for me using "--extractor-arg crunchyrollbeta:ua_workaround" option. Thanks a lot!

#7632 does not solve the 403 after 30min error, i still need to refresh the CR homepage to get the newest cookie. And username and password login still broken.

i still need to refresh the CR homepage to get the newest cookie

It's an incredibly ugly solution, but I added a line to my download script to open the video in a new firefox tab if I pass a crunchyroll link into it. At least this way the download process is still automated. No need to manually refresh the page.

An add-on (e.g. Tab-Reloader) works here, which automatically reloads the start page every 15 minutes. It works really well here.

Still get the error and softban from cloudflare, passed every browser UA with or without new workaroud. Can't download video or subtitles.
Same on Firefox Releae - ESR - Nightly
Microsoft Edge
Google Chrome

Since the 403 workaround didn't work I have merged the initial state fix for now. If someone else has any other idea please let us know. Otherwise we will ahve to wait for curl-impersonate.

Relevant: https://github.com/yt-dlp/yt-dlp/issues/7442#issuecomment-1636627709

YT_DLP_CCI_IMPERSONATE=chrome110 yt-dlp -v URL

$env:YT_DLP_CCI_IMPERSONATE="chrome110"
[debug] Command-line config: ['-R', 'infinite', '-v', '--force-overwrites', '--fragment-retries', 'infinite', '--no-mtime', '-u', 'PRIVATE', '-p', 'PRIVATE', '-N', '16', '--embed-subs', '--sub-langs', 'all', 'https://www.crunchyroll.com/link-click/episode-3-untitled-905875', '-o', '1.mkv']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: cba916d1f
[debug] Python 3.9.1 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1g  21 Apr 2020)
[debug] exe versions: ffmpeg N-108083-g06b98e396a-20220909 (setts), ffprobe N-108083-g06b98e396a-20220909
[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] Request Handlers: urllib
[debug] Loaded 1855 extractors
[generic] Extracting URL: https://www.crunchyroll.com/link-click/episode-3-untitled-905875
[generic] episode-3-untitled-905875: Downloading webpage
ERROR: Unable to handle request: Unsupported request extension: "impersonate" (urllib)
Traceback (most recent call last):
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\YoutubeDL.py", line 1578, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\YoutubeDL.py", line 1706, in __extract_info
    ie_result = ie.extract(url)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\common.py", line 715, in extract
    ie_result = self._real_extract(url)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\generic.py", line 2430, in _real_extract
    full_response = self._request_webpage(url, video_id, headers={
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\common.py", line 847, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\YoutubeDL.py", line 4048, in urlopen
    return self._request_director.send(req)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\networking\director.py", line 128, in send
    raise NoSupportingHandlers(unsupported_errors, unexpected_errors)
yt_dlp.networking.exceptions.NoSupportingHandlers: Unable to handle request: Unsupported request extension: "impersonate" (urllib)

@BraveSail Pls do pip install curl_cffi and try again

Since the 403 workaround didn't work I have merged the initial state fix for now. If someone else has any other idea please let us know. Otherwise we will have to wait for curl-impersonate.

Any chance it will be implemented in the shord-mid term?
I use yt-dlp from compiled win version with python wrapper so i can't use curl-impersonate as external module (I think)

@BraveSail Pls do pip install curl_cffi and try again

It works with login method, but --cookies-from-browser show's 400 error, anyway it fix the 403 error, seems has solved the main issue.
[debug] Command-line config: ['-R', 'infinite', '-v', '--force-overwrites', '--fragment-retries', 'infinite', '--no-mtime', '--cookies-from-browser', 'brave', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36', '-N', '16', '--embed-subs', '--sub-langs', 'all', 'https://www.crunchyroll.com/link-click/episode-3-untitled-905875', '-o', '1.mkv']
Extracting cookies from brave
[debug] Extracting cookies from: "C:\Users\*\AppData\Local\BraveSoftware\Brave-Browser\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\*\AppData\Local\BraveSoftware\Brave-Browser\User Data\Local State"
Extracted 1771 cookies from brave
[debug] cookie version breakdown: {'v10': 1771, 'other': 0, 'unencrypted': 0}
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: cba916d1f
[debug] Python 3.9.1 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1g  21 Apr 2020)
[debug] exe versions: ffmpeg N-108083-g06b98e396a-20220909 (setts), ffprobe N-108083-g06b98e396a-20220909
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, curl_cffi-None, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Request Handlers: curl_cffi, urllib
[debug] Loaded 1855 extractors
[generic] Extracting URL: https://www.crunchyroll.com/link-click/episode-3-untitled-905875
[generic] episode-3-untitled-905875: Downloading webpage
[redirect] Following redirect to https://www.crunchyroll.com/watch/G9DUE5NQE/untitled
[crunchyroll] Extracting URL: https://www.crunchyroll.com/watch/G9DUE5NQE/untitled
[crunchyroll] Retrieving main page (lang=None)
[debug] [crunchyroll] Using cxApiParam=noaihdevm_6iyg0a8l0q
[crunchyroll] Authenticating with grant_type=etp_rt_cookie
ERROR: [crunchyroll] G9DUE5NQE: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>); 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 "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\common.py", line 715, in extract
    ie_result = self._real_extract(url)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\crunchyroll.py", line 320, in _real_extract
    response = traverse_obj(self._call_api(
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\crunchyroll.py", line 114, in _call_api
    result = self._call_base_api(
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\crunchyroll.py", line 100, in _call_base_api
    self._update_auth()
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\crunchyroll.py", line 91, in _update_auth
    auth_response = self._download_json(
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\common.py", line 1069, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\common.py", line 1033, in download_handle
    res = self._download_webpage_handle(
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\common.py", line 903, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\common.py", line 860, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\YoutubeDL.py", line 4048, in urlopen
    return self._request_director.send(req)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\networking\director.py", line 115, in send
    response = handler.send(request)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\networking\common.py", line 47, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\networking\common.py", line 237, in send
    return self._send(request)
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\networking\_curlcffi.py", line 204, in _send
    raise HTTPError(response, redirect_loop=max_redirects_exceeded)
yt_dlp.networking.exceptions.HTTPError: HTTP Error 400: Bad Request

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\extractor\common.py", line 847, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
  File "C:\Users\*\Desktop\tools\yt-dlp\yt_dlp\YoutubeDL.py", line 4067, in urlopen
    raise _CompatHTTPError(e) from e
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 400: Bad Request

Not really prof 403 is solved just that a bad request is made. So this need to be fixed to check if 403 is really solved as this error could be triggered before the 403.

This error output is when using --cookies-from-browser, which means when using -u username -p pass --cookies cookie.txt args it works normally.

Found some issues in #7595 :

pypy with arm64 environment need to compile curl_cffi locally to install it. Maybe same as CPython? I'm not sure since I tested pypy first.
pypy can not load the curl_cffi module even it have successfully installed, CPython is ok.
Hidive is 403 now at video.hidive.com, even though hidive is not using cloudflare.

[debug] Command-line config: ['-v', '-R', 'infinite', '--force-overwrites', '--fragment-retries', 'infinite', '--no-mtime', '--proxy', 'http://<IP_ADDRESS>:1080', 'https://www.hidive.com/stream/otaku-elf/s01e012', '-u', 'PRIVATE', '-p', 'PRIVATE', '-N', '16', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0', '--embed-subs', '--convert-subs', 'ass', '--sub-langs', 'all', '--remux-video', 'mkv', '-o', '/root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .mkv']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481]
[debug] Python 3.9.5 (CPython aarch64 64bit) - Linux-5.10.0-21-arm64-aarch64-with-glibc2.36 (OpenSSL 1.1.1n  15 Mar 2022, glibc 2.36)
[debug] exe versions: ffmpeg 4.3.5-0, ffprobe 4.3.5-0
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, curl_cffi-None, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {'all': 'http://<IP_ADDRESS>:1080'}
[debug] Request Handlers: curl_cffi, urllib
[debug] Loaded 1767 extractors
[HiDive] None: Downloading webpage
[HiDive] Logging in
[HiDive] Extracting URL: https://www.hidive.com/stream/otaku-elf/s01e012
[HiDive] otaku-elf/s01e012: Downloading JSON metadata
[HiDive] otaku-elf/s01e012: Downloading m3u8 information
[info] otaku-elf/s01e012: Downloading subtitles: en
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] otaku-elf/s01e012: Downloading 1 format(s): ja_br_or-8361
[info] Writing video subtitles to: /root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .en.vtt
[debug] Invoking http downloader on "https://www.hidive.com/caption/vtt/259c7570ee49a3c9c25098de73f85f1c02cd4a6e/OTK_s01e012_tv_br_or_ja_en_v01.vtt"
[download] Destination: /root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .en.vtt
[download] 100% of   47.17KiB in 00:00:00 at 135.04KiB/s
[SubtitlesConvertor] Converting subtitles
[INFO] Converting: [GJ.Y] Edomae Elf - 12 (Sentai .en.vtt ...
Deleting original file /root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .en.vtt (pass -k to keep)
[debug] Invoking hlsnative downloader on "https://www.hidive.com/manifest/child/259c7570ee49a3c9c25098de73f85f1c02cd4a6e/OTK_s01e012_tv_br_or_ja_xx_HLS1080p_16x9_02_v.m3u8?#="
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 147
[download] Destination: /root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .mp4
WARNING: The download speed shown is only of one thread. This is a known issue
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 6 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 4 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 10 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 2 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 9 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 5 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 3 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 8 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 7 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 11 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (1/inf)...

Found some issues in #7595 :
1. pypy with `arm64 `environment need to compile curl_cffi locally to install it. Maybe same as CPython? I'm not sure since I tested pypy first.

2. pypy can not load the curl_cffi module even it have successfully installed, CPython is ok.

3. Hidive is 403 now at `video.hidive.com` when downloading the stream segment, even though hidive is not using cloudflare. (stable version is ok)

[debug] Command-line config: ['-v', '-R', 'infinite', '--force-overwrites', '--fragment-retries', 'infinite', '--no-mtime', '--proxy', 'http://<IP_ADDRESS>:1080', 'https://www.hidive.com/stream/otaku-elf/s01e012', '-u', 'PRIVATE', '-p', 'PRIVATE', '-N', '16', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0', '--embed-subs', '--convert-subs', 'ass', '--sub-langs', 'all', '--remux-video', 'mkv', '-o', '/root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .mkv']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[debug] yt-dlp version<EMAIL_ADDRESS>[b532a3481]
[debug] Python 3.9.5 (CPython aarch64 64bit) - Linux-5.10.0-21-arm64-aarch64-with-glibc2.36 (OpenSSL 1.1.1n  15 Mar 2022, glibc 2.36)
[debug] exe versions: ffmpeg 4.3.5-0, ffprobe 4.3.5-0
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, curl_cffi-None, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {'all': 'http://<IP_ADDRESS>:1080'}
[debug] Request Handlers: curl_cffi, urllib
[debug] Loaded 1767 extractors
[HiDive] None: Downloading webpage
[HiDive] Logging in
[HiDive] Extracting URL: https://www.hidive.com/stream/otaku-elf/s01e012
[HiDive] otaku-elf/s01e012: Downloading JSON metadata
[HiDive] otaku-elf/s01e012: Downloading m3u8 information
[info] otaku-elf/s01e012: Downloading subtitles: en
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] otaku-elf/s01e012: Downloading 1 format(s): ja_br_or-8361
[info] Writing video subtitles to: /root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .en.vtt
[debug] Invoking http downloader on "https://www.hidive.com/caption/vtt/259c7570ee49a3c9c25098de73f85f1c02cd4a6e/OTK_s01e012_tv_br_or_ja_en_v01.vtt"
[download] Destination: /root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .en.vtt
[download] 100% of   47.17KiB in 00:00:00 at 135.04KiB/s
[SubtitlesConvertor] Converting subtitles
[INFO] Converting: [GJ.Y] Edomae Elf - 12 (Sentai .en.vtt ...
Deleting original file /root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .en.vtt (pass -k to keep)
[debug] Invoking hlsnative downloader on "https://www.hidive.com/manifest/child/259c7570ee49a3c9c25098de73f85f1c02cd4a6e/OTK_s01e012_tv_br_or_ja_xx_HLS1080p_16x9_02_v.m3u8?#="
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 147
[download] Destination: /root/bangumi/[GJ.Y] Edomae Elf - 12 (Sentai .mp4
WARNING: The download speed shown is only of one thread. This is a known issue
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 6 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 4 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 10 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 2 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 9 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 5 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 3 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 8 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 7 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 11 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (1/inf)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (1/inf)...

Right, I don't think curl_cffi provides builds for all systems and is probably not been tested on pypy. While we may be able to help them expand their build support, it won't be something that will work for everyone.

The underlying framework is designed so that we can add another library/way of talking to curl-impersonate if need be.

Hi @coletdjnz,
so I have done
>aria2c -l log.txt https://www.crunchyroll.com/watch/GWDU8E7DD/go-ahead-and-take-a-shower

and the interesting part I think  is

As I see it now the initial request to the site to download the page natively (using python/yt-dlp), parsing for video/playlists and eventually the media is actually downloaded either internally or using an external --downloader . Would you consider another maybe --requester and just leave it there for the user? SpankBang also works!!
Recipes for specific issues could be maintained in the HOWTOs ...

I'm getting an identical issue with YouTube, attempting to download a video under a shortened URL (normal watch?v= urls don't work), but I'm not sure if YouTube also relies on cloudflare for DDOS protection.
░▒▓   ~   23:12 
❯ yt-dlp --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0" --cookies-from-browser firefox --verbose https://youtu.be/urglg3WimHA
[debug] Command-line config: ['--user-agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0', '--cookies-from-browser', 'firefox', '--verbose', 'https://youtu.be/urglg3WimHA']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (pip)
[debug] Python 3.11.3 (CPython x86_64 64bit) - Linux-6.4.8-zen1-1-zen-x86_64-with-glibc2.38 (OpenSSL 3.1.2 1 Aug 2023, glibc 2.38)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "/home/theocgaming/.mozilla/firefox/6auw0mx5.default-release/cookies.sqlite"
[Cookies] Extracted 591 cookies from firefox
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[youtube] Extracting URL: https://youtu.be/urglg3WimHA
[youtube] urglg3WimHA: Downloading webpage
[youtube] urglg3WimHA: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] urglg3WimHA: Downloading 1 format(s): 313+251
[debug] Invoking dashsegments downloader on "https://rr5---sn-nx5s7n76.googlevideo.com/videoplayback?expire=1692187956&ei=1GjcZLLALciksfIPj7-YgA8&ip=2601%3A1c0%3Ace01%3A8330%3A%3Ab4ae&id=o-AH6qOzcAK79Urpoi_k3KGoyu0BVnLIb5xz7qVNjpzqPq&itag=313&source=youtube&requiressl=yes&mh=Lo&mm=31%2C29&mn=sn-nx5s7n76%2Csn-nx57ynse&ms=au%2Crdu&mv=m&mvi=5&pl=39&gcr=us&initcwndbps=2477500&spc=UWF9f0ZZ_K0ESvwRtXkj_OPIrBbET3sNGkstp4c1qg&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=275766858&dur=151.651&lmt=1684493688858664&mt=1692165676&fvip=5&keepalive=yes&fexp=24007246&beids=24350017&c=ANDROID&txp=4532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAJj2QcwYyF1tXv3hPOUcT3MFRBRxoc7TqzX43f82qfOUAiEAz5wRgINDENo4XdNvXWTc5Jox4uMUU3Nolp7St50BZWU%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAJmcqT731d7jIp0E7tqftSApeEPqxNcpP1-V0c2N_xuvAiBZI1BSuPnEEa2QBAlCccgDJP3AMQPRAE3RwtUBaxGBhQ%3D%3D"
[dashsegments] Total fragments: 27
[download] Destination: ＂Weird Al＂ Yankovic - Foil (Official 4K Video) [urglg3WimHA].f313.webm
[download]  44.4% of ~ 270.00MiB at    1.85MiB/s ETA 00:46 (frag 12/27)[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (1/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (2/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (3/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (4/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (5/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (6/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (7/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (8/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (9/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 13 (10/10)...
[download] fragment not found; Skipping fragment 13 ...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (1/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (2/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (3/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (4/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (5/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (6/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (7/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (8/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (9/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 14 (10/10)...
[download] fragment not found; Skipping fragment 14 ...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (1/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (2/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (3/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (4/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (5/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (6/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (7/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (8/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (9/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 15 (10/10)...
[download] fragment not found; Skipping fragment 15 ...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (1/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (2/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (3/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (4/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (5/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (6/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 16 (7/10)...
^C
ERROR: Interrupted by user

░▒▓   ~   23:13 
❯

I'm getting an identical issue with YouTube, attempting to download a video under a shortened URL (normal watch?v= urls don't work), but I'm not sure if YouTube also relies on cloudflare for DDOS protection.
░▒▓   ~   23:20 
❯ yt-dlp --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0" --cookies-from-browser firefox --verbose -x https://youtu.be/urglg3WimHA
[debug] Command-line config: ['--user-agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0', '--cookies-from-browser', 'firefox', '--verbose', '-x', 'https://youtu.be/urglg3WimHA']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (pip)
[debug] Python 3.11.3 (CPython x86_64 64bit) - Linux-6.4.8-zen1-1-zen-x86_64-with-glibc2.38 (OpenSSL 3.1.2 1 Aug 2023, glibc 2.38)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "/home/theocgaming/.mozilla/firefox/6auw0mx5.default-release/cookies.sqlite"
[Cookies] Extracted 591 cookies from firefox
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[youtube] Extracting URL: https://youtu.be/urglg3WimHA
[youtube] urglg3WimHA: Downloading webpage
[youtube] urglg3WimHA: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] urglg3WimHA: Downloading 1 format(s): 251
[debug] Invoking dashsegments downloader on "https://rr5---sn-nx5s7n76.googlevideo.com/videoplayback?expire=1692188593&ei=UWvcZKzTNt-gsfIPu-O_iAc&ip=2601%3A1c0%3Ace01%3A8330%3A%3Ab4ae&id=o-APp-ldeUYrEic8asNLYM_1wA6Vp10rXg_zeyOPcqfAQj&itag=251&source=youtube&requiressl=yes&mh=Lo&mm=31%2C29&mn=sn-nx5s7n76%2Csn-nx57ynse&ms=au%2Crdu&mv=m&mvi=5&pl=39&gcr=us&initcwndbps=2427500&spc=UWF9f90WKNMhtJZXGRv6jwoM1ImGg5fjVq7A3Ay-Mw&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=2617822&dur=151.681&lmt=1684490631987199&mt=1692166645&fvip=5&keepalive=yes&fexp=24007246%2C51000023&beids=24350017&c=ANDROID&txp=4532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgRbLm-FU595jZZqmXOo4x37lEoKZ8xd0On7QG1eVoc8cCIQCmsBjSEPMOSxBCctAeu3F-EpUfrVN5HRuqWU_6GysIPw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAKXeNH0zTY0WwSJuXx52GN2ojGEkwRBmzZu3-uQsOwtqAiEAgA56WYleROFAAzNeYazb-sNwG12M9LitDQ4FcvBoZt8%3D"
[dashsegments] Total fragments: 1
[download] Destination: ＂Weird Al＂ Yankovic - Foil (Official 4K Video) [urglg3WimHA].webm
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 1 (1/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 1 (2/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 1 (3/10)...
[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 1 (4/10)...