[crunchyroll] extract playlist entries ids
authorRemita Amine <remitamine@gmail.com>
Thu, 23 Feb 2017 10:54:43 +0000 (11:54 +0100)
committerRemita Amine <remitamine@gmail.com>
Thu, 23 Feb 2017 10:57:18 +0000 (11:57 +0100)
youtube_dl/extractor/crunchyroll.py

index d2b87442deb2fa7bbe736b840f793d90f37ef5cf..a1fc6a75618cecada911953fefd753db2d3a5632 100644 (file)
@@ -534,11 +534,11 @@ class CrunchyrollShowPlaylistIE(CrunchyrollBaseIE):
             r'(?s)<h1[^>]*>\s*<span itemprop="name">(.*?)</span>',
             webpage, 'title')
         episode_paths = re.findall(
-            r'(?s)<li id="showview_videos_media_[0-9]+"[^>]+>.*?<a href="([^"]+)"',
+            r'(?s)<li id="showview_videos_media_(\d+)"[^>]+>.*?<a href="([^"]+)"',
             webpage)
         entries = [
-            self.url_result('http://www.crunchyroll.com' + ep, 'Crunchyroll')
-            for ep in episode_paths
+            self.url_result('http://www.crunchyroll.com' + ep, 'Crunchyroll', ep_id)
+            for ep_id, ep in episode_paths
         ]
         entries.reverse()