KevCui / animepahe-dl

:arrow_down: animepahe anime downloader
Do What The F*ck You Want To Public License
101 stars 24 forks source link

Add selenium for handling cloudflare protection #94

Closed lord8266 closed 11 months ago

lord8266 commented 11 months ago

I have added selenium to handle cloudflare protection page with selenium-webdriver npm package. One first request selenium is used and session details is saved to file, then on subsequent requests use curl with the session (useragent+cookies)

Please let me know if it works for you. Thanks

KevCui commented 11 months ago

Hey @lord8266, thanks for this PR. At this moment, I don't see cloudflare blocks the normal usage. If you got troubles with cloudflare when using the script, and this solution works for you, then please feel free to keep those changes in your repository. I will close this PR for now, if anyone else has troubles with cloudflare, I will refer to your PR. Thanks.

lord8266 commented 11 months ago

Pretty sure the other two bugs because of cloudflare

KevCui commented 11 months ago

@lord8266, possible. Let me check again and come back to you.

KevCui commented 11 months ago

@lord8266 I see, cloudflare is involved for the very first session. The latest commits should do the trick.

lord8266 commented 11 months ago

Nice @KevCui. I spent so much effort like a noob

lord8266 commented 11 months ago

Almost as if animepahe wants to allow scripts (What is the point of ddos protection if it allows scripts). Maybe ddos protection will activate if the ip sends too many requests and captcha will show up, then it is pretty much impossible at that point. Nice thinking though you really know what you are doing. I still too bad for open source sorry such a cringe pr

KevCui commented 11 months ago

Hey @lord8266, don't be sorry. Thanks to you, this issue is found and addressed. Your efforts are appreciated 👍