Bionus / imgbrd-grabber

Very customizable imageboard/booru downloader with powerful filenaming features.
https://www.bionus.org/imgbrd-grabber/
Apache License 2.0
2.51k stars 216 forks source link

Renaming files with twitter api or pixiv produces and error and the progress bar stays at 0/2000+ #2516

Closed GrimoireVoss closed 2 years ago

GrimoireVoss commented 2 years ago

Bug description

Whenever I try to rename pictures downloaded from twitter or pixiv, I get the below error and my progress bar stays at 0/2136. Something of note, the file names that have been downloaded manually from twitters site look nothing like they do when using grabber to download. (i.e. something akin to FDW3SeMakAEJWF_ as opposed to d41d8cd98f00b204e9800998ecf8427e with grabber.)

Steps to reproduce

  1. Go to 'Rename existing files'
  2. Click on 'api.twitter'
  3. See error

Expected behavior

The renaming tool to rename all pictures downloaded from twitter to a filename with the author, copyright, or characters.

Context

[21:45:08.740][Info] Temp directory purged of 0/0 files (0 failed) [21:45:08.890][Info] Software version: 7.6.2. [21:45:08.891][Info] Software CPU architecture: x64. [21:45:08.892][Info] Computer CPU architecture: x86_64. [21:45:08.892][Info] Qt CPU architecture: x86_64. [21:45:08.892][Info] Computer platform: Windows 10 Version 2009. [21:45:08.893][Info] Path: C:/Program Files/Grabber [21:45:08.893][Info] Loading preferences from C:/Users/Larom/AppData/Local/Bionus/Grabber/settings.ini [21:45:08.894][Info] Temporary path: C:/Users/Larom/AppData/Local/Temp\Grabber [21:45:08.894][Info] Sources found: 21 [21:45:08.895][Info] SSL libraries: OpenSSL 1.1.1l 24 Aug 2021 [21:45:08.906][Info] Setting language to 'English' (C:\Program Files\Grabber\languages\English.qm)... [21:45:08.909][Info] 21 sources found: anime-pictures.net (Anime pictures), api.twitter.com (Twitter), behoimi.org (Danbooru), danbooru.donmai.us (Danbooru (2.0)), derpibooru.org (Philomena), e-hentai.org (E-Hentai), e621.net (E621), exhentai.org (E-Hentai), gelbooru.com (Gelbooru (0.2)), hijiribe.donmai.us (Danbooru (2.0)), konachan.com (Moebooru), nhentai.net (NHentai), rule34.paheal.net (Shimmie), rule34.xxx (Gelbooru (0.2)), safebooru.org (Gelbooru (0.2)), sonohara.donmai.us (Danbooru (2.0)), tentaclerape.net (Shimmie), www.deviantart.com (DeviantArt), www.pixiv.net (Pixiv), www.zerochan.net (Zerochan), yande.re (Moebooru) [21:45:08.999][Info] Updating checkboxes. [21:45:09.015][Info] [api.twitter.com] Logging in... [21:45:09.015][Info] [api.twitter.com] Login finished: success. [21:45:09.021][Info] Updating checkboxes. [21:45:09.045][Info] Monitoring starting [21:45:09.131][Info] Monitoring tick [21:45:09.133][Info] Monitoring finished [21:45:34.731][Info] [api.twitter.com][Json] Loading page https://api.twitter.com/1.1/statuses/user_timeline.json?count=1&include_rts=true&exclude_replies=false&tweet_mode=extended&screen_name=md5%3A00056789f7bc233ee0bc4b33455a2ca7 [21:45:34.956][Info] [api.twitter.com][Json] Receiving page https://api.twitter.com/1.1/statuses/user_timeline.json?count=1&include_rts=true&exclude_replies=false&tweet_mode=extended&screen_name=md5%3A00056789f7bc233ee0bc4b33455a2ca7 [21:45:34.956][Error] [api.twitter.com][Json] Loading error: Error transferring https://api.twitter.com/1.1/statuses/user_timeline.json?count=1&include_rts=true&exclude_replies=false&tweet_mode=extended&screen_name=md5203A00056789f7bc233ee0bc4b33455a2ca7 - server replied: Not Found (%4) [21:45:34.958][Warning] [api.twitter.com] No valid source of the site returned result.

System information

Windows 10

Bionus commented 2 years ago

I just pushed a few changes to allow renaming images from Twitter and Pixiv that should land in the nightly release soon. However, note that Pixiv seem to be all-around broken at the moment.

You'll in any case need the original ID in order for Grabber to make the link between the file and the image on the website.

Something of note, the file names that have been downloaded manually from twitters site look nothing like they do when using grabber to download. (i.e. something akin to FDW3SeMakAEJWF_ as opposed to d41d8cd98f00b204e9800998ecf8427e with grabber.)

That's what correspond to the %filename% token for Twitter I guess. In that case, unfortunately, there's no way for the program to find out the original tweet from that. You'll need the tweet ID, so that the program can load the details from the /1.1/statuses/show.json?id=$ID API endpoint.