mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-09 11:52:51 +08:00
[RTBF] Improve fail-safe
This commit is contained in:
parent
8e5cc10774
commit
4ccb83efe7
@ -72,11 +72,15 @@ class RTBFIE(InfoExtractor):
|
|||||||
|
|
||||||
webpage = self._download_webpage(url, media_id)
|
webpage = self._download_webpage(url, media_id)
|
||||||
|
|
||||||
title = self._og_search_title(webpage)
|
if not webpage:
|
||||||
|
raise ExtractorError('%s said: failed to download the webpage' % self.IE_NAME, expected=True)
|
||||||
|
|
||||||
|
title = self._og_search_title(webpage, default=None)
|
||||||
description = self._og_search_description(webpage, default=None)
|
description = self._og_search_description(webpage, default=None)
|
||||||
|
|
||||||
# Remove date from title and description
|
# Remove date from title and description
|
||||||
title = re.sub(r'(?P<extra>\(\d{1,}\/\d{1,}\) - \d{2}\/\d{2}\/\d{4})$', '', title)
|
if title:
|
||||||
|
title = re.sub(r'(?P<extra>\(\d{1,}\/\d{1,}\) - \d{2}\/\d{2}\/\d{4})$', '', title)
|
||||||
if description:
|
if description:
|
||||||
description = re.sub(r'(?P<extra>\(\d{1,}\/\d{1,} du \d{2}\/\d{2}\/\d{4}\))$', '', description)
|
description = re.sub(r'(?P<extra>\(\d{1,}\/\d{1,} du \d{2}\/\d{2}\/\d{4}\))$', '', description)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user