setnicka / ulozto-downloader

EOL - end of life | Uloz.to quick multiple sessions downloader
MIT License
278 stars 46 forks source link

Requests through Tor blocked by CloudFlare #183

Open filo891 opened 1 year ago

filo891 commented 1 year ago

Seems Ulozto is striking back and CloudFlare is no longer only enabling bot protection, but compleely blocking Tor exit IPs.

I'm getting the following error on the Flaresolverr branch:

# python3 ulozto-downloader.py --parts-progress https://ulozto.sk/file/piKNXW6z8AA2/debian-11-7-0-amd64-netinst-iso
[Autodetect] tflite_runtime available, using --auto-captcha
Starting downloading for url 'https://ulozto.sk/file/piKNXW6z8AA2/debian-11-7-0-amd64-netinst-iso'
Getting info (filename, filesize, …)
Downloading into: './debian-11.7.0-amd64-netinst.iso'
You are lucky, this is slow direct download without CAPTCHA :)
[TOR]   TOR started
[Link solve]    TOR get downlink (timeout 30 sec)
[Link solve]    Direct download does not seem to work, trying with captcha resolution instead...
[Link solve]    TOR get new CAPTCHA (timeout 30 sec)
Cloudflare WAF still detected, enforcing automated Cloudflare Solver...
[Link solve]    TOR get new CAPTCHA (timeout 30 sec)
[Link solve]    Solving Cloudflare WAF challenge (timeout 90 sec)...
Terminating download. Please wait for stopping all threads.
Download terminated.
Traceback (most recent call last):
  File "/home/user/ulozto-downloader/ulozto-downloader.py", line 7, in <module>
    cmd.run()
  File "/home/user/ulozto-downloader/uldlib/cmd.py", line 157, in run
    d.download(url, args.parts, args.password, args.output, args.temp, args.yes, args.conn_timeout, args.enforce_tor)
  File "/home/user/ulozto-downloader/uldlib/downloader.py", line 282, in download
    download_url = next(self.captcha_download_links_generator)
  File "/home/user/ulozto-downloader/uldlib/page.py", line 335, in captcha_download_links_generator
    r = self.cfsolver.get(self.captchaURL)
  File "/home/user/ulozto-downloader/uldlib/cfsolver.py", line 241, in get
    return self.request(target, timeout, 'request.get')
  File "/home/user/ulozto-downloader/uldlib/cfsolver.py", line 236, in request
    raise RuntimeError(f"Cloudflare solver error: {result.get('message')}")
RuntimeError: Cloudflare solver error: Error: Error solving the challenge. Cloudflare has blocked this request. Probably your IP is banned for this site, check in your web browser.

And the view from Tor Browser: image

Is it still working for anybody, or we are done again?

zbyna commented 1 year ago

Same issue. I tried latest version of flaresolver without thinking and after failing I got feeling that problem is somewhere else: obrazek

Scavy commented 1 year ago

Same problem for me, these last few days. Tried with both FlareSolver 3.3.6 and 3.3.7. But it looks more like that all TOR exit node IPs has been blocked.. which would invalidate this project.

Only use I can imagine, is if it is possible to replace tor, with a proxy client and a list of proxies to use. And then be able to use those private proxies to split up the download process over multiple different IPs.

Vojtak42 commented 1 year ago

It works for me but like this: obrazek Still beter your result.

I'm rather having issues with this: Cannot download file: Process terminated: Acting on config options left us in a broken state. Dying. (on Tor 0.4.8.7 bf5e234d44e73127) Edit: so after 2 hours i was at 7 threads.

zbyna commented 1 year ago

Bridges could help to solve ip blocking issue? How to obtain bridge

Ghostman863 commented 1 year ago

Bridge is working if tor is blocked by your provider /country. So you will connect to bridge, then to tor and then to website. It will be the same. You must have different ip on end of the tor cycle (free proxy /VPN?). But on smartphone I had a error on uloz.to with comment by cloudflare. So uloz.to is using cloudflare for blocking tor ip. Maybe there will be a way to bypass cloudflare service.

angorak commented 1 year ago

Do we necessarily need to access it from the tor network ? When I start downloading (from one public IP) the same file with a clear cookies, it lets me download two and then there is a google recaptcha and after that it lets to download the next one. Wouldn't the google recaptcha solver solve this ?

zbyna commented 1 year ago

@Ghostman863 Thanks for clarification! Tor exit nodes are publicly available so it may be “easily” blocked by Cloudflare.This won’t be the way ☹️

Ghostman863 commented 1 year ago

We could try to use it with proxychain, where we can write a specific free proxy. Then connection will be pc-tor-PROXY-ulozto. With that we can bypass it, but i dont know how it will be work with downloader and changing IP for downloading. Or in issue (i think #157) setnicka wrote something like as "according to their terms, we dont violate anything". So we can try to contact theme for disable filter, because people from third world countries couldnt used it without tor :D

Mikkauser commented 1 year ago

Pekny den, prosim ktory fork momentalne funguje s rychlejsim stahovanim? Niekto v starych vlaknach doporucil pouzit nizsiu verziu, ale tych vlakien je uz tolko, ze naozaj netusim co funguje. je tu velmi vela vlakien :( Diky za pomoc !

zbyna commented 1 year ago

Zdravíčko, mně nefunguje ve více vláknech žádná verze. A to ani ta z docker image. ☹️ Už to ani nezkoušim.

Vojtak42 commented 1 year ago

Teď už je to asi jedno, ale jak to vlastně dělá jdownloader, že může stahovat více souborů najednou?