[crunchyroll] Fix format extraction
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 2 Jan 2015 20:17:10 +0000 (21:17 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 2 Jan 2015 20:17:10 +0000 (21:17 +0100)
Reported in https://github.com/rg3/youtube-dl/issues/2782#issuecomment-68556780

youtube_dl/extractor/crunchyroll.py

index 354046a9e1428bac87f5d9709d16d43308c84555..1680f532f80167a65c2dbdc3b5bc0bfa83f7fc66 100644 (file)
@@ -228,7 +228,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
         video_thumbnail = self._search_regex(r'<episode_image_url>([^<]+)', playerdata, 'thumbnail', fatal=False)
 
         formats = []
-        for fmt in re.findall(r'\?p([0-9]{3,4})=1', webpage):
+        for fmt in re.findall(r'showmedia\.([0-9]{3,4})p', webpage):
             stream_quality, stream_format = self._FORMAT_IDS[fmt]
             video_format = fmt + 'p'
             streamdata_req = compat_urllib_request.Request('http://www.crunchyroll.com/xml/')