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

gallery-dl 1.28.5 old.reddit [SSL: CERTIFICATE_VERIFY_FAILED] #7077

Open
barkoder opened this issue Feb 27, 2025 · 14 comments
Open

gallery-dl 1.28.5 old.reddit [SSL: CERTIFICATE_VERIFY_FAILED] #7077

barkoder opened this issue Feb 27, 2025 · 14 comments

Comments

@barkoder
Copy link

Version 1.28.5 - Standalone Executable (stable/windows)

$ gallery-dl --config-ignore -v -R -1 https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/
[gallery-dl][debug] Version 1.28.5 - Executable (stable/windows)
[gallery-dl][debug] Python 3.8.10 - Windows-7-6.1.7601-SP1
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.3
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting DownloadJob for 'https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/'
[reddit][debug] Using RedditSubmissionExtractor for 'https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/'
[reddit][debug] Using default API credentials (client-id 6N9uN0krSDE-ig)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): oauth.reddit.com:443
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/1iz23ll/.json?limit=0&raw_json=1 HTTP/11" 200 36517
[downloader.ytdl][debug] Forwarding cookies to youtube_dl.YoutubeDL
[downloader.ytdl][debug] [Reddit] je19kxi0nkle1: Downloading m3u8 information
[downloader.ytdl][warning] Failed to download m3u8 information: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)>
[downloader.ytdl][debug] [Reddit] je19kxi0nkle1: Downloading MPD manifest
[downloader.ytdl][warning] Failed to download MPD manifest: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)>
[downloader.ytdl][error] ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[downloader.ytdl][debug]
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyc", line 815, in wrapper
  File "youtube_dl\YoutubeDL.pyc", line 836, in __extract_info
  File "youtube_dl\extractor\common.pyc", line 534, in extract
  File "youtube_dl\extractor\reddit.pyc", line 43, in _real_extract
  File "youtube_dl\extractor\common.pyc", line 1374, in _sort_formats
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gallery_dl\downloader\ytdl.pyc", line 74, in download
  File "gallery_dl\downloader\ytdl.pyc", line 148, in _extract_info
  File "youtube_dl\YoutubeDL.pyc", line 808, in extract_info
  File "youtube_dl\YoutubeDL.pyc", line 824, in wrapper
  File "youtube_dl\YoutubeDL.pyc", line 628, in report_error
  File "youtube_dl\YoutubeDL.pyc", line 598, in trouble
youtube_dl.utils.DownloadError: ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[downloader.ytdl][warning] DownloadError: ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download][error] Failed to download ytdl:https://v.redd.it/je19kxi0nkle1

WORKS Version 1.29.0-dev

$ python -m pip install --upgrade --force-reinstall --no-deps https://github.com/mikf/gallery-dl/archive/master.tar.gz
$ gallery-dl --config-ignore --write-metadata -v -R -1 https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/
[gallery-dl][debug] Version 1.29.0-dev
[gallery-dl][debug] Python 3.13.2 - Windows-7-6.1.7601-SP1
[gallery-dl][debug] requests 2.32.3 - urllib3 2.3.0
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting DownloadJob for 'https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/'
[reddit][debug] Using RedditSubmissionExtractor for 'https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/'
[reddit][debug] Using default API credentials (client-id 6N9uN0krSDE-ig)
[reddit][info] Requesting public access token
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.reddit.com:443
[urllib3.connectionpool][debug] https://www.reddit.com:443 "POST /api/v1/access_token HTTP/1.1" 200 667
[reddit][debug] Sleeping 0.44 seconds (request)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): oauth.reddit.com:443
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/1iz23ll/.json?limit=0&raw_json=1 HTTP/1.1" 200 36538
[reddit][debug] Active postprocessor modules: [MetadataPP]
[downloader.ytdl][debug] Forwarding cookies to yt_dlp.YoutubeDL
[downloader.ytdl][debug] [generic] Extracting URL: https://v.redd.it/je19kxi0nkle1
[downloader.ytdl][debug] [generic] je19kxi0nkle1: Downloading webpage
[downloader.ytdl][debug] [redirect] Following redirect to https://www.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/
[downloader.ytdl][debug] [Reddit] Extracting URL: https://www.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/
[downloader.ytdl][debug] [Reddit] 1iz23ll: Downloading JSON metadata
[downloader.ytdl][debug] [Reddit] 1iz23ll: Downloading m3u8 information
[downloader.ytdl][debug] [Reddit] 1iz23ll: Downloading MPD manifest
[downloader.ytdl][debug] [hlsnative] Downloading m3u8 manifest
[downloader.ytdl][debug] [hlsnative] Total fragments: 10
[downloader.ytdl][debug] [download] Destination: \\?\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..fhls-2018.mp4
[downloader.ytdl][debug] [download]  94.5% of ~  10.70MiB at  828.53KiB/s ETA 00:02 (frag 10/10)
[downloader.ytdl][debug] [download] 100% of   10.12MiB in 00:00:13 at 792.89KiB/s
[downloader.ytdl][debug] [download] Destination: \\?\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..fdash-7.m4a
[downloader.ytdl][debug] [download] 100.0% of  740.95KiB at  853.58KiB/s ETA 00:00
[downloader.ytdl][debug] [download] 100% of  740.95KiB in 00:00:01 at 571.69KiB/s
[downloader.ytdl][debug] [Merger] Merging formats into "\\?\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..mp4"
[downloader.ytdl][debug] Deleting original file \\?\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..fdash-7.m4a (pass -k to keep)
[downloader.ytdl][debug] Deleting original file \\?\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..fhls-2018.mp4 (pass -k to keep)
.\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..mp4

