diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-11-07 19:29:09 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-11-07 19:29:49 +0600 |
commit | 2c740cf28d257d2a915195e7cc60f83e6690d2cc (patch) | |
tree | 0fc0dd8ea2702cce0c1f993cceb95f9de143a745 /youtube_dl/extractor/crunchyroll.py | |
parent | 5214f1e31d5e5ba692fb1ed4803ff71ef4e480e8 (diff) |
[crunchyroll] Simplify description extraction
Diffstat (limited to 'youtube_dl/extractor/crunchyroll.py')
-rw-r--r-- | youtube_dl/extractor/crunchyroll.py | 5 |
1 files changed, 2 insertions, 3 deletions
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)<h1[^>]*>((?:(?!<h1).)*?<span[^>]+itemprop=["\']title["\'][^>]*>(?:(?!<h1).)+?)</h1>', 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'<div>Availability for free users:(.+?)</div>', r'<div>[^<>]+<span>\s*(.+?\d{4})\s*</span></div>'], webpage, 'video_upload_date', fatal=False, flags=re.DOTALL) |