From: Sergey M․ Date: Sat, 7 Nov 2015 13:29:09 +0000 (+0600) Subject: [crunchyroll] Simplify description extraction X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=2c740cf28d257d2a915195e7cc60f83e6690d2cc;p=youtube-dl [crunchyroll] Simplify description extraction --- diff --git a/youtube_dl/extractor/crunchyroll.py b/youtube_dl/extractor/crunchyroll.py index 4243f3e2e..9aa5d58b4 100644 --- a/youtube_dl/extractor/crunchyroll.py +++ b/youtube_dl/extractor/crunchyroll.py @@ -291,9 +291,8 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text r'(?s)]*>((?:(?!]+itemprop=["\']title["\'][^>]*>(?:(?!', webpage, 'video_title') video_title = re.sub(r' {2,}', ' ', video_title) - video_description = self._html_search_regex(r'"description":"([^"]+)', webpage, 'video_description', default='') - if not video_description: - video_description = None + video_description = self._html_search_regex( + r'"description":"([^"]+)', webpage, 'video_description', default=None) video_upload_date = self._html_search_regex( [r'
Availability for free users:(.+?)
', r'
[^<>]+\s*(.+?\d{4})\s*
'], webpage, 'video_upload_date', fatal=False, flags=re.DOTALL)