Maybe an issue with urllib3 2.2.3?

Thanks!

Related #6314

@UpscaleAnon
Copy link

That 443/200 error shit seems to be happening to a couple other websites as of the last few days. Sankaku and Bunkr so far.
Reddit works fine on my end though with 1.28.5 on Windows 10. It throws the same 443/200 error, but it at least downloads:

gallery-dl --verbose https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/
[gallery-dl][debug] Version 1.28.5 - Executable (stable/windows)
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.19045
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.3
[gallery-dl][debug] Configuration Files ['D:\SankakuDownloader\gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/'
[reddit][debug] Using RedditSubmissionExtractor for 'https://old.reddit.com/r/MadeMeSmile/comments/1iz23ll/just_a_man_and_his_rescued_pelican_being_pals/'
[reddit][debug] Using default API credentials (client-id 6N9uN0krSDE-ig)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): oauth.reddit.com:443
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/1iz23ll/.json?limit=0&raw_json=1 HTTP/11" 200 36605
[downloader.ytdl][debug] Forwarding cookies to youtube_dl.YoutubeDL
[downloader.ytdl][debug] [Reddit] je19kxi0nkle1: Downloading m3u8 information
[downloader.ytdl][debug] [Reddit] je19kxi0nkle1: Downloading MPD manifest
.\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..mp4[downloader.ytdl][warning] You have requested multiple formats but ffmpeg or avconv are not installed. The formats won't be merged.
[downloader.ytdl][debug] [hlsnative] Downloading m3u8 manifest
[downloader.ytdl][debug] [hlsnative] Total fragments: 10
[downloader.ytdl][debug] [download] Destination: \?\D:\SankakuDownloader\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..fhls-2018.mp4
[downloader.ytdl][debug] [download] Destination: \?\D:\SankakuDownloader\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..mp4.fdash-7
.\gallery-dl\reddit\MadeMeSmile\1iz23ll Just a man and his rescued pelican being pals..mp4

@barkoder
Copy link
Author

@UpscaleAnon Thanks for confirming that that old.reddit URL works on Win10 . I still run Win7 and I've been getting that error for the past 1/2 days.

443 and 200 are not errors.

443 means it's connecting over port 443(commonly used for secure HTTPS connections.)

200 means "OK" which is the standard response for successful HTTP requests .

That message means that gallery-dl performed a successful(200) request over https(port 443) connection.

Read this article on HTTP status codes - https://en.wikipedia.org/wiki/Http_error_code

@barkoder
Copy link
Author

Does gallery-dl have a --cacert option like curl ?

I'd like to test if I would still get the SSL: CERTIFICATE_VERIFY_FAILED error if I pass my own ca-bundle .

gallery-dl --cacert 'PATH/TO/ca-bundle.crt'

@UpscaleAnon
Copy link

Does gallery-dl have a --cacert option like curl ?

