mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-09-08 18:01:56 +00:00
[utils] Deprecate random_uuidv4 (#17301)
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.11) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.12) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.13) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.14) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.15) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, pypy-3.11) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.10) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.11) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.12) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.13) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.14) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.15) (push) Has been cancelled
Core Tests / Core tests (windows-latest, pypy-3.11) (push) Has been cancelled
Quick Test / Core test (push) Has been cancelled
Quick Test / Code check (push) Has been cancelled
Release (master) / Publish GitHub release (push) Has been cancelled
Release (master) / Publish to PyPI (push) Has been cancelled
Test and lint workflows / Check workflows (push) Has been cancelled
Test and lint workflows / Run zizmor (push) Has been cancelled
Update wiki / Update wiki (push) Has been cancelled
Release (nightly) / Check for new commits (push) Has been cancelled
Release (nightly) / Publish GitHub release (push) Has been cancelled
Release (nightly) / Publish to PyPI (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.11) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.12) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.13) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.14) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.15) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, pypy-3.11) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.10) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.11) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.12) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.13) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.14) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.15) (push) Has been cancelled
Core Tests / Core tests (windows-latest, pypy-3.11) (push) Has been cancelled
Quick Test / Core test (push) Has been cancelled
Quick Test / Code check (push) Has been cancelled
Release (master) / Publish GitHub release (push) Has been cancelled
Release (master) / Publish to PyPI (push) Has been cancelled
Test and lint workflows / Check workflows (push) Has been cancelled
Test and lint workflows / Run zizmor (push) Has been cancelled
Update wiki / Update wiki (push) Has been cancelled
Release (nightly) / Check for new commits (push) Has been cancelled
Release (nightly) / Publish GitHub release (push) Has been cancelled
Release (nightly) / Publish to PyPI (push) Has been cancelled
Authored by: doe1080
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import urllib.parse
|
||||
import uuid
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
random_uuidv4,
|
||||
unified_timestamp,
|
||||
urlencode_postdata,
|
||||
)
|
||||
@@ -77,11 +77,11 @@ class TennisTVIE(InfoExtractor):
|
||||
query={
|
||||
'client_id': 'tennis-tv-web',
|
||||
'redirect_uri': 'https://www.tennistv.com/resources/v1.1.10/html/silent-check-sso.html',
|
||||
'state': random_uuidv4(),
|
||||
'state': str(uuid.uuid4()),
|
||||
'response_mode': 'fragment',
|
||||
'response_type': 'code',
|
||||
'scope': 'openid',
|
||||
'nonce': random_uuidv4(),
|
||||
'nonce': str(uuid.uuid4()),
|
||||
'prompt': 'none',
|
||||
})
|
||||
|
||||
|
||||
@@ -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