Browse Source

[raywenderlich] Extract videos in order

master-ytdl-org
Sergey M․ 7 years ago
parent
commit
5b1d158834
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      youtube_dl/extractor/raywenderlich.py

+ 3
- 3
youtube_dl/extractor/raywenderlich.py View File

@ -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'(<a[^>]+\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()))


Loading…
Cancel
Save