aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-07-16 12:40:45 +0700
committerSergey M․ <dstftw@gmail.com>2017-07-16 12:40:45 +0700
commit7abed4e06c8935026873a9c01821d5a5b2d80d4f (patch)
tree755bb17aef199f6bd9415401b3ac03a21fb8c792
parent13eb526f111dc9b98421f3e05287980b88766409 (diff)
downloadyoutube-dl-7abed4e06c8935026873a9c01821d5a5b2d80d4f.zip
youtube-dl-7abed4e06c8935026873a9c01821d5a5b2d80d4f.tar.gz
youtube-dl-7abed4e06c8935026873a9c01821d5a5b2d80d4f.tar.bz2
[crunchyroll] Relax series and season regex (closes #13659)
-rw-r--r--youtube_dl/extractor/crunchyroll.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/crunchyroll.py b/youtube_dl/extractor/crunchyroll.py
index 2ffa4a7..8bdaf0c 100644
--- a/youtube_dl/extractor/crunchyroll.py
+++ b/youtube_dl/extractor/crunchyroll.py
@@ -510,7 +510,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
# webpage provide more accurate data than series_title from XML
series = self._html_search_regex(
- r'id=["\']showmedia_about_episode_num[^>]+>\s*<a[^>]+>([^<]+)',
+ r'(?s)<h\d[^>]+\bid=["\']showmedia_about_episode_num[^>]+>(.+?)</h\d',
webpage, 'series', fatal=False)
season = xpath_text(metadata, 'series_title')
@@ -518,7 +518,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
episode_number = int_or_none(xpath_text(metadata, 'episode_number'))
season_number = int_or_none(self._search_regex(
- r'(?s)<h4[^>]+id=["\']showmedia_about_episode_num[^>]+>.+?</h4>\s*<h4>\s*Season (\d+)',
+ r'(?s)<h\d[^>]+id=["\']showmedia_about_episode_num[^>]+>.+?</h\d>\s*<h4>\s*Season (\d+)',
webpage, 'season number', default=None))
return {