mikf / gallery-dl

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

Bluesky: API request failed ('AuthMissing: Authentication Required') when authenticating with netrc #5780

Open GiovanH opened 6 days ago

GiovanH commented 6 days ago

Sample:

py -3.11 -m gallery_dl https://bsky.app/profile/im.giovanh.com --verbose --netrc
[gallery-dl][debug] Version 1.27.1 - Git HEAD: 8bb793e2
[gallery-dl][debug] Python 3.11.5 - Windows-10-10.0.19045-SP0
[gallery-dl][debug] requests 2.31.0 - urllib3 1.26.18
[gallery-dl][debug] Configuration Files ['%APPDATA%\\gallery-dl\\config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://bsky.app/profile/im.giovanh.com'
[bluesky][debug] Using BlueskyUserExtractor for 'https://bsky.app/profile/im.giovanh.com'
[bluesky][debug] Using BlueskyMediaExtractor for 'https://bsky.app/profile/im.giovanh.com/media'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): bsky.social:443
[urllib3.connectionpool][debug] https://bsky.social:443 "GET /xrpc/com.atproto.identity.resolveHandle?handle=im.giovanh.com HTTP/1.1" 200 42
[urllib3.connectionpool][debug] https://bsky.social:443 "GET /xrpc/app.bsky.feed.getAuthorFeed?actor=did%3Aplc%3Akjx6y3groxh3sy5tkfyji6sy&filter=posts_with_media&limit=100 HTTP/1.1" 401 59
[bluesky][debug] Server response: {"error":"AuthMissing","message":"Authentication Required"}
[bluesky][error] API request failed ('AuthMissing: Authentication Required')

Looks like it's failing to authenticate the feed call?

mikf commented 5 days ago

Everything except likes on Bluesky should be accessible without authentication, and it is for me.

$ gallery-dl https://bsky.app/profile/im.giovanh.com -v
[gallery-dl][debug] Version 1.27.2-dev - Git HEAD: 0bb88318
[gallery-dl][debug] Python 3.12.4 - Linux-6.9.5-arch1-1-x86_64-with-glibc2.39
[gallery-dl][debug] requests 2.31.0 - urllib3 2.1.0
[gallery-dl][debug] Configuration Files ['${HOME}/.gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://bsky.app/profile/im.giovanh.com'
[bluesky][debug] Using BlueskyUserExtractor for 'https://bsky.app/profile/im.giovanh.com'
[bluesky][debug] Using BlueskyMediaExtractor for 'https://bsky.app/profile/im.giovanh.com/media'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.bsky.app:443
[urllib3.connectionpool][debug] https://api.bsky.app:443 "GET /xrpc/com.atproto.identity.resolveHandle?handle=im.giovanh.com HTTP/1.1" 200 42
[urllib3.connectionpool][debug] https://api.bsky.app:443 "GET /xrpc/app.bsky.feed.getAuthorFeed?actor=did%3Aplc%3Akjx6y3groxh3sy5tkfyji6sy&filter=posts_with_media&limit=100 HTTP/1.1" 200 None
bluesky/im.giovanh.com/2024-06-21T16:31:33_3kvh5viuwkb2i_1.jpg
bluesky/im.giovanh.com/2024-06-21T16:31:33_3kvh5viuwkb2i_2.jpg
...

Try gallery-dl --clear-cache bluesky Maybe it cached some "wrong" tokens.