Closed zroaxcel closed 4 years ago
I haven't got time to release the patch yet. But one is almost ready.
I actually hope to release it this weekend
Thank you very much for the news. I thought this project already dead.
Should be fixed in 0.3.7. Please feel free to try and report (note the changes in the release note).
Doesn't seem to work to me. Cookies.txt path is configured as well as user agent.
In order to dig deeper into this matter, can you confirm the following ?
Yes to all of the above.
I just retried and it seems to work.
Could you post your settings.xml file (it should be next to the executable jar file) and the javlibrary lines in cookies.txt ? (do not post the whole file if it contains cookies for authenticated websites)
I just retried and it seems to work.
Could you post your settings.xml file (it should be next to the executable jar file) and the javlibrary lines in cookies.txt ? (do not post the whole file if it contains cookies for authenticated websites)
https://hatebin.com/ddkcrhqsug https://hatebin.com/mmfsspukqm
Is the first line of the pasted cookies.txt really starts with tab character or is it due to copy/paste operations ?
No, oops, bad copy-paste.
Comparing from what i have, there also see a missing cookie named __qca. Do you have this cookie in your cookie file ?
You should also note that cookies from cloudflare are only valid about half an hour
I don't have that in the first place, no, even after examining the cookies stored in the browser.
Can you check the cookies sent by your browser during the request ?
In firefox, it's accessible using F12 menu then network, pick a request to javlibrary and open cookies tab
Host: www.javlibrary.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Referer: http://www.javlibrary.com/en/
Cookie: __cfduid=d1d466aaf068521bf3121957d989519d71565570145; cf_clearance=44850904ae20e1bb5f37a4d8effd25a17406dda6-1565570149-3600-150; timezone=-480; over18=18
Upgrade-Insecure-Requests: 1
Ok, i think i got it. You put "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.145 Safari/537.36 Vivaldi/2.6.1566.49" as a user agent in JAVMS but your web browser send "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0"
Please can you try to set user agent to "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0" and retry ?
Er, that's because I used a different browser just to get the cookies you mentioned. In previous attempts, I was indeed using Vivaldi with the same cookies in cookies.txt.
Okay, it works now after I switched to Firefox with Firefox cookies. For some reason Vivaldi with the Vivaldi cookies didn't seem to work?
Edit: Regardless, having users do this manually would definitely cause confusion especially since CF cookies expire pretty quickly. Preferably this should be automated where possible, even if it means user has to interact with a browser inside the Java client.
For sure the renewable of cookies must be done very often.
I will think of a way to automate this.
Perhaps using the requiring an installed Firefox browser and creating a dedicated profile with a web extention could do the job without user interaction by firing the browser when needed. But it will need some work and test
Anyway to fix this issue?