]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[cbslocal] Fix timestamp extraction (closes #14999, closes #15000)
authorSergey M․ <dstftw@gmail.com>
Sat, 16 Dec 2017 14:57:30 +0000 (21:57 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 16 Dec 2017 14:57:30 +0000 (21:57 +0700)
youtube_dl/extractor/cbslocal.py

index 7d78e3aaee7637fdeed114c1b2b0adac44780804..90852a9ef9b7a6707ebcd1ade6cccb9ff9bbde5a 100644 (file)
@@ -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,