removed dependance on locale in youtube.py
This commit is contained in:
parent
0d1d467861
commit
7a654e0541
1 changed files with 1 additions and 5 deletions
|
@ -1,12 +1,9 @@
|
||||||
import locale
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from util import hook, http
|
from util import hook, http
|
||||||
|
|
||||||
|
|
||||||
locale.setlocale(locale.LC_ALL, '')
|
|
||||||
|
|
||||||
youtube_re = (r'(?:youtube.*?(?:v=|/v/)|youtu\.be/|yooouuutuuube.*?id=)'
|
youtube_re = (r'(?:youtube.*?(?:v=|/v/)|youtu\.be/|yooouuutuuube.*?id=)'
|
||||||
'([-_a-zA-Z0-9]+)', re.I)
|
'([-_a-zA-Z0-9]+)', re.I)
|
||||||
|
|
||||||
|
@ -42,8 +39,7 @@ def get_video_description(vid_id):
|
||||||
j['ratingCount'])
|
j['ratingCount'])
|
||||||
|
|
||||||
if 'viewCount' in j:
|
if 'viewCount' in j:
|
||||||
out += ' - \x02%s\x02 views' % locale.format('%d',
|
out += ' - \x02%s\x02 views' % format(j['viewCount'], ",d")
|
||||||
j['viewCount'], 1)
|
|
||||||
|
|
||||||
upload_time = time.strptime(j['uploaded'], "%Y-%m-%dT%H:%M:%S.000Z")
|
upload_time = time.strptime(j['uploaded'], "%Y-%m-%dT%H:%M:%S.000Z")
|
||||||
out += ' - \x02%s\x02 on \x02%s\x02' % (j['uploader'],
|
out += ' - \x02%s\x02 on \x02%s\x02' % (j['uploader'],
|
||||||
|
|
Reference in a new issue