[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)