aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-02-26 14:23:16 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-02-26 14:26:26 +0800
commit481888294d19ef52075e531ce26588d97b3d16d2 (patch)
treeeec52796e302a5ba5e06ff1ead42881373f30116
parentd1e440a4a18522207a1a3e624bf801c8338f9146 (diff)
[utils] Add base36 for use in Vidzi
-rw-r--r--youtube_dl/utils.py4
1 files changed, 4 insertions, 0 deletions
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')