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

Batch downloading games from Newgrounds #2955

Closed
Corrupt-Specturion opened this issue Sep 22, 2022 · 10 comments
Closed

Batch downloading games from Newgrounds #2955

Corrupt-Specturion opened this issue Sep 22, 2022 · 10 comments

Comments

@Corrupt-Specturion
Copy link

Since gallery-dl doesn't seem to have the ability to batch download Newgrounds users' games (individual game links work, but downloading the whole user page doesn't download the games, and gallery-dl https://(user).newgrounds.com/games returns [ytdl][warning] [generic] Falling back on generic information extractor [ytdl][error] ERROR: Unsupported URL: https://(user).newgrounds.com/games [ytdl][error] Failed to extract video data), is there a way I can? Alternatively, is this feature planned?
I apologize if this doesn't quite belong in the issues category.

@afterdelight
Copy link

use link gopher extension as an alternative

@Corrupt-Specturion
Copy link
Author

It needs to be hands-off automated like the rest of gallery-dl, so this doesn't quite cut it. Thanks for the suggestion though. (I do now realize that I should have specified in the post.) While we're specifying things, it needs to be Linux Mint Mate 20.2 compatible, and preferably a CLI program.

@mikf
Copy link
Owner

mikf commented Sep 23, 2022

individual game links work

It might appear that way, but it really doesn't. It downloads a "zip" file, which is actually just the main HTML page of a game without any of its code or resource files.

Making it work properly is also not easily possible with how gallery-dl works internally, given it uses customizable filenames for every file it downloads.

This is also the reason why /games listings are not supported.
You got an ytdl error since you have the ytdl extractor enabled, I presume, which gets all URLs unsupported by gallery-dl.

@Corrupt-Specturion
Copy link
Author

Corrupt-Specturion commented Sep 23, 2022

By "game", I meant Flash games, sorry if that was unclear. I already know about the HTML5 game issues.

@Corrupt-Specturion
Copy link
Author

Would there be a way to only have it download Flash games from the games section?

@afterdelight
Copy link

you mean the .swf files?

@Corrupt-Specturion
Copy link
Author

Yes

@mikf
Copy link
Owner

mikf commented Sep 27, 2022

Downloading everything from /games got implemented in 0393e59.

I didn't realize there are still .swf games available on Newgrounds and thought that all had been converted to HTML5, but there are even ones from 2022: https://www.newgrounds.com/portal/view/829032

Would there be a way to only have it download Flash games from the games section?

--filter "extension == 'swf'" should do that.

@Corrupt-Specturion
Copy link
Author

Thanks. One last question, though: does --filter "extension == 'swf'" only apply to the games section, given gallery-dl https://[user].newgrounds.com?

@mikf
Copy link
Owner

mikf commented Sep 27, 2022

No, --filter applies globally / to everything.

You can use the image-filter option (wrong name, I know) to set a filter for only the games subcategory, either with -o extractor.newgrounds.games.image-filter="extension == 'swf'" on command-line or by setting this option inside "games" inside "newgrounds" in your config file.

edit: Another method would be checking whether the file in question is of type game first (ff532d6):
--filter "type != 'game' or extension == 'swf'"

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