Skip to content

Conversation

@kan-fu
Copy link
Collaborator

@kan-fu kan-fu commented Jan 13, 2025

Fix #56

Added two methods (getArchivefileUrl and getArchivefileUrls) to only return the URLs of the archivefiles so users can use them in their favorite download manager.

Also added an example of how to do that in aria2c.

file_urls = self.archive.getArchivefileUrls(filters, allPages)
if joinedWithNewline:
return "\n".join(file_urls)
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nitpicky comment, but the 'else' is unnecessary, ie:

        if joinedWithNewline:
            return "\n".join(file_urls)
        return file_urls

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I normally omit the else when the else part is substantially bigger than the if part, so that it avoids the nesting for the longer code lines by ruling out those small and edge cases in the very beginning. For a one-liner, it looks more balanced to me inside an indentation block. Just a personal preference.

@spencerwplovie spencerwplovie merged commit abd6232 into main Jan 23, 2025
6 checks passed
@kan-fu kan-fu deleted the issue-56-archivefile-links branch February 7, 2025 21:54
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.

Make downloading archivefiles easier by using a download manager

3 participants