[eporner] Fix view count extraction and make optional (closes #23306)
authorSergey M․ <dstftw@gmail.com>
Sun, 13 Dec 2020 13:27:08 +0000 (20:27 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 13 Dec 2020 13:27:08 +0000 (20:27 +0700)
youtube_dl/extractor/eporner.py

index 920fb417e7a5daec420730f1d319865a904517d5..bfecd3a418805761fc3516cf7afb1e14f9d16283 100644 (file)
@@ -118,8 +118,8 @@ class EpornerIE(InfoExtractor):
         duration = parse_duration(self._html_search_meta(
             'duration', webpage, default=None))
         view_count = str_to_int(self._search_regex(
-            r'id="cinemaviews">\s*([0-9,]+)\s*<small>views',
-            webpage, 'view count', fatal=False))
+            r'id=["\']cinemaviews1["\'][^>]*>\s*([0-9,]+)',
+            webpage, 'view count', default=None))
 
         return merge_dicts(json_ld, {
             'id': video_id,