- using common helper method for property
- readded fallback
This commit is contained in:
parent
2bae0435a8
commit
81d50228b8
@ -90,8 +90,9 @@ class RedTubeIE(InfoExtractor):
|
|||||||
upload_date = unified_strdate(self._search_regex(
|
upload_date = unified_strdate(self._search_regex(
|
||||||
r'<span[^>]+>ADDED ([^<]+)<',
|
r'<span[^>]+>ADDED ([^<]+)<',
|
||||||
webpage, 'upload date', fatal=False))
|
webpage, 'upload date', fatal=False))
|
||||||
duration = int_or_none(self._search_regex(
|
duration = int_or_none(self._og_search_property(
|
||||||
'<meta.*property="og:video:duration".*content="(.*)".*\/>', webpage, 'duration', default=None))
|
'video:duration', webpage, default=None) or self._search_regex(
|
||||||
|
r'videoDuration\s*:\s*(\d+)', webpage, 'duration', default=None))
|
||||||
view_count = str_to_int(self._search_regex(
|
view_count = str_to_int(self._search_regex(
|
||||||
(r'<div[^>]*>Views</div>\s*<div[^>]*>\s*([\d,.]+)',
|
(r'<div[^>]*>Views</div>\s*<div[^>]*>\s*([\d,.]+)',
|
||||||
r'<span[^>]*>VIEWS</span>\s*</td>\s*<td>\s*([\d,.]+)'),
|
r'<span[^>]*>VIEWS</span>\s*</td>\s*<td>\s*([\d,.]+)'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user