mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-10-14 01:37:15 +00:00
add random string generator helper function
This commit is contained in:
parent
738b083a7f
commit
bace7d41af
@ -37,6 +37,12 @@ def ignore_filelist(filelist):
|
||||
return cleaned
|
||||
|
||||
|
||||
def randomizor(length):
|
||||
"""generate random alpha numeric string"""
|
||||
pool = string.digits + string.ascii_letters
|
||||
return "".join(random.choice(pool) for i in range(length))
|
||||
|
||||
|
||||
def requests_headers():
|
||||
"""build header with random user agent for requests outside of yt-dlp"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user