1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-29 13:42:37 +00:00

[utils] Add base36 for use in Vidzi

This commit is contained in:
Yen Chi Hsuan 2016-02-26 14:23:16 +08:00
parent d1e440a4a1
commit 481888294d

View file

@ -2631,5 +2631,9 @@ def base_n(num, n, table):
return ret return ret
def base36(num):
return base_n(num, 36, '0123456789abcdefghijklmnopqrstuvwxyz')
def base62(num): def base62(num):
return base_n(num, 62, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') return base_n(num, 62, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')