Browse Source

Ensure needed commands are installed

microtasks
tech234a 3 years ago
parent
commit
82f52c241b
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      worker.py

+ 3
- 1
worker.py View File

@@ -11,7 +11,7 @@ import tracker

from youtube_dl import YoutubeDL

from shutil import rmtree
from shutil import rmtree, which

from queue import Queue

@@ -55,6 +55,8 @@ langs = ['ab', 'aa', 'af', 'sq', 'ase', 'am', 'ar', 'arc', 'hy', 'as', 'ay', 'az
'tt', 'te', 'th', 'bo', 'ti', 'tpi', 'to', 'ts', 'tn', 'tr', 'tk', 'tw', 'uk', 'ur', 'uz', 'vi', 'vo', 'vor', 'cy', 'fy', 'wo',
'xh', 'yi', 'yo', 'zu']

assert which("zip") and which("rsync") and which("curl"), "Please ensure the zip, rsync, and curl commands are installed on your system."

#HSID, SSID, SID cookies required
if "HSID" in environ.keys() and "SSID" in environ.keys() and "SID" in environ.keys():
cookies = {"HSID": environ["HSID"], "SSID": environ["SSID"], "SID": environ["SID"]}


Loading…
Cancel
Save