Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

trying to download from patreon #2060

Closed
Zintag opened this issue Nov 26, 2021 · 6 comments
Closed

trying to download from patreon #2060

Zintag opened this issue Nov 26, 2021 · 6 comments

Comments

@Zintag
Copy link

Zintag commented Nov 26, 2021

Hello, First of all I am a total noob with python, I just installed it for this.

I followed (I think) every step of the way, I installed Python, pip and gallery-dl following the tutorial.
I tried downloading from instagram and it works perfectly

I extracted the cookies from patreon and used the command :

gallery-dl --cookies "C:\Python\patreon.txt" "https://www.patreon.com/posts/jake-and-amir-2-58480994"
Patreon.txt being said cookies.

I get this lines in return :

[downloader.http][warning] Unknown MIME type 'application/x-mpegURL'
# .\gallery-dl\patreon\Amir and Jake\58480994_Jake and Amir Watch World Cup 2 & Feminist_01.bin

What am I missing? Is there anything I could do do download the video on this webpage?

Thanks a lot, please answer to me like I'm 5, like I said I'm 100% a noob but willing to learn. Thanks!

P.S. I am a subscriber to this creator on patreon

@mikf
Copy link
Owner

mikf commented Nov 26, 2021

gallery-dl cannot download videos in this format. Regular .mp4 videos and such are perfectly fine, but not when they are given as M3U8 Playlist as is the case here (that's what this application/x-mpegURL MIME type is).

What might work is getting the download URL with -g and plugging it into youtube-dl/yt-dlp

gallery-dl -g --cookies "C:\Python\patreon.txt" "https://www.patreon.com/posts/jake-and-amir-2-58480994"
<LONG URL>

youtube-dl "<LONG URL>"

Running only youtube-dl/yt-dlp on this specific Patreon post might also be possible:

youtube-dl --cookies "C:\Python\patreon.txt" "https://www.patreon.com/posts/jake-and-amir-2-58480994"

@Zintag
Copy link
Author

Zintag commented Nov 27, 2021

Hello! Thanks for taking the time to answer

Funnily enough, now, wether I try the command you gave me

gallery-dl -g --cookies "C:\Python\patreon.txt" "https://www.patreon.com/posts/jake-and-amir-2-58480994"

or the one I tried yesterday

gallery-dl --cookies "C:\Python\patreon.txt" "https://www.patreon.com/posts/jake-and-amir-2-58480994"

I get this in return

[patreon][warning] Cloudflare CAPTCHA
[patreon][error] HttpError: '403 Forbidden' for 'https://www.patreon.com/posts/jake-and-amir-2-58480994'

(The only thing I tried to fix this is "updating" the patreon.txt file that I extracted 5 minutes ago)

Also could you enlighten me as to what does "Long URL" refer to?

I also installed youtube-dl (using py -3 -m pip install --upgrade youtube_dl ) and tried the last command you gave me but I also get this in return

[Patreon] 58480994: Downloading JSON metadata
WARNING: "url" field is missing or empty - skipping format, there is an error in extractor
Traceback (most recent call last):
  File "C:\Python\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python\Scripts\youtube-dl.exe\__main__.py", line 7, in <module>
  File "C:\Python\lib\site-packages\youtube_dl\__init__.py", line 475, in main
    _real_main(argv)
  File "C:\Python\lib\site-packages\youtube_dl\__init__.py", line 465, in _real_main
    retcode = ydl.download(all_urls)
  File "C:\Python\lib\site-packages\youtube_dl\YoutubeDL.py", line 2068, in download
    res = self.extract_info(
  File "C:\Python\lib\site-packages\youtube_dl\YoutubeDL.py", line 808, in extract_info
    return self.__extract_info(url, ie, download, extra_info, process)
  File "C:\Python\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Python\lib\site-packages\youtube_dl\YoutubeDL.py", line 847, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Python\lib\site-packages\youtube_dl\YoutubeDL.py", line 881, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "C:\Python\lib\site-packages\youtube_dl\YoutubeDL.py", line 1637, in process_video_result
    if formats[0] is not info_dict:
IndexError: list index out of range

Please know that I am very sorry to bother you if any of this seems very basic! Thanks a lot again

@Hrxn
Copy link
Contributor

Hrxn commented Nov 27, 2021

Also could you enlighten me as to what does "Long URL" refer to?

This is simply the URL returned when running gallery-dl with the -g option.

And this is the URL which should be possible to download with youtube-dl/yt-dlp.

I also installed youtube-dl (using py -3 -m pip install --upgrade youtube_dl ) and tried the last command you gave me but I also get this in return

You should definitely try yt-dlp instead, as this is an active fork, and it should support Patreon (according to their docs):
py -3 -m pip install -U yt-dlp

@Zintag
Copy link
Author

Zintag commented Nov 27, 2021

Oh I understand now! The -g option "Print URLs instead of downloading". All right

When I run it I still get this in return

[patreon][warning] Cloudflare CAPTCHA
[patreon][error] HttpError: '403 Forbidden' for 'https://www.patreon.com/posts/jake-and-amir-2-58480994'

I installed yt-dlp as advised but I get this


yt-dlp --cookies "C:\Python\patreon.txt" "https://www.patreon.com/posts/jake-and-amir-2-58480994"
[Patreon] 58480994: Downloading JSON metadata
WARNING: "url" field is missing or empty - skipping format, there is an error in extractor
ERROR: [Patreon] 58480994: Requested format is not available

Am I doing anything wrong?

@mikf
Copy link
Owner

mikf commented Nov 28, 2021

You aren't doing anything wrong, the Patreon code for youtube-dl/yt-dlp just doesn't work anymore, and the "403 Forbidden" error from gallery-dl is a known problem (#1922). You are lucky if you don't get a CAPTCHA.

@PrSinister
Copy link

PrSinister commented Nov 29, 2021

I fixed the 403 problem by reverting to Python 3.9.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants