setnicka / ulozto-downloader

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

Tor: ability to reuse tor process #129

Closed SpiReCZ closed 1 year ago

SpiReCZ commented 1 year ago

@setnicka lately i've been reusing Tor process for multiple downloads since the starting of Tor was a big failure point in ulozto-streamer. I made the re-use configurable, but latest changes will force me to create a new Tor process for each download. Reusing is helpful when downloading a lot of files nonstop, otherwise i would start the Tor process each time.

https://github.com/setnicka/ulozto-downloader/blob/40a7720ce4ad7454490ad7d1376c1ac8b24fd9f1/uldlib/downloader.py#L70

I cleanup Tor for each download if property for Tor reuse is not set: https://github.com/SpiReCZ/ulozto-streamer/blob/c2284fae5476308b4948c3e63999cba7ebb0d2fc/ulozto-streamer.py#L87

setnicka commented 1 year ago

Sorry for the late reply, I have only a little time for this project alongside other work.

I will try to solve this in the next release, probably sometime during the Christmas holiday.

SpiReCZ commented 1 year ago

thx

setnicka commented 1 year ago

I just published version 3.3.0 where this should be fixed (Downloader class not longer calling stop() method, it is documented now as caller responsibility).

Closing as fixed.