1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-06-30 11:02:54 -05:00

[dailymotion] Extract view count (#1895)

This commit is contained in:
Jaime Marquínez Ferrándiz
2013-12-06 13:36:36 +01:00
parent 336c3a69bd
commit f53c966a73
3 changed files with 14 additions and 0 deletions

View File

@ -1020,3 +1020,7 @@ def format_bytes(bytes):
suffix = [u'B', u'KiB', u'MiB', u'GiB', u'TiB', u'PiB', u'EiB', u'ZiB', u'YiB'][exponent]
converted = float(bytes) / float(1024 ** exponent)
return u'%.2f%s' % (converted, suffix)
def str_to_int(int_str):
int_str = re.sub(r'[,\.]', u'', int_str)
return int(int_str)