mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 11:50:14 +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
|
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():
|
def requests_headers():
|
||||||
"""build header with random user agent for requests outside of yt-dlp"""
|
"""build header with random user agent for requests outside of yt-dlp"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user