diff options
author | The Hatsune Daishi <nao20010128@gmail.com> | 2021-01-22 22:43:30 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-22 19:13:30 +0530 |
commit | ffcb819171d6f3577cbe6f81ba69377398d57e96 (patch) | |
tree | 4b7790415202b634535af17b4efce415c03f4c8d /youtube_dlc/utils.py | |
parent | b46696bdc8f7a4d19b6a8205558cbcbe4168c3cf (diff) | |
download | hypervideo-pre-ffcb819171d6f3577cbe6f81ba69377398d57e96.tar.lz hypervideo-pre-ffcb819171d6f3577cbe6f81ba69377398d57e96.tar.xz hypervideo-pre-ffcb819171d6f3577cbe6f81ba69377398d57e96.zip |
#30 [mildom] Add extractor
Authored by @nao20010128nao
Diffstat (limited to 'youtube_dlc/utils.py')
-rw-r--r-- | youtube_dlc/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dlc/utils.py b/youtube_dlc/utils.py index 9ae105331..8cecaa8ee 100644 --- a/youtube_dlc/utils.py +++ b/youtube_dlc/utils.py @@ -5863,3 +5863,10 @@ def clean_podcast_url(url): st\.fm # https://podsights.com/docs/ )/e )/''', '', 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') |