Skip to content

Comments

Extra features: Download with cookies and more#1

Open
steveglowplunk wants to merge 6 commits intoMrMarnic:masterfrom
steveglowplunk:master
Open

Extra features: Download with cookies and more#1
steveglowplunk wants to merge 6 commits intoMrMarnic:masterfrom
steveglowplunk:master

Conversation

@steveglowplunk
Copy link

I could not find a Java download library anywhere that allows downloading with cookies so I wrote the feature myself based on this project.
Added the following features:

  • Use (Netscape format) cookies to download files that require login, optionally filter which domain name to load (to check if the cookie file contains the domain name that the programme expects)
  • Get filename automatically
  • Able to cancel during download
  • Get JSON (e.g. from a website API) as String objects
  • Convert file sizes from bytes to KB, MB, GB dynamically

I also updated the readme to reflect the new usage.

The downloadObject() method doesn't seem to work in my tests (on JDK 17).
Should be compatible with Java 8.

I have made a demo project for a more detailed demonstration of usage here.
Feel free to add it in the readme too.

This downloader library helped my project tremendously so thank you :)

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.

1 participant