ulozto-downloader
ulozto-downloader copied to clipboard
CloudFlare challenge solver support
This is an attempt to bypass the CloudFlare WAF (web application firewall) using Flaresolverr. This is a potential fix for issues #157, #170 and #172.
The code is not yet stable and not ready to be merged to Master, contributions to make it mergeable are more than welcome :).
How to run this version of the Ulozto Downloader
This version of the Downloader requires an instance of Flaresolverr running ~in headful mode~ on localhost.
- Download the Flaresolverr binary from https://github.com/FlareSolverr/FlareSolverr/releases
- Start the service:
On Linux
On Windows (cmd.exe)./flaresolver
On Linux via Docker (attached to Host network)flaresolver.exedocker run -d \ --name=flaresolverr \ -p 8191:8191 \ -e LOG_LEVEL=info \ --restart unless-stopped \ --network host \ ghcr.io/flaresolverr/flaresolverr:latest - Run the Ulozto Downloader from this branch. It will automatically connect use the Flaresolverr service to proxy requests to Ulozto.
python3 ulozto-downloader.py -t --parts-progress https://uloz.to/file/qDF5FrZU4GBi/debian-live-11-6-0-amd64-xfce-iso
Major issues remaining to solve
-
~~Flaresolverr only seems to be able to resolve the CloudFlare challenge for Ulozto when running in headful mode. The recommended way to run Flaresolverr is via a Docker container, but both this way and running the executable in a default headless mode causes the challenge solver to time out (the ulozto/cloudflare website is not displaying the challenge until it detects user interaction with the browser). Running the executable with the environment variable HEADLES=false results in Chromium browser windows popping up and the CloudFlare challenges being successfully resolved when the Chromium window is focused on. To fix this, it will most likely require updates in the Flaresolverr code itself.~~
-
~Once we get Flaresolverr to be usable in headless mode,~ an automatic download/update feature shall be implemented in the Ulozto Downloader, so the user does not need to worry about setting up third-party dependencies.
-
The Flaresolverr binary currently only works on newer versions of Linux (Python 3.11 dependency on GLIBC_2.35). For easy usability of the Downloader we shall find a way to embed it in a way that it will be compatible with everything the Downloader itself is compatible with.
-
The first point seems have been my misunderstanding and Flaresolverr actually works well also in headless mode - both on Windows and on Linux inside a Docker container. What I have noticed thought is that sometimes it can take several minutes until the browser is loaded, while normally the browser starts up and resolves the captcha in around 15-30 seconds.
-
~As the Flaresolverr challenge resolution can take around 30-60 seconds per download part, it take quite long to start downloading at a decent speed. A feature for parallelizing the challenge resolution via multiple parallel Tor circuits could improve this.~
Thank you for your effort. This would be great for fixing ulozto-downloader.
As of point 3 I think it would be best to create Docker image and provide whole package of all apps at once. It's already complicated to get auto captcha working from installing from PIP for some systems. For example I can't get it work on Debian 12 Bookworm because I got "Illegal instruction" error when running ulozto-downloader.
EDIT: Got it working on my Windows machine. But still affected by #172 even when HEADLESS set to false or true.
I have been testing this since yesterday, and today I got this error:
The download continues, but it stops processing new parts.
I've never had any error resembling this, so I guess it must be related to this PR.
I have been testing this since yesterday, and today I got this error:
The download continues, but it stops processing new parts.
I've never had any error resembling this, so I guess it must be related to this PR.
This was some leftover code from the previous version, it is fixed in 99178d6. This however should not have affected the downloader. I think that was related to the Flaresolverr taking sometimes too long (several minutes) to launch the browser and resolve the captcha.
EDIT: Got it working on my Windows machine. But still affected by #172 even when HEADLESS set to false or true.
Could you perhaps check if there is anything relevant in the Flaresolverr logs? You can also try to set LOG_LEVEL=debug.
I can't see any problem except there is only one POST request to flaresolverr.
C:\Users\user\Downloads\flaresolverr_windows_x64\flaresolverr>flaresolverr.exe
2023-08-18 06:58:34 INFO ReqId 17268 FlareSolverr 3.3.2
2023-08-18 06:58:34 DEBUG ReqId 17268 Debug log enabled
2023-08-18 06:58:34 INFO ReqId 17268 Testing web browser installation...
2023-08-18 06:58:34 INFO ReqId 17268 Platform: Windows-10-10.0.22621-SP0
2023-08-18 06:58:34 INFO ReqId 17268 Chrome / Chromium path: C:\Users\user\Downloads\flaresolverr_windows_x64\flaresolverr\chrome\chrome.exe
2023-08-18 06:58:34 INFO ReqId 17268 Chrome / Chromium major version: 115
2023-08-18 06:58:34 INFO ReqId 17268 Launching web browser...
2023-08-18 06:58:34 DEBUG ReqId 17268 Launching web browser...
2023-08-18 06:58:34 DEBUG ReqId 17268 Started executable: `C:\Users\user\appdata\roaming\undetected_chromedriver\chromedriver.exe` in a child process with pid: 12744
2023-08-18 06:58:35 INFO ReqId 17268 FlareSolverr User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
2023-08-18 06:58:35 INFO ReqId 17268 Test successful!
2023-08-18 06:58:35 INFO ReqId 17268 Serving on http://0.0.0.0:8191
2023-08-18 06:58:44 INFO ReqId 24808 Incoming request => POST /v1 body: {'cmd': 'sessions.list'}
2023-08-18 06:58:44 DEBUG ReqId 24808 Response => POST /v1 body: {'status': 'ok', 'message': '', 'sessions': [], 'startTimestamp': 1692334724705, 'endTimestamp': 1692334724705, 'version': '3.3.2'}
2023-08-18 06:58:44 INFO ReqId 24808 Response in 0.0 s
2023-08-18 06:58:44 INFO ReqId 24808 127.0.0.1 POST http://127.0.0.1:8191/v1 200 OK
and ulozto-downloader log
CAPTCHA protected download - CAPTCHA challenges will be displayed
[TOR] TOR started
[Link solve] TOR get new CAPTCHA (timeout 30)
[Link solve] ERROR: Cannot parse CAPTCHA image URL from the page. Changing Tor circuit.
[Link solve] TOR get new CAPTCHA (timeout 30)
[Link solve] ERROR: Cannot parse CAPTCHA image URL from the page. Changing Tor circuit.
[Link solve] TOR get new CAPTCHA (timeout 30)
[Link solve] ERROR: Cannot parse CAPTCHA image URL from the page. Changing Tor circuit.
[Link solve] TOR get new CAPTCHA (timeout 30)
[Link solve] ERROR: Cannot parse CAPTCHA image URL from the page. Changing Tor circuit.
[Link solve] TOR get new CAPTCHA (timeout 30)
[Link solve] ERROR: Cannot parse CAPTCHA image URL from the page. Changing Tor circuit.
[Link solve] TOR get new CAPTCHA (timeout 30)
I can't see any problem except there is only one POST request to flaresolverr.
That is the first request to test whether the service is reachable. For some reason it does not attempt to connect to Flaresolverr any further. This might be due to an unexpected response from the ulozto websire.
What is the file you are downloading and the exact arguments passed to the downloader?
python ulozto-downloader.py --auto-captcha 'https://uloz.to/file/G9lP6ENk8kXZ/rick-a-morty-s05e08-rickternal-friendshine-of-the-spotless-mort-1080p-web-dl-cz-dabing-mkv#!ZGN2ZQR2ZmOwBGRlZwqvZJWvATL2MScLnmt3GIOcoKVjJQZ5At=='
and my Python version is Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
Could you try to add also --enforce-tor?
Yes. It's working now with this argument.
OK, I'll try to find out what's wrong and fix it over the weekend.
@pkejval everything should be working now without the need to set --enforce-tor in the latest version on 97a8d9b.
Unfortunately still not working for me.
python ulozto-downloader.py --auto-captcha 'https://uloz.to/file/G9lP6ENk8kXZ/rick-a-morty-s05e08-rickternal-friendshine-of-the-spotless-mort-1080p-web-dl-cz-dabing-mkv#!ZGN2ZQR2ZmOwBGRlZwqvZJWvATL2MScLnmt3GIOcoKVjJQZ5At=='
Starting downloading for url 'https://uloz.to/file/G9lP6ENk8kXZ/rick-a-morty-s05e08-rickternal-friendshine-of-the-spotless-mort-1080p-web-dl-cz-dabing-mkv#!ZGN2ZQR2ZmOwBGRlZwqvZJWvATL2MScLnmt3GIOcoKVjJQZ5At=='
Getting info (filename, filesize, …)
Downloading into: './Rick.a.Morty.S05E08.Rickternal.Friendshine.of.the.Spotless.Mort.1080p.WEB-DL.CZ-dabing.mkv'
CAPTCHA protected download - CAPTCHA challenges will be displayed
[TOR] TOR started
[Link solve] TOR get new CAPTCHA (timeout 30)
[Link solve] ERROR: Cannot parse CAPTCHA image URL from the page. Changing Tor circuit.
[Link solve] TOR get new CAPTCHA (timeout 30)
[Link solve] ERROR: Cannot parse CAPTCHA image URL from the page. Changing Tor circuit.
and there are no requests for FlareSolverr - just that first POST. With --enforce-tor it is working great.
I think it'll be problem with my network. I'm trying it at work where we're using WPAD for autoconfigure proxy maybe FlareSolverr browser is affected by it. I'll try it at home in Windows VM and let you know.
EDIT: Just tried at home network on Windows 10 and still the same. Works only with --enforce-tor
But I think it's not quite a problem... You could just force set --enforce-tor when using cf-solver :)
What about using FlareSolverr in Docker? Should it work now? You striked 1 and 2 in Major issues but I can't get it work.
python ulozto-downloader.py --enforce-tor --cf-endpoint 'http://192.168.0.4:8191/v1' --auto-captcha 'https://uloz.to/file/G9lP6ENk8kXZ/rick-a-morty-s05e08-rickternal-friendshine-of-the-spotless-mort-1080p-web-dl-cz-dabing-mkv#!ZGN2ZQR2ZmOwBGRlZwqvZJWvATL2MScLnmt3GIOcoKVjJQZ5At=='
Starting downloading for url 'https://uloz.to/file/G9lP6ENk8kXZ/rick-a-morty-s05e08-rickternal-friendshine-of-the-spotless-mort-1080p-web-dl-cz-dabing-mkv#!ZGN2ZQR2ZmOwBGRlZwqvZJWvATL2MScLnmt3GIOcoKVjJQZ5At=='
Getting info (filename, filesize, …)
[TOR] TOR started
Cloudflare WAF detected, initializing automated Cloudflare Solver (timeout 90s).
Cannot download file: Cloudflare solver error: Error: Error solving the challenge. Message: unknown error: net::ERR_PROXY_CONNECTION_FAILED
(Session info: chrome=115.0.5790.98)
Stacktrace:
#0 0x55ea96b7e053 <unknown>
#1 0x55ea9689b4d8 <unknown>
#2 0x55ea96898ec8 <unknown>
#3 0x55ea968848ba <unknown>
#4 0x55ea96886120 <unknown>
#5 0x55ea96884c5c <unknown>
#6 0x55ea96883c59 <unknown>
#7 0x55ea96883af6 <unknown>
#8 0x55ea968825bb <unknown>
#9 0x55ea96882a14 <unknown>
#10 0x55ea9689e101 <unknown>
#11 0x55ea9691b49c <unknown>
#12 0x55ea969032c2 <unknown>
#13 0x55ea9691af2a <unknown>
#14 0x55ea96903083 <unknown>
#15 0x55ea968cdfce <unknown>
#16 0x55ea968cf362 <unknown>
#17 0x55ea96b4c786 <unknown>
#18 0x55ea96b5029d <unknown>
#19 0x55ea96b4fd36 <unknown>
#20 0x55ea96b50745 <unknown>
#21 0x55ea96b56ecb <unknown>
#22 0x55ea96b50ac6 <unknown>
#23 0x55ea96b2796d <unknown>
#24 0x55ea96b6a2c5 <unknown>
#25 0x55ea96b6a46e <unknown>
#26 0x55ea96b7802f <unknown>
#27 0x7f3a423d7ea7 start_thread
Terminating download. Please wait for stopping all threads.
Download terminated.
Unfortunately still not working for me.
@pkejval Are you sure you got the latest commit? if so, could you try to add a "print(r.text)" around this line to see what is coming back from Ulozto? https://github.com/setnicka/ulozto-downloader/commit/97a8d9b2475aa93e06fb32cfce8e2ac03a668af6#diff-3f44b382e24d924148e720b5937197e1aaac47aa7a552ae30dc40841f1f395e4L317
For some reason the presence of the Cloudflare challenge is not detected, therefore the downloader never tries to use Flaresolverr. The "detection" is currently done by searching for the pattern "Just a moment..." in the response: https://github.com/setnicka/ulozto-downloader/commit/97a8d9b2475aa93e06fb32cfce8e2ac03a668af6#diff-3f44b382e24d924148e720b5937197e1aaac47aa7a552ae30dc40841f1f395e4R235
Regarding Docker, I'm using it in my Linux environment as well and it works fine now. From you log it seems the container is not able to reach the Tor proxy. The Tor proxy listens on localhost and by default accepts connections from localhost only, thus the container needs to run with the --network host argument set (this is not the same startup command as Flaresolverr recommends) - could you confirm you started it like that?
Yes, git rev-parse --short HEAD shows that I'm at 97a8d9b
Added print(r.text) at page.py line 322 and without --enforce-tor I got this:
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Just a moment...</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">
</head>
<body class="no-js">
<div class="main-wrapper" role="main">
<div class="main-content"><noscript>
<div id="challenge-error-title">
<div class="h2"><span class="icon-wrapper">
<div class="heading-icon warning-icon"></div>
</span><span id="challenge-error-text">Enable JavaScript and cookies to continue</span></div>
</div>
</noscript></div>
</div>
<script>(function () { window._cf_chl_opt = { cvId: '2', cZone: 'uloz.to', cType: 'managed', cNounce: '30707', cRay: '7fa0fb7fccb3d8fe', cHash: '0023b20f028c7c1', cUPMDTk: "\/download-dialog\/free\/download?fileSlug=G9lP6ENk8kXZ&__cf_chl_tk=0ffHfkeAWyGHVvroBl_hcJ0okFrZ1_kCXGWoNpCHrEY-1692601052-0-gaNycGzNCuU", cFPWv: 'g', cTTimeMs: '1000', cMTimeMs: '0', cTplV: 5, cTplB: 'cf', cK: "", fa: "/download-dialog/free/download?fileSlug=G9lP6ENk8kXZ&__cf_chl_f_tk=0ffHfkeAWyGHVvroBl_hcJ0okFrZ1_kCXGWoNpCHrEY-1692601052-0-gaNycGzNCuU", md: "WPwYy30i63eZzuvpP1fTMdtWbaFDbqUne.ogq.Z6czE-1692601052-0-AfPCo318CbxEF_R65qNQeWBZeDbH5vBT8txADAxm233Jk6P5H00CTuB9T_k5Oe2BHTIZC-fhTlFCzepI_cd5wnemxzhM1uCdCzvjXhjXVniG9Q5bek3a0nlpG7O5TuPK8ah2k-Tkzyl1GEoTLW_Co_y-ZyloCvbsg1JU7HJFZdBhXMbBMss7xbujAFLQ1WGhdHSrt1i3eJjuz_6b2PkPLuR1_Qx-mYRmFtqJcFmFQs8jBIhdjRAeyCAqOUkckqjUBhzPzLW3x7xTxXtXVDp2StLl_5SJjww1h79COA2LDaGdIaMhP3izqFRKuJ1mOHNHmHqNElx2KVvVUo3EIHSmetNZSQC8CaJuPIyDcKWJMznIZ0xK0vBJf3xNFm1sfcsoztUXGnG2Ry6f5nsVRTfJKSvOBlsuE3L6GqpMeJr7xHscAiOUc_X06Pv_hPHz1GJtDtCZUC2wQ8liVcYht4n6mf8ygKKvfmT6sk7gmncegPeqPk8JNlWcP8wFrLco9E9_UyVrKrwJNBjdsCGJpxHMtmK0k6RbDvsotDDmMiGdmON5DknA1UbBR6ZWIDDDA3eAQF9kiPo_9soalvaI-zjq0A7lO8LA9ZH9gEZyex0RFXpe8Nb7d25g3l8uN2X3UTuvy7x6sHnvfyZD7DhHt0wX4DZctO9K526Kk33mo4gCxesiPyMDNllIkCFzVw4GZkWIaVJwGWZ4ekkGJjC7OHNQJphDjhVtYZHV68LUxo_pNxAI6EG9PUoCyY5Nur0HrEu-bcia-o9bXn_hqBSd26wbvFKCCvTRahMeG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hlHuxaYy9tbiAiT+QDuN8fL6X90aKEFbqM/N3K3BThdLNTVGcOAUTgpLIx3aM5+e4rKa8URlADo2yZRXjo5WAMFdiB9hZgP4dMP9f2T2jLYLEvyz04Gi8A9w2idCOAf+le2K57kE4MvbuxiWnRdv7HpYpA53GKcmdxBL/1/Mdldd5spv0T+yVYMTeTwS54fl9qMvMhV89vDoWrXNsEw3bgYJgxmic8pM3q9Dsd6s5YdO2OyIjy6048zD/Wn5O4d9fXFWFwFGX3i082bhjk5rMGU16HLA4q+M2VGgy34yXsgXjz5J36EfY0l4bf4Q1yfpBMVuT8whvcVsbP/BwlmueXPoKujPjk+z5Qhbvd1mCN8tHWEmiC2RqyThQ5ACVFy9rFGQPWe0VfSPB7cdtGX0PLV7YNA5c1L+eVjdNE=', t: 'MTY5MjYwMTA1Mi4xMjQwMDA=', cT: Math.floor(Date.now() / 1000), m: 'kAbKx2s2XkXXpbzNnn6BuEfbjWtdYgQqGcKJ/BYd2dQ=', i1: 'g6cK+wLYOSUeZ/i4yWkh8w==', i2: 'RQopdvr8hJoJxpqUK6cAkg==', zh: 'H6H5rT46MdJEduO2EFVWUYu6Mz0W/6o6lKBs5jFOnDc=', uh: 'YE9XOpG5TeHmhA1zfs5mxC8CrRZzq2a/+r+OU7dliYQ=', hh: 'AZxN1L+Nck6+Yo5cCT418B4s2dJxrgUeCciQcMYDIbA=', } }; var cpo = document.createElement('script'); cpo.src = '/cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1?ray=7fa0fb7fccb3d8fe'; window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash; window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search; if (window.history && window.history.replaceState) { var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash; history.replaceState(null, null, "\/download-dialog\/free\/download?fileSlug=G9lP6ENk8kXZ&__cf_chl_rt_tk=0ffHfkeAWyGHVvroBl_hcJ0okFrZ1_kCXGWoNpCHrEY-1692601052-0-gaNycGzNCuU" + window._cf_chl_opt.cOgUHash); cpo.onload = function () { history.replaceState(null, null, ogU); }; } document.getElementsByTagName('head')[0].appendChild(cpo); }());</script>
</body>
</html>
I assembled Docker container containing all required software with FlareSolverr, Chromium and ulozto-downloader using your PR branch. https://github.com/pkejval/uld-docker We can use it for testing and maybe in future I'll PR it as official Docker image.
@pkejval I managed to reproduce your case and the --enforce-tor should finally not be needed in ef8e7a5.
Also, thanks for the Dockerfile! I don't have a strict opinion on how the application should be distributed, however I believe it should be able to gather and install its dependencies (at least with pip if not itself), so there should be no need for manually installing and starting prerequisites by the user. I'll try to work on that as well eventually.
@filo891 I can confirm it works without --enforce-tor now. Good job! :)
Úžasná práce. Funguje bez problémů.
stala se někomu stejná chyba popřípadě jak ji opravím?
Edit: zjistil jsem že mam verzi 3.5.0 a tak jsme to aktualizoval na nejnovější ale bohužel stále nefunguje (ukazuje stejnou chybu)
EN: Did anyone encounter the same error, or how can I fix it? Edit: I found out that I have version 3.5.0, so I updated it to the latest one, but unfortunately, it still doesn't work (it shows the same error).
stala se někomu stejná chyba popřípadě jak ji opravím? Edit: zjistil jsem že mam verzi 3.5.0 a tak jsme to aktualizoval na nejnovější ale bohužel stále nefunguje (ukazuje stejnou chybu)
EN: Did anyone encounter the same error, or how can I fix it? Edit: I found out that I have version 3.5.0, so I updated it to the latest one, but unfortunately, it still doesn't work (it shows the same error).
Když píšeš, že jsi to neměl aktualizované, tak mám dojem, že sis ulozto-downloader nestáhl odsud https://github.com/filo891/ulozto-downloader/tree/cfsolver-support od filo891.
stala se někomu stejná chyba popřípadě jak ji opravím? Edit: zjistil jsem že mam verzi 3.5.0 a tak jsme to aktualizoval na nejnovější ale bohužel stále nefunguje (ukazuje stejnou chybu)
EN: Did anyone encounter the same error, or how can I fix it? Edit: I found out that I have version 3.5.0, so I updated it to the latest one, but unfortunately, it still doesn't work (it shows the same error).
Když píšeš, že jsi to neměl aktualizované, tak mám dojem, že sis ulozto-downloader nestáhl odsud https://github.com/filo891/ulozto-downloader/tree/cfsolver-support od filo891.
ne stáhl jsem to zde od setnicka ale zkusím to stáhnout a uvidím.
a funguje to děkuji za pomoc.
Edit: stáhlo se mi to ale při stahovaní se ukázala nějaká chyba podobna co se ukázala uživatelovy scavy, ale stáhlo se to a vše bylo v pořádku... ještě jednou děkuji za pomoc.
To nebude stejná, tobě tam vyskočil timeout, což by neměl být problém, pokud to pokračuje.
To nebude stejná, tobě tam vyskočil timeout, což by neměl být problém, pokud to pokračuje.
Ano dokončilo se to, děkuji
Je možný nastavit počet částí na více než 20? Na 20 vlákně to zůstane a víc to nedá.
Je možný nastavit počet částí na více než 20? Na 20 vlákně to zůstane a víc to nedá.
ano je to možný přidej příkaz --parts 50
"Pro volbu počtu částí slouží přepínač --parts N, default je 20 částí. Ve výchozím nastavení Ulož.to downloader zobrazuje pouze sumární stav. Pokud chcete zobrazit stav stahování jednotlivých částí, použijte přepínač --parts-progress."
new update here!! flaresolver 3.3.4 - https://github.com/FlareSolverr/FlareSolverr/releases/tag/v3.3.4
Oh, very nice work @filo891, thank you.
I have to admit that I haven't had any time for ulozto-downloader during the summer, sorry for that… after all, it is only a hobby project. I am considering @filo891, do you want to get collaborator access to this main repository?
Ad the changes in this pull request: They look good, but needed steps for launching the ulozto-downloader have grown to quite a large guide :-/ Installed Tor, installed Docker, pulling and running image, installing dependencies, … I am hoping that we may somehow automatize most of these steps.
I can tell how I do it on Windows with Powershell. Just for inspiration.
Install process: (after installing python)
mkdir C:\ulozodl
cd C:\ulozodl
# Download files:
git clone https://github.com/setnicka/ulozto-downloader.git
Invoke-WebRequest https://archive.torproject.org/tor-package-archive/torbrowser/12.5.2/tor-expert-bundle-12.5.2-windows-x86_64.tar.gz -Outfile _tor.tar.gz && tar -xvzf _tor.tar.gz tor/tor.exe && Remove-Item _tor.tar.gz
Invoke-WebRequest https://github.com/FlareSolverr/FlareSolverr/releases/download/v3.3.4/flaresolverr_windows_x64.zip -Outfile _cflare.zip && Expand-Archive -Path _cflare.zip -DestinationPath . && Remove-Item _cflare.zip
# Prepare Python virtual environment
python -m venv .\venv\
# Install requirements for Ulozto-Downloader into the virtual environment.
pip install -r .\ulozto-downloader\requirements.txt
In the above I currently replace the git clone url line with this to test this PR:
git clone -b cfsolver-support --single-branch https://github.com/filo891/ulozto-downloader.git
And then when I want to use it.
I do this:
cd C:\uloztodl
.\venv\Scripts\Activate.ps1
$env:Path += ';C:\uloztodl\tor\'
Start-Process .\flaresolverr\flaresolverr.exe
python ./ulozto-downloader/ulozto-downloader.py -t --parts-progress --parts 40 --log uloztolog.log <url-to-download>
This works very well for me.
Edit: I've never bothered trying "set HEADLESS=false" as the above just works for me without messing with it.
Oh, very nice work @filo891, thank you.
I have to admit that I haven't had any time for ulozto-downloader during the summer, sorry for that… after all, it is only a hobby project. I am considering @filo891, do you want to get collaborator access to this main repository?
Ad the changes in this pull request: They look good, but needed steps for launching the ulozto-downloader have grown to quite a large guide :-/ Installed Tor, installed Docker, pulling and running image, installing dependencies, … I am hoping that we may somehow automatize most of these steps.
Well, for most people it isn't such problem because most of them use windows.
