ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.03k stars 10.01k forks source link

Better support for download of subtitles on Dplay.no #14194

Closed MrDemocracy closed 6 years ago

MrDemocracy commented 7 years ago

Please follow the guide below


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

Before submitting an issue make sure you have:

What is the purpose of your issue?


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


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

youtube-dl --write-sub --all-subs -v http://www.dplay.no/nattpatruljen/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--write-sub', u'--all-subs', u'-v', u'http://www.dplay.no/nattpatruljen/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.09.11
[debug] Python version 2.7.13 - Darwin-16.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.3.2, ffprobe 3.3.2, rtmpdump 2.4
[debug] Proxy map: {}
[generic] nattpatruljen: Requesting header
WARNING: Falling back on generic information extractor.
[generic] nattpatruljen: Downloading webpage
[generic] nattpatruljen: Extracting information
ERROR: Unsupported URL: http://www.dplay.no/nattpatruljen/
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/youtube_dl/extractor/generic.py", line 2116, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/youtube_dl/compat.py", line 2539, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/youtube_dl/compat.py", line 2528, in _XML
    parser.feed(text)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
    self._raiseerror(v)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
    raise err
ParseError: syntax error: line 1, column 0
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 776, in extract_info
    ie_result = ie.extract(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 434, in extract
    ie_result = self._real_extract(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/youtube_dl/extractor/generic.py", line 2964, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: http://www.dplay.no/nattpatruljen/

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

I would like to be able to download only the subtitles of every episode of a series on Dplay.no

This can be done without a premium membership (manually for each episode), by going to "http://www.dplay.no/api/v2/ajax/videos?video_id=[data-video-id]".

The video ID can be found in the source code of the episode page (example) of any episode on Dplay, if you add "data-video-id" to the "find on page" filter (while in the source code).

The id for Season 1 Episode 3 of "Nattpatruljen" is 6284.

When you goto the ajax video page for ID 6284, you can find the subtile-urls at the bottom of the page: srt, vtt.

Could this please be implemented as an automated process where I can just do "youtube-dl --write-sub --all-subs http://www.dplay.no/nattpatruljen/" to download all subtitles for that series?

dstftw commented 6 years ago

Duplicate of #14960.