#yes i wrote my script in python shuushhh
Explore tagged Tumblr posts
daemonhxckergrrl · 1 year ago
Text
i didn't want to wait forever for my overly-parallel yt-dlp script but i also didn't want to download one at a time when the youtube api is rate-limited, so here we are patching my script w/ a prototype threads flag to set the number of concurrent yt-dlp instances to call and to split the input urls accordingly.
need some logic for intelligent handling of danglers, but that can be switched on if len(urls) % threads != 0 and just means we take (len(urls)/threads) + 1 until len(urls) < len(urls)/threads) and then dump the remainder into the last thread. i think ? i might need to check that produces the correct number of threads at the end.
am eepy, so logic brain not super fired up d:
the whole thing needs a major refactor anyway, and i need a better monitoring solution than calling watch on the abduco session list, and having ^C trigger killing all the sessions regardless of finished status. might instead call mprocs (whether or not i keep the abduco sessions) and monitor that way.
14 notes · View notes