]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[bilibili] flake8
authorremitamine <remitamine@gmail.com>
Thu, 3 Dec 2015 21:43:19 +0000 (22:43 +0100)
committerremitamine <remitamine@gmail.com>
Thu, 3 Dec 2015 21:43:19 +0000 (22:43 +0100)
youtube_dl/extractor/bilibili.py

index b5aaa41e7df6a8ae20cf0b5ffb7cbdd195780fc8..59beb11bce71bfc6ef9b036ad123dc44e872d0be 100644 (file)
@@ -2,13 +2,9 @@
 from __future__ import unicode_literals
 
 import re
-import json
 
 from .common import InfoExtractor
-from ..compat import (
-    compat_etree_fromstring,
-    compat_str,
-)
+from ..compat import compat_str
 from ..utils import (
     int_or_none,
     unescapeHTML,
@@ -98,7 +94,7 @@ class BiliBiliIE(InfoExtractor):
             'thumbnail': view_data.get('pic'),
             'uploader': view_data.get('author'),
             'timestamp': int_or_none(view_data.get('created')),
-            'view_count': view_data.get('play'),
+            'view_count': int_or_none(view_data.get('play')),
             'duration': int_or_none(xpath_text(doc, './timelength')),
         }