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

Support for Newsweek videos? #20362

Open
kenorb opened this issue Mar 15, 2019 · 1 comment
Open

Support for Newsweek videos? #20362

kenorb opened this issue Mar 15, 2019 · 1 comment

Comments

@kenorb
Copy link

@kenorb kenorb commented Mar 15, 2019

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

$ LC_ALL=C.UTF-8 \youtube-dl -U
It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.
  • I've verified and I assure that I'm running youtube-dl 2019.02.08

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
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

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:

$ \youtube-dl -vvv https://www.newsweek.com/time-reversed-quantum-computer-1361215
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-vvv', u'https://www.newsweek.com/time-reversed-quantum-computer-1361215']
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2019.02.08
[debug] Python version 2.7.15+ (CPython) - Linux-4.18.0-16-generic-x86_64-with-Ubuntu-18.10-cosmic
[debug] exe versions: ffmpeg 4.0.2-2, ffprobe 4.0.2-2, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[generic] time-reversed-quantum-computer-1361215: Requesting header
WARNING: Falling back on generic information extractor.
[generic] time-reversed-quantum-computer-1361215: Downloading webpage
[generic] time-reversed-quantum-computer-1361215: Extracting information
ERROR: Unsupported URL: https://www.newsweek.com/time-reversed-quantum-computer-1361215
Traceback (most recent call last):
  File "/home/kenorb/.local/lib/python2.7/site-packages/youtube_dl/extractor/generic.py", line 2337, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/home/kenorb/.local/lib/python2.7/site-packages/youtube_dl/compat.py", line 2542, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
  File "/home/kenorb/.local/lib/python2.7/site-packages/youtube_dl/compat.py", line 2531, in _XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1659, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 68, column 74
Traceback (most recent call last):
  File "/home/kenorb/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 794, in extract_info
    ie_result = ie.extract(url)
  File "/home/kenorb/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 508, in extract
    ie_result = self._real_extract(url)
  File "/home/kenorb/.local/lib/python2.7/site-packages/youtube_dl/extractor/generic.py", line 3320, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: https://www.newsweek.com/time-reversed-quantum-computer-1361215

$ \youtube-dl https://www.newsweek.com/6f51dea4-43e9-467c-9bf2-bfddec0478bb
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[generic] 6f51dea4-43e9-467c-9bf2-bfddec0478bb: Requesting header
WARNING: Could not send HEAD request to https://www.newsweek.com/6f51dea4-43e9-467c-9bf2-bfddec0478bb: HTTP Error 410: Gone
[generic] 6f51dea4-43e9-467c-9bf2-bfddec0478bb: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 410: Gone (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.
...
<end of log>

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 was expecting that videos from Newsweek would be supported, but they're not. I believe they're using similar mechanism to the other sites.

@douglasg14b
Copy link

@douglasg14b douglasg14b commented Oct 9, 2019

Newsweek downloads chunks of the video as it plays, the blob URL itself is unused.

In your case, when you play the video it requests https://video.newsweek.com/transcoder/480hls/2550/time-reversal-16x9-cms-155250170000000.ts

Which replies as 206, and then it iterates the last number on 155250170000000.ts till the full video is loaded. Ie 155250170000001.ts -> 155250170000002.ts -> 155250170000003.ts

These just return MPEG-2 chunks.

I'm surprised that youtube-dl doesn't natively handle this?

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
2 participants
You can’t perform that action at this time.