yt-dlp: Cannot download on Patreon with --cookies-from-browser

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

Checklist

Region

France

Provide a description that is worded well enough to be understood

Hi everyone, and thank you for the software,

Since the last few weeks, I cannot download no more on Patreon, it used to work.

I have update to the last stable version:

Provide verbose output that clearly demonstrates the problem

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

Complete Verbose Output

[debug] Command-line config: ['-vU', '--cookies-from-browser', 'firefox', 'https://www.patreon.com/posts/four-ways-to-118220732']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2025.01.12 from yt-dlp/yt-dlp [dade5e35c] (zip)
[debug] Python 3.12.8 (CPython x86_64 64bit) - Linux-6.12.6-100.fc40.x86_64-x86_64-with-glibc2.39 (OpenSSL 3.2.2 4 Jun 2024, glibc 2.39)
[debug] exe versions: ffmpeg 6.1.2 (setts), ffprobe 6.1.2
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2023.05.07, mutagen-1.47.0, requests-2.31.0, sqlite3-3.45.1, urllib3-1.26.20, websockets-12.0
[debug] Proxy map: {}
Extracting cookies from firefox
[debug] Extracting cookies from: "/home/kevin/.mozilla/firefox/meicwcva.default-release-3-1699360557147/cookies.sqlite"
Extracted 602 cookies from firefox
[debug] Request Handlers: urllib
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2025.01.12 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2025.01.12 from yt-dlp/yt-dlp)
[patreon] Extracting URL: https://www.patreon.com/posts/four-ways-to-118220732
[patreon] 118220732: Downloading API JSON
ERROR: [patreon] 118220732: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: Forbidden>)
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/extractor/common.py", line 742, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/extractor/patreon.py", line 281, in _real_extract
    post = self._call_api(
           ^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/extractor/patreon.py", line 43, in _call_api
    return self._download_json(
           ^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/extractor/common.py", line 1152, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/extractor/common.py", line 1112, in download_handle
    res = self._download_webpage_handle(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/extractor/common.py", line 962, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/extractor/common.py", line 911, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/networking/_urllib.py", line 398, in _send
    res = opener.open(urllib_req, timeout=self._calculate_timeout(request))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/urllib/request.py", line 521, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/urllib/request.py", line 630, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/urllib/request.py", line 559, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib64/python3.12/urllib/request.py", line 639, 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 "/mnt/rip/Rip/./yt-dlp/yt_dlp/extractor/common.py", line 898, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query, extensions))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/YoutubeDL.py", line 4175, in urlopen
    return self._request_director.send(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/networking/common.py", line 117, in send
    response = handler.send(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/networking/_helper.py", line 208, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/networking/common.py", line 340, in send
    return self._send(request)
           ^^^^^^^^^^^^^^^^^^^
  File "/mnt/rip/Rip/./yt-dlp/yt_dlp/networking/_urllib.py", line 403, 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

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 19 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@GordonFremen an issue with a similar-looking (but different!) error (#13263) is fixed in master. That is probably what you were experiencing.

This is a separate issue from that one, which only happens for users whose IP addresses are considered suspicious by Cloudflare.

My issue was with the m3u8 only. The API requests are fine on my end.

I corrected my changelog so I don’t send unnecessary noise here. Sorry.

The workaround is to put the referer:

yt-dlp --referer 'https://www.patreon.com/' ...

This was also mentioned in #13263 but this should be added to the downloader. I am applying a fix to my Patreon Archiver tool.

OK, I’ve gotten it to work.

It’s not a yt-dlp problem. It seems to be with the ISP you are using.

Basically, if you open your browser and go to any patreon URL (including just patreon.com), if you see it prompt you for a captcha, then it’s not going to work in yt-dlp.

I had a private proxy that didn’t cause a captcha prompt in patreon, and when I used that in yt-dlp, it worked.

You can get a paid private proxy from a number of sites (I use buyproxies.org), and you can ask them specifically to provide you with a proxy that will work in patreon without causing a captcha prompt. This is a better option than using VPN’s like for example Nord because they are often blocked or limited on some sites. If you have a site that is causing you problems, you can open a ticket with a private proxy service and ask for a proxy that is working on the site which you need it to work.