I'd like to test if I would still get the SSL: CERTIFICATE_VERIFY_FAILED error if I pass my own ca-bundle .

gallery-dl --cacert 'PATH/TO/ca-bundle.crt'

You can disable the certificate validation at least with --no-check-certificate
Doesn't appear like you can apply your own certificate.

@mikf
Copy link
Owner

mikf commented Feb 28, 2025

CA cert issues are most likely going to be fixed in v1.29.0: ddb2c4d


Does gallery-dl have a --cacert option like curl ?

You should be able to use custom CA certs via the verify option,
e.g. -o verify='PATH/TO/ca-bundle.crt'

@mikf
Copy link
Owner

mikf commented Feb 28, 2025

[gallery-dl][debug] Python 3.13.2 - Windows-7-6.1.7601-SP1

Where are you getting your Windows 7 compatible Python interpreters from?
https://github.com/adang1345/PythonWin7 ?

@barkoder
Copy link
Author

Still get SSL: CERTIFICATE_VERIFY_FAILED even with passing certs. I guess I'll wait for v1.29.0 .

Where are you getting your Windows 7 compatible Python interpreters from? https://github.com/adang1345/PythonWin7 ?

Yep!

@mikf
Copy link
Owner

mikf commented Feb 28, 2025

[downloader.ytdl][warning] Failed to download m3u8 information: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)>
[downloader.ytdl][warning] Failed to download MPD manifest: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)>
[downloader.ytdl][error] ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Wait a minute, this a ytdl issue. I completely missed that.
gallery-dl itself can connect to Reddit just fine:

