Closed mavi0 closed 1 year ago
I'm not seeing any issues downloading from scribblehub using FFF as normal without proxy. That suggests to me that you (or your IP) have been flagged for extra screening.
As for the changed AJAX input, I'm not hugely interested in changing it myself if it still works. But I will review and (probably) accept a PR that changes it, as long as it works.
As for the proxy status code issue, I hesitate very much to accept code 400 as the same as 200 across the board. Have you looked at what adapter_trekfanfictionnet.py does with a similar situation? That's a much more focused solution.
As for the proxy status code issue, I hesitate very much to accept code 400 as the same as 200 across the board. Have you looked at what adapter_trekfanfictionnet.py does with a similar situation? That's a much more focused solution.
Oh nice, I hadn't. I'll sort something like that and edit this PR when it's done. Thanks for the pointer!
I've posted a CLI test version, since that's what you presumably use.
Thanks! I use the calibre plugin normally, just the cli is easier to test with. Took forever, even with gigabit internet, and I haven't updated my library in a month or so, but I tested it in calibre on the hundred or so scribblehub (and other sites) fics in my reading list and it worked fine - just an fyi.
I know it's a bit of a niche thing this pr, but you mentioned the adaptor was working for you without flaresolverr - I just wanted to check with you what your user agent is set to, or if you can think of anything else in your personal.ini file which might help? I'm assuming you're in the US and from my tests, changing my IP to a non-EU place does seem to prevent the GDPR pop-up on scribblehub in the browser, but I still get a 403 - plus I've tried the cli on a bunch of servers I have access to (although they are all in countries with GDPR) and the same happens is all.
Yes, I in the US. If you updated that many stories at once, that's when I would expect you to get blocked by the site...
Oh, don't worry I was doing it one at a the cli, plus I'm still hammering them through the flaresolverr proxy. Only thing which seems to trip it up (with curl anyway) is if the useragent is left as default and Cloudlfare steps in - but 'User-Agent: Mozilla/5.0'
is enough to get past that.
Hi JimmXinu,
This is a 'fix' for the scribblehub adaptor which currently doesn't work at all. At the moment, by default it returns a 403 for the base url of a fic which genuinly confuses me and I can't find a reason for it - I can't replicate it with curl, and the closest I can get is a cloudlfare page if I don't set the useragent.
I figured it might be a cookie thing as Scribblehub now have a GDPR prompt, so I tried the flaresolverr plugin. This partially worked, but the part of the script which runs an ajax request for the table of contents returns the correct content but with a 400 code. It's wierd because I can curl that fine, and in the web browser I can do the request successfully even after deleting all the tracking/GDPR cookies and get a 200 back.
For example:
As a side note, scribblehub do appear to have changed the format of the query to something like this:
Instead of:
However, the previous query payload still works (and works just fine with curl and in the dom explorer in firefox) and the response can be parsed just fine by the rest of the program as is, and both queries return the same 400 code.
It does feel like a bodge, I have gone through requestable.py, fetcher.py and flaresolverr_proxy.py and as far as I can tell the request is formed correctly. From what I can tell this "fix" will have no impact on using flaresolverr for fanfiction.net, but just allows a 400 to be accepted just like 200 is - it's just super annoying I can't seem replicate getting a 400 code with curl or firefox.
Tested just on the cli on macos.