Skip to content

Commit

Permalink
[cbslocal] Fix timestamp extraction (closes #14999, closes #15000)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw committed Dec 16, 2017
1 parent b555ae9 commit 06dbcd7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions youtube_dl/extractor/cbslocal.py
Expand Up @@ -91,12 +91,10 @@ def _real_extract(self, url):

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,
Expand Down

0 comments on commit 06dbcd7

Please sign in to comment.