diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-12-16 21:57:30 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-12-16 21:57:30 +0700 |
commit | 06dbcd7be41f71346e75f78f3ad77d9eca0219ca (patch) | |
tree | fc3bb64b1cb04588a01debdcf838be52eb2c4770 /youtube_dl/extractor | |
parent | b555ae9bf146ce9e2bf81327746847f0bc4d63e9 (diff) |
[cbslocal] Fix timestamp extraction (closes #14999, closes #15000)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/cbslocal.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/youtube_dl/extractor/cbslocal.py b/youtube_dl/extractor/cbslocal.py index 7d78e3aae..90852a9ef 100644 --- a/youtube_dl/extractor/cbslocal.py +++ b/youtube_dl/extractor/cbslocal.py @@ -91,12 +91,10 @@ class CBSLocalIE(AnvatoIE): info_dict = self._extract_anvato_videos(webpage, display_id) - time_str = self._html_search_regex( - r'class="entry-date">([^<]+)<', webpage, 'released date', default=None) - if time_str: - timestamp = unified_timestamp(time_str) - else: - timestamp = parse_iso8601(self._html_search_meta('uploadDate', webpage)) + timestamp = unified_timestamp(self._html_search_regex( + r'class="(?:entry|post)-date"[^>]*>([^<]+)', webpage, + 'released date', default=None)) or parse_iso8601( + self._html_search_meta('uploadDate', webpage)) info_dict.update({ 'display_id': display_id, |