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

[safari] Add support for learning paths #14012

Open
brennebeck opened this issue Aug 24, 2017 · 9 comments
Open

[safari] Add support for learning paths #14012

brennebeck opened this issue Aug 24, 2017 · 9 comments
Labels

Comments

@brennebeck
Copy link

@brennebeck brennebeck commented Aug 24, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.08.23. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.08.23

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


Debug log:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--console-title', u'--restrict-filenames', u'-f', u'mp4[height<=480]', u'--cache-dir', u'/Users/brennebeck/.cache/youtube-dl', u'-o', u'%(autonumber)s-%(title)s.%(ext)s', u'-v', u'--format', u'best', u'https://www.safaribooksonline.com/learning-paths/learning-path-server-side/9781491992289', u'--username=PRIVATE', u'--password=PRIVATE']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.08.18
[debug] Python version 2.7.12 - Darwin-16.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.3.3, ffprobe 3.3.3, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 9781491992289: Requesting header
[redirect] Following redirect to https://www.safaribooksonline.com/learning-paths/learning-path-server-side/9781491992289/
[generic] 9781491992289: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 9781491992289: Downloading webpage
[generic] 9781491992289: Extracting information
ERROR: Unsupported URL: https://www.safaribooksonline.com/learning-paths/learning-path-server-side/9781491992289/
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2103, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2539, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
  File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2528, in _XML
    parser.feed(text)
  File "/Users/brennebeck/.pyenv/versions/2.7.12/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
    self._raiseerror(v)
  File "/Users/brennebeck/.pyenv/versions/2.7.12/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 111, column 386
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 776, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 433, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2976, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: https://www.safaribooksonline.com/learning-paths/learning-path-server-side/9781491992289/

Unsupported URLs:

  • https//www.safaribooksonline.com/learning-paths/learning-path-server-side/9781491992289/

Previously, the 'Learning Paths' in SafariBooksOnline.com would download as a course. Unfortunately, this seems to have stopped working within the last few days (I used this a recently the beginning of the week). I'm not sure what changed that would've broken the compatibility.

@dstftw dstftw closed this Aug 24, 2017
@dstftw dstftw added the duplicate label Aug 24, 2017
@dstftw dstftw changed the title Safaribooksonline.com - Learning Paths download stopped working [safari] Add support for learning paths Aug 24, 2017
@dstftw dstftw reopened this Aug 24, 2017
@dstftw dstftw added request and removed duplicate labels Aug 24, 2017
@PranjalGohain
Copy link

@PranjalGohain PranjalGohain commented Oct 11, 2018

Is this resolved in any of the latest versions ?

@brennebeck
Copy link
Author

@brennebeck brennebeck commented Oct 12, 2018

I’ll be able to try in about an hour. I’ll confirm on my end after the attempt.

@rizwan-ishtiaq
Copy link

@rizwan-ishtiaq rizwan-ishtiaq commented Dec 17, 2018

do someone have any update on this issue?

@zioalex
Copy link

@zioalex zioalex commented Apr 13, 2019

Hi guys, any news here?
I tried to hack it but for some reason it tries to download the wrong link:
https://learning.oreilly.com/api/v1/book/9781789530308/?override_format=json
instead of the correct path https://learning.oreilly.com/learning-paths/learning-path-artificial/9781789530308 .
Anybody can help to understand the internal logic? How does it choose which class to use in safary.pi extractor?

@OllieRobinson
Copy link

@OllieRobinson OllieRobinson commented Nov 26, 2019

Yeah still can't download learning paths :(

@space55
Copy link

@space55 space55 commented Nov 27, 2019

I wrote a quick patch for it in a fork:
https://github.com/space55/youtube-dl
If someone would like to download it and give it a shot, please, feel free. If it works well, I'll PR it back into the main repo.

@LingarajVB
Copy link

@LingarajVB LingarajVB commented Dec 25, 2019

@space55 how to install by cloning it ? can you please provide steps?

@indiarocks08
Copy link

@indiarocks08 indiarocks08 commented Feb 13, 2020

@space55 Can you help with saving the videos in folder which are from same chapter ?
Like video1_2, video1_3,video1_4 in Folder video1
and video2_1,video2_2,video2_3 etc in video2..

any help with categorization would be great, its difficult to copy each files to chapters folder after downloading all videos in bulk

@brain74
Copy link

@brain74 brain74 commented Feb 13, 2020

@space55 I download your clone.
I lunch it manually calling directly the main.py.
Here an example:
./main.py -v -u ******* -p ***** https://learning.oreilly.com/learning-paths/learning-path-web/0636920310648/

This is the output with the error:

[debug] System config: [u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'-i', u'-c', u'--no-warnings', u'--console-title', u'--batch-file=/Users/DG/Dropbox/safarivideos/batch-file.txt', u'-o', u'%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s', u'-f', u'best[tbr<=1000]/worst[[height>=720]]/best[[height<720]]']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'https://learning.oreilly.com/learning-paths/learning-path-web/0636920310648/']
[debug] Batch file urls: []
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.22
[debug] Python version 2.7.16 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[safari:course] Downloading login page
[safari:course] Logging in
[safari:course] Completing login
[safari:course] 0636920310648: Downloading course JSON
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/Users/DG/Downloads/youtube-dl-master/youtube_dl/extractor/common.py", line 627, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/Users/DG/Downloads/youtube-dl-master/youtube_dl/YoutubeDL.py", line 2237, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

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

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.