1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-23 03:48:22 +08:00

[libsyn] fix extraction of the description

The description moved to a JSON API endpoint.
This commit is contained in:
Paul Wise 2019-01-08 10:42:39 +08:00
parent 058e4d1989
commit 7932cf67a7
No known key found for this signature in database
GPG Key ID: 3116BA5E9FFA69A3

View File

@ -58,6 +58,9 @@ class LibsynIE(InfoExtractor):
description = self._html_search_regex(
r'<p\s+id="info_text_body">(.+?)</p>', webpage,
'description', default=None)
if not description:
details = self._download_json('https://html5-player.libsyn.com/embed/getitemdetails?item_id=' + video_id, video_id)
description = self._html_search_regex(r'<p>(.+?)</p>', details.get('item_body'), 'description', default=None)
if description:
# Strip non-breaking and normal spaces
description = description.replace('\u00A0', ' ').strip()