From 5b1d158834f9202f29b650c4467fe144777380b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Sat, 10 Mar 2018 04:31:51 +0700 Subject: [PATCH] [raywenderlich] Extract videos in order --- youtube_dl/extractor/raywenderlich.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/raywenderlich.py b/youtube_dl/extractor/raywenderlich.py index 0f061c4b2..2a90677f4 100644 --- a/youtube_dl/extractor/raywenderlich.py +++ b/youtube_dl/extractor/raywenderlich.py @@ -75,7 +75,7 @@ class RayWenderlichIE(InfoExtractor): 'Downloading playlist %s - add --no-playlist to just download video' % course_id) - lesson_ids = [lesson_id] + lesson_ids = set((lesson_id, )) for lesson in re.findall( r'(]+\bclass=["\']lesson-link[^>]+>)', webpage): attrs = extract_attributes(lesson) @@ -88,10 +88,10 @@ class RayWenderlichIE(InfoExtractor): r'/lessons/(\d+)', lesson_url, 'lesson id', default=None) if not lesson_id: continue - lesson_ids.append(lesson_id) + lesson_ids.add(lesson_id) entries = [] - for lesson_id in orderedSet(lesson_ids): + for lesson_id in sorted(lesson_ids): entries.append(self.url_result( smuggle_url(urljoin(url, lesson_id), {'force_video': True}), ie=RayWenderlichIE.ie_key())) -- 2.22.2