Skip to content

Conversation

Oblomov
Copy link

@Oblomov Oblomov commented Jul 24, 2025

This introduces a tentative bundle support loading the bundle game list from the bundle download page(s), parsing the HTML and finding the games page links, similarly to how browser pages are handled. At least here this seems to be sufficient to download the bundle games, even the ones that were not explicitly added to the library or for which the download page was otherwise accessed.

The first commit actually introduces support for loading session cookies from a Mozilla-format text cookie jar file, which for me was necessary to download the bundle HTML, as discussed in issue #11. It is possible that this groundwork could turn useful also to access some restricted game pages (issue #16), although probably not the password-protected ones.

Oblomov added 2 commits July 24, 2025 22:09
These can be used to access web pages that are only accessible
when the user is logged in.
This fetches the paginated bundle HTML and parses them for game titles,
collecting the game page link pages to be passed to the other handlers
(in this sense, it works similarly to the browsers handler).
@Oblomov
Copy link
Author

Oblomov commented Jul 25, 2025

OK after some additional testing it seems this is not sufficient for all games, so I will see if I can add the “click download link” effect.

Oblomov added 2 commits July 25, 2025 08:03
When a path to a file containing a list of URLs is passed on the
command-line, do not assume it's a list of Game URLs, but process each
URL as an Itch URL, so that users can pass a list of collections or
bundles too.
@DragoonAethis
Copy link
Owner

Yeah, this is consistent with what I saw 2 years back - itch website can tell you that you've purchased a given item in the past in a bundle, but the download key still needs manual action. I need to take a look at the requests and see if there's a pattern to how it attaches the keys. I'll have a look at this over the weekend - thanks!

Oblomov added 3 commits July 25, 2025 14:57
When processing a bundle, do a POST of any claim founds so that the games
can subsequently be downloaded.
When a downloader job finds nothing to download, but there is a claim
form in the page, try claiming the game and mark the download for
retrial.

After all jobs are completed, if any job needs to be retried,
fetch the download keys again (to get the new ones from the claims)
and run the download jobs again specifically on the ones that need to be
retried.
@Oblomov
Copy link
Author

Oblomov commented Jul 25, 2025

I've implemented game claiming. This is done by the bundle job handler when user provides a bundle URL, but also by the downloader itself when it comes across a page for a game with no downloads and a claim form. If any such download job is encountered, these will be retried after claiming and re-fetching the keys, at the end of the entire download drive.

@Oblomov Oblomov mentioned this pull request Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants