Skip to content

Make downloading faster and more efficient#12

Open
zeevox wants to merge 1 commit into
andyjsmith:masterfrom
zeevox:master
Open

Make downloading faster and more efficient#12
zeevox wants to merge 1 commit into
andyjsmith:masterfrom
zeevox:master

Conversation

@zeevox

@zeevox zeevox commented Nov 14, 2021

Copy link
Copy Markdown
  • Use multiprocessing for significantly faster downloads that actually max out the available bandwidth
  • Add persistent caching using diskcache library to skip unnecessary requests (this is useful when downloading a massive collection of photos for archival and the connection is interrupted or the program exits due to an error; this feature would need to be disabled if fetching new content from the collection of a user that has previously been downloaded)
  • Minor bug fixes, reformatting, refactoring...

NB: I made these changes to the code for myself, and only later thought of submitting a pull request. Perhaps this does not fit with the author's vision of the project and that is absolutely fine. I leave it here for those interested users with a similar use-case to mine.

* Use multiprocessing for significantly faster downloads that actually
  max out the available bandwidth
* Add persistent caching to skip unnecessary requests (this is useful
  when downloading a massive collection of photos for archival and the
  connection is interrupted or the program exits due to an error; would
  need to be disabled if fetching new content from the collection of a
  user that has previously been downloaded)
* Minor bug fixes, reformatting, refactoring...

Signed-off-by: Timothy Langer <zeevox.dev@gmail.com>
@jeprecated

Copy link
Copy Markdown

Can confirm: works like a charm 👍

@jeprecated

Copy link
Copy Markdown

[I would raise this as an issue on your repo @zeevox but it seems that issues are not enabled]

Though the caching needs a bit of work and can be confusing. I ran it without the session cookie the first time, to see what it could see publicly. After adding the session key it still only found the same public albums (due to the caching). Deleting the cache folder solved this, but it was rather confusing.

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