I changed the DanbooruRipper class to use OkHttpClient which should make things run faster and be a little easier (at least for Danbooru)
I tried getting a connection with Jsoup.connect using a bunch of headers. It seemed to work, but the data that came back made no sense. I could not figure out how to get it to not be gibberish, I know it was encoded via br (Brotli); therefore, I figured I might as well default to a library that can handle it.
So, all in all, just some tweaks to make DanbooruRipper more reliable - maybe
Testing
Required verification:
[X] I've verified that there are no regressions in mvn test (there are no new failures or errors).
[X] I've verified that this change works as intended.
[X] Downloads all relevant content.
[X] Downloads content from multiple pages (as necessary or appropriate).
[X] Saves content at reasonable file names (e.g. page titles or content IDs) to help easily browse downloaded content.
[X] I've verified that this change did not break existing functionality (especially in the Ripper I modified).
Optional but recommended:
[-] I've added a unit test to cover my change. -> There already was one.
Category
This change is exactly one of the following (please change
[ ]
to[x]
) to indicate which:https://regex101.com/r/sZD31Y/1
I changed the DanbooruRipper class to use OkHttpClient which should make things run faster and be a little easier (at least for Danbooru) I tried getting a connection with Jsoup.connect using a bunch of headers. It seemed to work, but the data that came back made no sense. I could not figure out how to get it to not be gibberish, I know it was encoded via br (Brotli); therefore, I figured I might as well default to a library that can handle it. So, all in all, just some tweaks to make DanbooruRipper more reliable - maybe
Testing
Required verification:
mvn test
(there are no new failures or errors).Optional but recommended: