Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oreilly.com video can not start first item video at Playlist #27136

Open
6 tasks
vikiaiteam opened this issue Nov 21, 2020 · 3 comments
Open
6 tasks

oreilly.com video can not start first item video at Playlist #27136

vikiaiteam opened this issue Nov 21, 2020 · 3 comments

Comments

@vikiaiteam
Copy link

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.11.21.1
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

C:\Oreilly_Video\720P>youtube-dl -u xxx  -p xxx https://learning.oreilly.com/videos/cisco-ccna-200-301/9781789130089/
[safari:course] 9781789130089: Downloading course JSON
[download] Downloading playlist: Cisco CCNA 200-301: The Complete Guide to Getting Certified
[safari:course] playlist Cisco CCNA 200-301: The Complete Guide to Getting Certified: Collected 275 video ids (downloading 275 of them)
[download] Downloading video 1 of 275
[safari:api] 9781789130089/video28_3: Downloading part JSON
[safari] 9781789130089-video28_3: Downloading webpage
[Kaltura] 9781789130089-video28_3: Downloading webpage
[Kaltura] 0_om8prfbf: Downloading video info JSON
[Kaltura] 0_om8prfbf: Checking mp4-592 URL
[Kaltura] 0_om8prfbf: Downloading m3u8 information
[download] Destination: Standard, Extended and Named ACLs-0_om8prfbf.mp4
[download]   9.0% of 5.51MiB at 305.64KiB/s ETA 00:16

Description

WRITE DESCRIPTION HERE

@vikiaiteam vikiaiteam changed the title oreilly.com video can not start at 1 video at Playlist oreilly.com video can not start 1 video at Playlist Nov 21, 2020
@vikiaiteam vikiaiteam changed the title oreilly.com video can not start 1 video at Playlist oreilly.com video can not start 1th video at Playlist Nov 21, 2020
@vikiaiteam vikiaiteam changed the title oreilly.com video can not start 1th video at Playlist oreilly.com video can not start first item video at Playlist Nov 21, 2020
@october262
Copy link

youtube-dl --playlist-items 1,2,3 https://learning.oreilly.com/videos/cisco-ccna-200-301/9781789130089/

@nahidx
Copy link

nahidx commented Dec 12, 2020

Same here. Downloading playlist doesn't obey the original sequence, %(playlist_index) is also randomized.
Which means --playlist-start doesn't work anymore on learning.oreilly.com.

@nahidx
Copy link

nahidx commented Dec 12, 2020

Adding course_json['chapters'] = sorted(course_json['chapters']) or course_json['chapters'].sort() right before line 254 fixes the issue for me.

def _real_extract(self, url):
course_id = self._match_id(url)
course_json = self._download_json(
'%s/book/%s/?override_format=%s' % (self._API_BASE, course_id, self._API_FORMAT),
course_id, 'Downloading course JSON')
if 'chapters' not in course_json:
raise ExtractorError(
'No chapters found for course %s' % course_id, expected=True)
entries = [
self.url_result(chapter, SafariApiIE.ie_key())
for chapter in course_json['chapters']]
course_title = course_json['title']
return self.playlist_result(entries, course_id, course_title)

def _real_extract(self, url): 
    course_id = self._match_id(url) 
 
    course_json = self._download_json( 
        '%s/book/%s/?override_format=%s' % (self._API_BASE, course_id, self._API_FORMAT), 
        course_id, 'Downloading course JSON') 
 
    if 'chapters' not in course_json: 
        raise ExtractorError( 
            'No chapters found for course %s' % course_id, expected=True) 

    course_json['chapters'].sort()
 
    entries = [ 
        self.url_result(chapter, SafariApiIE.ie_key()) 
        for chapter in course_json['chapters']] 
 
    course_title = course_json['title'] 
 
    return self.playlist_result(entries, course_id, course_title) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants