From: Yen Chi Hsuan Date: Fri, 26 Feb 2016 06:23:16 +0000 (+0800) Subject: [utils] Add base36 for use in Vidzi X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=481888294d19ef52075e531ce26588d97b3d16d2;p=youtube-dl [utils] Add base36 for use in Vidzi --- diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index d7a1586c0..be1f3b0d7 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -2631,5 +2631,9 @@ def base_n(num, n, table): return ret +def base36(num): + return base_n(num, 36, '0123456789abcdefghijklmnopqrstuvwxyz') + + def base62(num): return base_n(num, 62, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')