Bionus / imgbrd-grabber

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

Extra data/text appended after file type extension [rule34hentai.net] #3084

Closed Ravannos closed 10 months ago

Ravannos commented 10 months ago

When trying to download from rule34hentai.net (under type Shimmie while using a US VPN connection), any file type that is not a video type (gif, jpg, png and the like) will have additional data appended after the file type extension.

For example, when using the naming system like so: " %artist%/%position%-%date%-%md5%.%ext% "; the filename of the downloaded image becomes " 1-01-18-2024 20.02-aba1e603c89e5ad8fa68ec14e8cdd344.jpg data-width= 3000 data-height= 2800 data-mime= image jpeg "

Looking closer at the url of rule34hentai.net, the same appended text data is present in the url, also appended after the file type. Grabber is likely pulling this part of the url.

Steps to reproduce

  1. Add rule34hentai.net under the type Shimmie
  2. Connect to a US VPN connection
  3. Download a non-video file
  4. Downloaded file will be have the unwanted appended text

Expected behavior The downloaded file's name should not have "data-width= 3000 data-height= 2800 data-mime= image jpeg" appended at its end

Context main.log & settings.ini: main.log-settings.ini_2024-1.zip .igl: rule34hentai.net_log.zip

Screenshots grabber-rule34hentai filename bug

System information

Bionus commented 10 months ago

I could indeed reproduce the issue. Seems like the regex for parsing image URLs on Shimmie's detail page didn't properly stop at the double quote in the image tag and kept going, grabbing unnecessary stuff.

I just pushed a fix, thanks for the report 👍

Ravannos commented 10 months ago

I'd also like to report here for anyone else looking into it that manually editing Shimmie's model.js with the provided edit works wonderfully. Just remember to remove and re-add rule34hentai.net to make it stick.

Much obliged boss man. Thanks for your kind help.