mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.26k stars 919 forks source link

Downloading From Reddit After New API Update #4363

Open cheese529 opened 1 year ago

cheese529 commented 1 year ago

I am having trouble downloading my saved posts after reddit released it's API changes. I followed Mikfs tutorial on adding my own custom client-id and everything else he listed but it still fails after downloading just a few saved posts, here is the verbose log.


[gallery-dl][debug] Version 1.25.8
[gallery-dl][debug] Python 3.11.4 - Windows-10-10.0.22621-SP0
[gallery-dl][debug] requests 2.31.0 - urllib3 2.0.3
[gallery-dl][debug] Configuration Files ['%APPDATA%\\gallery-dl\\config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://www.reddit.com/user/overratedcabbage_/saved/'
[cookies][debug] Extracting cookies from C:\Users\mnoor\AppData\Roaming\Mozilla\Firefox\Profiles\atw3bf5b.default\cookies.sqlite
[cookies][info] Extracted 541 cookies from Firefox
[reddit][debug] Using RedditUserExtractor for 'https://www.reddit.com/user/overratedcabbage_/saved/'
[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 /user/overratedcabbage_/saved/.json?limit=100&raw_json=1 HTTP/1.1" 429 46
[reddit][info] Register your own OAuth application and use its credentials to prevent this error: https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorredditclient-id--user-agent
[reddit][info] Waiting until 08:10:01 for rate limit reset.
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /user/overratedcabbage_/saved/.json?limit=100&raw_json=1 HTTP/1.1" 200 183380
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/itsj3t/.json?limit=500&raw_json=1 HTTP/1.1" 200 3863
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://i.imgur.com/XSbkshX.jpg'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.imgur.com:443
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/XSbkshX?include=media%2Ctags%2Caccount HTTP/1.1" 404 142
[imgur][error] HttpError: '404 Not Found' for 'https://api.imgur.com/post/v1/media/XSbkshX'
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/t5l8pq/.json?limit=500&raw_json=1 HTTP/1.1" 200 4023
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/l7ir6v/.json?limit=500&raw_json=1 HTTP/1.1" 200 5476
[redgifs][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/luu7qx/.json?limit=500&raw_json=1 HTTP/1.1" 200 3085
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Perfection 2021-02-28 luu7qx_1.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Perfection 2021-02-28 luu7qx_2.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Perfection 2021-02-28 luu7qx_3.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/mkij8u/.json?limit=500&raw_json=1 HTTP/1.1" 200 2496
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Bending over in Chuck & Larry 2021-04-05 mkij8u.gif
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/v02uh9/.json?limit=500&raw_json=1 HTTP/1.1" 200 3022
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\that's the dream 2022-05-29 v02uh9.gif
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/pn01bt/.json?limit=500&raw_json=1 HTTP/1.1" 200 3988
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/ifz744/.json?limit=500&raw_json=1 HTTP/1.1" 200 2361
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://imgur.com/mP2wN0X'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/mP2wN0X?include=media%2Ctags%2Caccount HTTP/1.1" 404 143
[imgur][error] HttpError: '404 Not Found' for 'https://api.imgur.com/post/v1/media/mP2wN0X'
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/l42owd/.json?limit=500&raw_json=1 HTTP/1.1" 200 3317
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\HighDef [3200x4000] 2021-01-24 l42owd.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/hxk40s/.json?limit=500&raw_json=1 HTTP/1.1" 200 2827
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://i.imgur.com/dbLDs7A.gifv'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/dbLDs7A?include=media%2Ctags%2Caccount HTTP/1.1" 404 142
[imgur][error] HttpError: '404 Not Found' for 'https://api.imgur.com/post/v1/media/dbLDs7A'
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/ircow5/.json?limit=500&raw_json=1 HTTP/1.1" 200 2925
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Her curves are phenomenal, what a woman 2020-09-12 ircow5.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/rjdon1/.json?limit=500&raw_json=1 HTTP/1.1" 200 2296
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Goddess 2021-12-18 rjdon1.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/s430w6/.json?limit=500&raw_json=1 HTTP/1.1" 200 2200
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Lovely Legs 2022-01-14 s430w6.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Great photo 2022-03-14 tdyip8.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/xqot48/.json?limit=500&raw_json=1 HTTP/1.1" 200 2381
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Bikini photoshoot 2022-09-28 xqot48.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/vj9pnk/.json?limit=500&raw_json=1 HTTP/1.1" 200 2851
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Quite the cowgirl 2022-06-23 vj9pnk.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/gyinjx/.json?limit=500&raw_json=1 HTTP/1.1" 200 2965
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/v021bn/.json?limit=500&raw_json=1 HTTP/1.1" 200 2238
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\fuck off bitchessssss 2022-05-29 v021bn.gif
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/x68iw2/.json?limit=500&raw_json=1 HTTP/1.1" 200 3446
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/k2g42n/.json?limit=500&raw_json=1 HTTP/1.1" 200 2095
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://i.imgur.com/aCN8VaS.png'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/aCN8VaS?include=media%2Ctags%2Caccount HTTP/1.1" 404 143
[imgur][error] HttpError: '404 Not Found' for 'https://api.imgur.com/post/v1/media/aCN8VaS'
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/w8i4ed/.json?limit=500&raw_json=1 HTTP/1.1" 200 2601
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/jaye5r/.json?limit=500&raw_json=1 HTTP/1.1" 200 2747
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://i.imgur.com/l2GEHRr.jpg'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/l2GEHRr?include=media%2Ctags%2Caccount HTTP/1.1" 404 143
[imgur][error] HttpError: '404 Not Found' for 'https://api.imgur.com/post/v1/media/l2GEHRr'
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/luu85s/.json?limit=500&raw_json=1 HTTP/1.1" 200 3622
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\So hot 2021-02-28 luu85s_1.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\So hot 2021-02-28 luu85s_2.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/wags06/.json?limit=500&raw_json=1 HTTP/1.1" 200 4444
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Jessica in Sardinia - 7⧸28⧸2022 2022-07-28 wags06_1.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Jessica in Sardinia - 7⧸28⧸2022 2022-07-28 wags06_2.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Jessica in Sardinia - 7⧸28⧸2022 2022-07-28 wags06_3.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Jessica in Sardinia - 7⧸28⧸2022 2022-07-28 wags06_4.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/j47sa0/.json?limit=500&raw_json=1 HTTP/1.1" 200 3589
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://i.imgur.com/zg52Acv.gif'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/zg52Acv?include=media%2Ctags%2Caccount HTTP/1.1" 200 495
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\imgur\Pink Bikini 2020-10-03 j47sa0.mp4
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/ts5tc6/.json?limit=500&raw_json=1 HTTP/1.1" 200 3596
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Gorgeous 2022-03-30 ts5tc6_1.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Gorgeous 2022-03-30 ts5tc6_2.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Gorgeous 2022-03-30 ts5tc6_3.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Gorgeous 2022-03-30 ts5tc6_4.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/o8jqec/.json?limit=500&raw_json=1 HTTP/1.1" 200 3469
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\At the sea 2021-06-26 o8jqec.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/u8xhqg/.json?limit=500&raw_json=1 HTTP/1.1" 200 2155
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\In great shape 2022-04-21 u8xhqg.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/iakb2s/.json?limit=500&raw_json=1 HTTP/1.1" 200 3869
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Texas Chainsaw Massacre 2020-08-16 iakb2s.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/qe4hi5/.json?limit=500&raw_json=1 HTTP/1.1" 200 3225
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/wbv9e1/.json?limit=500&raw_json=1 HTTP/1.1" 200 2653
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Summer is great 2022-07-30 wbv9e1_1.jpg
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Summer is great 2022-07-30 wbv9e1_2.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/o3m5yn/.json?limit=500&raw_json=1 HTTP/1.1" 200 2178
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Work of art 2021-06-19 o3m5yn.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/smrp5l/.json?limit=500&raw_json=1 HTTP/1.1" 200 2314
# C:\Users\mnoor\gallery-dl\reddit\jessicabiel\Perfection 2022-02-07 smrp5l.jpg
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/1sjmf3/.json?limit=500&raw_json=1 HTTP/1.1" 200 5887
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'http://i.imgur.com/XE4Ls3a.jpg'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/XE4Ls3a?include=media%2Ctags%2Caccount HTTP/1.1" 200 465
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\gentlemanboners\imgur\Jessica Biel 2013-12-10 1sjmf3.jpg
[directlink][debug] Using cached cookies from ('firefox', '', '', '', '')
[directlink][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/9vy8jy/.json?limit=500&raw_json=1 HTTP/1.1" 200 3697
[directlink][debug] Using cached cookies from ('firefox', '', '', '', '')
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/evelbu/.json?limit=500&raw_json=1 HTTP/1.1" 200 2607
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/4kaga5/.json?limit=500&raw_json=1 HTTP/1.1" 200 79828
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://i.imgur.com/TnQRX6v.gif'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/TnQRX6v?include=media%2Ctags%2Caccount HTTP/1.1" 200 476
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dwccm.mp4
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'http://i.imgur.com/HDXmmaw.gif'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/HDXmmaw?include=media%2Ctags%2Caccount HTTP/1.1" 200 446
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dlpu2.mp4
[gfycat][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://i.imgur.com/jPXSoLG.gifv'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/jPXSoLG?include=media%2Ctags%2Caccount HTTP/1.1" 200 555
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dqhfb.mp4
[directlink][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'http://i.imgur.com/BBbd8Mh.jpg'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/BBbd8Mh?include=media%2Ctags%2Caccount HTTP/1.1" 200 595
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dqqzh.jpg
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurGalleryExtractor for 'http://m.imgur.com/gallery/WjaT9rH'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/posts/WjaT9rH HTTP/1.1" 200 383
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://imgur.com/WjaT9rH'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/WjaT9rH?include=media%2Ctags%2Caccount HTTP/1.1" 200 562
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\your chariot awaits sir! - WjaT9rH.jpg
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'http://i.imgur.com/dpEBMhL.jpg'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/dpEBMhL?include=media%2Ctags%2Caccount HTTP/1.1" 200 450
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dui8z.jpg
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'http://i.imgur.com/Gyzupq9.gif'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/Gyzupq9?include=media%2Ctags%2Caccount HTTP/1.1" 200 567
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dvlta.mp4
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'http://imgur.com/sT5rSqQ'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/sT5rSqQ?include=media%2Ctags%2Caccount HTTP/1.1" 200 432
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dmvox.jpg
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'https://imgur.com/sT5rSqQ.jpg'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/sT5rSqQ?include=media%2Ctags%2Caccount HTTP/1.1" 200 432
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dmvse.jpg
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'http://i.imgur.com/dhMeAzK.gif'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/dhMeAzK?include=media%2Ctags%2Caccount HTTP/1.1" 200 558
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3e1dr7.mp4
[imgur][debug] Using cached cookies from ('firefox', '', '', '', '')
[imgur][debug] Using ImgurImageExtractor for 'http://i.imgur.com/IeEIabx.png'
[urllib3.connectionpool][debug] https://api.imgur.com:443 "GET /post/v1/media/IeEIabx?include=media%2Ctags%2Caccount HTTP/1.1" 200 458
[imgur][debug] Active postprocessor modules: [MetadataPP]
# C:\Users\mnoor\gallery-dl\reddit\WTF\imgur\None None d3dpj25.png
[urllib3.connectionpool][debug] https://oauth.reddit.com:443 "GET /comments/jyb5wh/.json?limit=500&raw_json=1 HTTP/1.1" 200 7414
[reddit][error] An unexpected error occurred: TypeError - _parse_browser_specification() takes from 1 to 4 positional arguments but 7 were given. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[reddit][debug]
Traceback (most recent call last):
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\job.py", line 97, in run
    self.dispatch(msg)
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\job.py", line 141, in dispatch
    self.handle_url(url, kwdict)
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\job.py", line 266, in handle_url
    if not self.download(url):
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\job.py", line 404, in download
    return downloader.download(url, self.pathfmt)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\downloader\ytdl.py", line 50, in download
    self.ytdl_instance = ytdl_instance = ytdl.construct_YoutubeDL(
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\ytdl.py", line 68, in construct_YoutubeDL
    return module.YoutubeDL(opts)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 767, in __init__
    self._setup_opener()
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3997, in _setup_opener
    self.cookiejar = load_cookies(opts_cookiefile, opts_cookiesfrombrowser, self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mnoor\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\cookies.py", line 104, in load_cookies
    browser_name, profile, keyring, container = _parse_browser_specification(*browser_specification)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: _parse_browser_specification() takes from 1 to 4 positional arguments but 7 were given
mikf commented 1 year ago

[reddit][debug] Using default API credentials (client-id 6N9uN0krSDE-ig)

It is still using the default and heavily rate limited client-id. Whatever you did to set your custom client-id had no effect, it seems.

Here's a minimal example that works:

{
    "extractor": {
        "reddit": {
            "client-id": "CLIENTID_HERE",
            "user-agent": "Python:<application name>:v1.0 (by /u/<username>)"
        }
    }
}

TypeError: _parse_browser_specification() takes from 1 to 4 positional arguments but 7 were given

This error is coming from yt-dlp. Your cookie settings there are probably not right or forward-cookies does not work anymore.

cheese529 commented 1 year ago

thank you mikf, it seems to be using my own client-id now, copy pasting your example did the trick. also regarding the other issue it seems like there is a bug with yt-dlp where it fails to download and embed thumbnails for reddit, it downloads html instead of png so the file just fails to open or embed. we are just going to have to wait for them to fix the reddit extractor by using the header "Accept:image/png"

cheese529 commented 1 year ago

Here is the full fix for anyone else who might want to use it.


index 13615e82f..813e62874 100644
--- a/yt_dlp/extractor/reddit.py
+++ b/yt_dlp/extractor/reddit.py
@@ -240,6 +240,7 @@ def add_thumbnail(src):
                 'url': unescapeHTML(thumbnail_url),
                 'width': int_or_none(src.get('width')),
                 'height': int_or_none(src.get('height')),
+                'http_headers': {'Accept': '*/*'},
             })

         for image in try_get(data, lambda x: x['preview']['images']) or []:```
Roccobot commented 1 year ago

Here's a minimal example that works:

{
    "extractor": {
        "reddit": {
            "client-id": "CLIENTID_HERE",
            "user-agent": "Python:<application name>:v1.0 (by /u/<username>)"
        }
    }
}

Thanks for the trick, @mikf !

Anyway, I'm getting this error while trying to refresh the token:

gallerydl

Then in the terminal I get:

immagine

Looks like it is working, but how do I understand if I'm using my own ID?

mikf commented 1 year ago

When it is using your custom client-id and is refreshing a private access token, it must be using your new refresh token.

[reddit][debug] Using custom API credentials (client-id NsuSQ*********)
[reddit][info] Refreshing private access token

You can also add this token to your config:

{
    "extractor": {
        "reddit": {
            "client-id": "CLIENTID_HERE",
            "user-agent": "Python:<application name>:v1.0 (by /u/<username>)",
            "refresh-token": "TOKEN_HERE"
        }
    }
}
Roccobot commented 1 year ago

[reddit][debug] Using custom API credentials (client-id NsuSQ*****) [reddit][info] Refreshing private access token

Sorry, I don't think I got it. I have no coding skills so I probably missed some steps. I added a row in the reddit configuration:

"refresh-token": "TOKEN_HERE",

using the token previously given to me by the application itself (the one I blurred out in the last screenshot). Should I take it elsewhere? And what should I see after clicking 'Allow' on Reddit?

Thanks

mikf commented 1 year ago

using the token previously given to me by the application itself (the one I blurred out in the last screenshot).

That's the value you are supposed to put into the TOKEN_HERE place, yes.

And what should I see after clicking 'Allow' on Reddit?

You should get redirected to http://localhost:6414/ and see the same message that gets displayed in console, which for me is

Your 'refresh-token' is

XXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Put this value into your configuration file as 
'extractor.reddit.refresh-token'
to use it.

Maybe it doesn't work properly on Windows anymore?

This refresh-token is only necessary to access your account's saved posts, private subreddits, etc. Anything you need an actual account for. The important thing is a custom client-id.

Roccobot commented 1 year ago

Maybe it doesn't work properly on Windows anymore?

Sorry, I didn't know I had to specify, but I'm on a Mac

Roccobot commented 1 year ago

Maybe I should stop retrying gallery-dl oauth:reddit... but I thought I needed to complete everything well at least once 🤔

mikf commented 1 year ago

I mean, if you somehow got a refresh token value, even if your browser showed an error, then that's perfectly OK. The console output is what really matters here.

Roccobot commented 1 year ago

OK so I don't know exactly how to check if everything is working fine, but I guess it is (seems that downloads from Reddit are working). I'll just go on this way and I'll ask for help only if new issues emerge, thanks :)

Hrxn commented 1 year ago
Your 'refresh-token' is

XXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Put this value into your configuration file as 
'extractor.reddit.refresh-token'
to use it.

Maybe it doesn't work properly on Windows anymore?

No, it's definitely still working on Windows, I've refreshed mine a couple of days ago.

It is all still working as usual!

@Roccobot From what I'm seeing here, it seems to work as expected.