[lifenews] Fix view count and comment count
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 3 May 2015 17:11:23 +0000 (01:11 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 3 May 2015 17:11:23 +0000 (01:11 +0800)
youtube_dl/extractor/lifenews.py

index 1dfe7f77f4ccdefa0b076f71f6467644e465cb52..3c00ed3330ea350bc7480c7a508ad894cbc9fbaf 100644 (file)
@@ -47,9 +47,9 @@ class LifeNewsIE(InfoExtractor):
         description = self._og_search_description(webpage)
 
         view_count = self._html_search_regex(
-            r'<div class=\'views\'>(\d+)</div>', webpage, 'view count', fatal=False)
+            r'<div class=\'views\'>\s*(\d+)\s*</div>', webpage, 'view count', fatal=False)
         comment_count = self._html_search_regex(
-            r'<div class=\'comments\'>\s*<span class=\'counter\'>(\d+)</span>', webpage, 'comment count', fatal=False)
+            r'<div class=\'comments\'>\s*<span class=\'counter\'>\s*(\d+)\s*</span>', webpage, 'comment count', fatal=False)
 
         upload_date = self._html_search_regex(
             r'<time datetime=\'([^\']+)\'>', webpage, 'upload date', fatal=False)