projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1e440a
)
[utils] Add base36 for use in Vidzi
author
Yen Chi Hsuan
<yan12125@gmail.com>
Fri, 26 Feb 2016 06:23:16 +0000
(14:23 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Fri, 26 Feb 2016 06:26:26 +0000
(14:26 +0800)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index d7a1586c0f4cf883610bf11d1e9163edf5a98b2e..be1f3b0d77a55a3245b5cff44982256e072d6c0e 100644
(file)
--- 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')