[urllib3.connectionpool][debug] Starting new HTTPS connection (1): oauth.reddit.com:443
[urllib3.connectionpool][debug] [https://oauth.reddit.com:443](https://oauth.reddit.com/) "GET /comments/1iz23ll/.json?limit=0&raw_json=1 HTTP/11" 200 36605

In your first log it uses legacy youtube-dl, while it uses yt-dlp for the second, working one. gallery-dl has not really anything to do with these network errors.

@barkoder
Copy link
Author

Okay but why is gallery-dl standalone forwarding cookies to youtube_dl.YoutubeDL instead of yt_dlp.YoutubeDL ?

I don't even have youtube-dl. I checked my %PATH%

where youtube-dl

Nothing.

I do have yt-dlp.exe in my %PATH%

$ where yt-dlp.exe
C:\Users\User\AppData\Local\Programs\Python\Python313\Scripts\yt-dlp.exe
D:\mpv\yt-dlp.exe

Does gallery-dl have internal legacy youtube-dl code?

@Hrxn
Copy link
Contributor

Hrxn commented Mar 1, 2025

You need to check your Python modules (pip list)

@barkoder
Copy link
Author

barkoder commented Mar 2, 2025

$ pip list

Package            Version
------------------ ---------------------
attrs              24.3.0
Brotli             1.1.0
certifi            2024.12.14
cffi               1.17.1
charset-normalizer 3.4.1
colorama           0.4.6
curl-cffi          0.5.10
dukpy              0.5.0
gallery_dl         1.29.0.dev0
h11                0.14.0
idna               3.10
internetarchive    5.1.0
isodate            0.7.2
jsonpatch          1.33
jsonpointer        3.0.0
lxml               5.3.0
mutagen            1.47.0
outcome            1.3.0.post0
pip                25.0.1
pycountry          24.6.1
pycparser          2.22
pycryptodome       3.21.0
pycryptodomex      3.21.0
pyreadline3        3.5.4
PySocks            1.7.1
requests           2.32.3
setuptools         75.8.0
sniffio            1.3.1
sortedcontainers   2.4.0
streamlink         7.1.1
tqdm               4.67.1
trio               0.28.0
trio-websocket     0.11.1
urllib3            2.3.0
websocket-client   1.8.0
websockets         14.1
wheel              0.45.1
wsproto            1.2.0
you-get            0.4.1743
yt-dlp             2025.2.28.232826.dev0

@mikf
Copy link
Owner

mikf commented Mar 2, 2025

Standalone executables can only access the Python modules they were bundled with, and gallery-dl.exe before 1.29.0 is bundled with legacy youtube-dl as a basic HLS/DASH downloader.

@barkoder
Copy link
Author

barkoder commented Mar 3, 2025

I figured there was some internal legacy youtube-dl code as File Activity View showed no read operations by gallery-dl on any other executables in my %PATH% .
Also UpscaleAnon's comment above shows their standalone copy of gallery-dl Forwarding cookies to youtube_dl.YoutubeDL as well – successfully on Win10.
So this must be a Windows 7 issue.
I distinctly remember gallery-dl standalone working just a few days ago on reddit.
Maybe the SSL used by youtube_dl inside gallery-dl is no longer trusted by Windows 7?

gallery-dl.exe before 1.29.0 is bundled with legacy youtube-dl as a basic HLS/DASH downloader

gallery-dl_x86.exe 1.29.0 is bundled with it too it seems.

$ gallery-dl -v -R -1 https://old.reddit.com/r/aww/comments/1j1i0bh/its_just_an_orange_nothing_else_to_see_here/`
[gallery-dl][debug] Version 1.29.0 - Executable (stable/windows_x86)
[gallery-dl][debug] Python 3.8.10 - Windows-7-6.1.7601-SP1
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.3
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting DownloadJob for 'https://old.reddit.com/r/aww/comments/1j1i0bh/its_just_an_orange_nothing_else_to_see_here/'
[reddit][debug] Using RedditSubmissionExtractor for 'https://old.reddit.com/r/aww/comments/1j1i0bh/its_just_an_orange_nothing_else_to_see_here/'
[reddit][debug] Using default API credentials (client-id 6N9uN0krSDE-ig)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): oauth.reddit.com:443
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/1j1i0bh/.json?limit=0&raw_json=1 HTTP/11" 200 29600
[reddit][debug] Active postprocessor modules: [MetadataPP]
[downloader.ytdl][debug] Using <module 'youtube_dl' from 'D:\\mpv\\gallery-dl.exe\\youtube_dl\\__init__.pyc'> version 2021.12.17
[downloader.ytdl][debug] Forwarding cookies to youtube_dl.YoutubeDL
[downloader.ytdl][debug] [Reddit] ehd1ovul87me1: Downloading m3u8 information
[downloader.ytdl][warning] Failed to download m3u8 information: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)>
[downloader.ytdl][debug] [Reddit] ehd1ovul87me1: Downloading MPD manifest
[downloader.ytdl][warning] Failed to download MPD manifest: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)>
[downloader.ytdl][error] ERROR: No video formats found; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
[downloader.ytdl][debug]
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyc", line 875, in wrapper
  File "youtube_dl\YoutubeDL.pyc", line 971, in __extract_info
  File "youtube_dl\extractor\common.pyc", line 571, in extract
  File "youtube_dl\extractor\reddit.pyc", line 43, in _real_extract
  File "youtube_dl\extractor\common.pyc", line 1558, in _sort_formats
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose option and include the complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gallery_dl\downloader\ytdl.pyc", line 81, in download
  File "gallery_dl\downloader\ytdl.pyc", line 155, in _extract_info
  File "youtube_dl\YoutubeDL.pyc", line 868, in extract_info
  File "youtube_dl\YoutubeDL.pyc", line 884, in wrapper
  File "youtube_dl\YoutubeDL.pyc", line 678, in report_error
  File "youtube_dl\YoutubeDL.pyc", line 641, in trouble
youtube_dl.utils.DownloadError: ERROR: No video formats found; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
[downloader.ytdl][warning] DownloadError: ERROR: No video formats found; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
[download][error] Failed to download ytdl:https://v.redd.it/ehd1ovul87me1

I have yt-dlp.exe right beside gallery-dl.exe (x86). Is there a way to tell gallery-dl to use that instead of forwarding to any of gallery-dl's own internal youtube_dl/yt-dlp?

$ where yt-dlp.exe
D:\mpv\yt-dlp.exe

Thanks.

@mikf
Copy link
Owner

mikf commented Mar 3, 2025

Is there a way to tell gallery-dl to use that instead of forwarding to any of gallery-dl's own internal youtube_dl/yt-dlp?

There isn't. gallery-dl cannot use youtube-dl/yt-dlp .exe files.


Setting reddit.videos to "dash" might help.
Or you use the pip-installed version with your Python 3.13.2 interpreter.

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