mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-09 12:17:51 +08:00
[libsyn] fix extracting the release date
The "Released:" text was removed from the page but the release_date JSON data field has the same info.
This commit is contained in:
parent
bd3851b9dd
commit
6aa12bf34c
@ -60,8 +60,6 @@ class LibsynIE(InfoExtractor):
|
||||
if description:
|
||||
# Strip non-breaking and normal spaces
|
||||
description = description.replace('\u00A0', ' ').strip()
|
||||
release_date = unified_strdate(self._search_regex(
|
||||
r'<div class="release_date">Released: ([^<]+)<', webpage, 'release date', fatal=False))
|
||||
|
||||
data_json = self._search_regex(r'var\s+playlistItem\s*=\s*(\{.*?\});\n', webpage, 'JSON data block')
|
||||
data = json.loads(data_json)
|
||||
@ -75,6 +73,7 @@ class LibsynIE(InfoExtractor):
|
||||
}]
|
||||
thumbnail = data.get('thumbnail_url')
|
||||
duration = parse_duration(data.get('duration'))
|
||||
release_date = unified_strdate(data['release_date'])
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
|
Loading…
Reference in New Issue
Block a user