aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/crunchyroll.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-09-08 14:37:53 +0600
committerSergey M․ <dstftw@gmail.com>2015-09-08 14:37:53 +0600
commit47004d9579839137bff17949f38db2844829bbd6 (patch)
tree1d8e910bdeeb878306153689e42a020b24af3979 /youtube_dl/extractor/crunchyroll.py
parent12810c9cd3c2a5a50ca0ea309d27af2decc8b263 (diff)
downloadyoutube-dl-47004d9579839137bff17949f38db2844829bbd6.zip
youtube-dl-47004d9579839137bff17949f38db2844829bbd6.tar.gz
youtube-dl-47004d9579839137bff17949f38db2844829bbd6.tar.bz2
[crunchyroll] Fix uploader and upload date extraction
Diffstat (limited to 'youtube_dl/extractor/crunchyroll.py')
-rw-r--r--youtube_dl/extractor/crunchyroll.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/crunchyroll.py b/youtube_dl/extractor/crunchyroll.py
index c5dbc68..95952bc 100644
--- a/youtube_dl/extractor/crunchyroll.py
+++ b/youtube_dl/extractor/crunchyroll.py
@@ -275,10 +275,14 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
video_description = self._html_search_regex(r'"description":"([^"]+)', webpage, 'video_description', default='')
if not video_description:
video_description = None
- video_upload_date = self._html_search_regex(r'<div>Availability for free users:(.+?)</div>', webpage, 'video_upload_date', fatal=False, flags=re.DOTALL)
+ 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)
if video_upload_date:
video_upload_date = unified_strdate(video_upload_date)
- video_uploader = self._html_search_regex(r'<div>\s*Publisher:(.+?)</div>', webpage, 'video_uploader', fatal=False, flags=re.DOTALL)
+ video_uploader = self._html_search_regex(
+ r'<a[^>]+href="/publisher/[^"]+"[^>]*>([^<]+)</a>', webpage,
+ 'video_uploader', fatal=False)
playerdata_url = compat_urllib_parse_unquote(self._html_search_regex(r'"config_url":"([^"]+)', webpage, 'playerdata_url'))
playerdata_req = compat_urllib_request.Request(playerdata_url)