mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-28 23:02:18 +03:00
@@ -3,6 +3,7 @@ import base64
|
||||
import hashlib
|
||||
import hmac
|
||||
import json
|
||||
import uuid
|
||||
import warnings
|
||||
|
||||
from ..compat.compat_utils import passthrough_module
|
||||
@@ -62,4 +63,8 @@ def number_of_digits(number):
|
||||
return len('%d' % number)
|
||||
|
||||
|
||||
def random_uuidv4():
|
||||
return str(uuid.uuid4())
|
||||
|
||||
|
||||
compiled_regex_type = type(re.compile(''))
|
||||
|
||||
@@ -4730,13 +4730,6 @@ def clean_podcast_url(url):
|
||||
return re.sub(r'^\w+://(\w+://)', r'\1', url)
|
||||
|
||||
|
||||
_HEX_TABLE = '0123456789abcdef'
|
||||
|
||||
|
||||
def random_uuidv4():
|
||||
return re.sub(r'[xy]', lambda x: _HEX_TABLE[random.randint(0, 15)], 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx')
|
||||
|
||||
|
||||
def make_parent_dirs(path):
|
||||
if dir_name := os.path.dirname(path):
|
||||
os.makedirs(dir_name, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user