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

[Newgrounds] Only first file in a multi-GIF post is downloaded #4642

Closed
MarqFJA87 opened this issue Oct 8, 2023 · 6 comments
Closed

[Newgrounds] Only first file in a multi-GIF post is downloaded #4642

MarqFJA87 opened this issue Oct 8, 2023 · 6 comments

Comments

@MarqFJA87
Copy link

Whenever I try to download a Newgrounds post with multiple embedded GIF files, it only ever downloads the very first image.

Sample: https://www.newgrounds.com/art/view/zedrinbot/lewd-animation-tutorial (NSFW)

I'm suspecting that the program's lack of properly adding a numerical index to each image when generating names for them causes it to assume that each one has the exact same name, which then makes it mistakenly believe that it has already downloaded the subsequent images. And no, I tried to see if I can force a custom name format with proper numbering; there's no option for such at all.

PS: It always bugged me that only extra static images in a post ever get numerically indexed, with the full-sized first image in such posts being bare of such numbering (thus messing up the file order within each set).

@mikf
Copy link
Owner

mikf commented Oct 9, 2023

I'm suspecting that the program's lack of properly adding a numerical index to each image when generating names for them causes it to assume that each one has the exact same name, which then makes it mistakenly believe that it has already downloaded the subsequent images

No, it simply did not support these kinds of extra images yet.

PS: It always bugged me that only extra static images in a post ever get numerically indexed, with the full-sized first image in such posts being bare of such numbering (thus messing up the file order within each set).

{num|'0':>02}

The current names were chosen for backwards compatibility with names and archive IDs before c5e3971 / #1033, when each post was assumed to contain exactly 1 file.

@MarqFJA87
Copy link
Author

@mikf Okay, I tested the implemented fix, and it kinda worked. It does download all images, but only the first image is properly full-sized.

Example link (NSFW): https://www.newgrounds.com/art/view/zedrinbot/mega-miia-milk-paizuri

Both images should be at 1500x1500 px size, but only the first image is downloaded as such (and as a gif), while the second image is reduced to 960x960 and is downloaded as webp; this is highlighted when you look at the image's mirror on rule34.xxx, which is a 1500x1500 gif file.

@mikf mikf reopened this Oct 13, 2023
@MarqFJA87
Copy link
Author

Sidenote: I've observed this reduction in dimensions in the past with the webp files that are downloaded from multi-image posts, but now I'm starting to wonder if this is actually normal as I had assumed, or if it's an earlier manifestation of the problem that I had noted in my previous comment that simply went undiagnosed.

mikf added a commit that referenced this issue Oct 13, 2023
- download files in original resolution
- replace .webp with extension of first file
@mikf
Copy link
Owner

mikf commented Oct 13, 2023

Should be fixed/improved with c4c4e4d.

I managed to make the wrong assumption that /medium_views/ URLs are to be preferred over /images/ ones since they do have a higher resolution in your first example (960x960 vs 900x900).

I've also have it replace .webp extensions with the one of the first URL in a post, which at least works for posts from https://zedrinbot.newgrounds.com/art. It now downloads .png or .gif for all extra images if the first post has a non-webp extension.

I've observed this reduction in dimensions in the past with the webp files that are downloaded from multi-image posts, but now I'm starting to wonder if this is actually normal as I had assumed,

I'd say that's "normal", considering that gallery-dl supported only comment embeds for multi-image posts and they only have one working URL and format.

@God-damnit-all
Copy link
Contributor

@mikf Newgrounds has recently created a new multi-image gallery submission type that isn't being parsed correctly, only the first image is being grabbed:

https://www.newgrounds.com/art/view/bacun/kill-la-kill-10th-anniversary

@mikf
Copy link
Owner

mikf commented Oct 16, 2023

@ImportTaste Got it. Will be adding support for these multi-image posts in the coming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants