Aivean / royalroad-downloader

https://royalroad.com book downloader
MIT License
57 stars 4 forks source link

HTML comes back empty #24

Closed aditzamoldovan closed 2 years ago

aditzamoldovan commented 2 years ago

Hi, I m not that technical but managed to get the downloader to work and already got a few books just fine.

However, when downloading this book specifically, the HTML comes back empty. The downloader identifies the book just fine, with name and all just no content there. Any help would be greatly appreciated :)

The book: https://www.royalroad.com/fiction/26727/arkendrithyst

The execute I'm using (works for other books): java -jar royalroad-downloader-assembly-2.4.0.jar http://royalroadl.com/fiction/26727

Aivean commented 2 years ago

Hi, it works fine for me. However, the output is large (19M). Have you tried giving java more memory java -Xmx2G -jar ...? Do you see any errors in the output? What java version are you using java -version?

Also, please double check that html is actually empty, check the file size and try opening it with text editor.

aditzamoldovan commented 2 years ago

Hi @Aivean thanks for replying. I'm running java version 1.8.0_311.

My HTML file is 0 KB and empty when opened with notepad.

I've increase java memory to 1G but the HTML is still empty.

I tried looking for errors in the output but my command window closes after executing. I've tried googling for a few solutions but unsuccessfully so far. Any ideas how i could stop it from doing so? i'm running Windows 10 64bit.

Aivean commented 2 years ago

I need to know the output to diagnose what went wrong. Try opening terminal cmd first and running Java from there.

aditzamoldovan commented 2 years ago

I've run the commands through cmd and this is what i've got (see screenshots) .I also increased the runtime parameters memory to 5G for heap space but it still runs out of memory somehow.

I got the same error and I believe roughly the same amount of chapters 'downloading' & 'parsing' in the cmd window as when the memory was 4G or 3G so basically increasing that runtime parameters memory didn't seem to change anything at a glance.

image image

Aivean commented 2 years ago

Ok, I decided it would be easier to fix the underlying issue than try to figure out how to specify -Xmx on windows correctly.

Especially, since the fix was long overdue: #8 #10 #17 😄

Please try the new version: https://github.com/Aivean/royalroad-downloader/releases/tag/2.5.0

aditzamoldovan commented 2 years ago

works perfectly now, thanks a lot for the update @Aivean 😄