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
131.39k stars 9.96k forks source link

tv.spectator.co.uk plays private Vimeo but generic extractor used #26527

Open RalphCorderoy opened 4 years ago

RalphCorderoy commented 4 years ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-vF', u'https://tv.spectator.co.uk/event/the-week-in-60-minutes-with-andrew-neil']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.07.28
[debug] Python version 2.7.14 (CPython) - Linux-4.13.0-17-generic-x86_64-with-Ubuntu-17.10-artful
[debug] exe versions: ffmpeg 3.3.4-2, ffprobe 3.3.4-2, rtmpdump 2.4
[debug] Proxy map: {}
[generic] the-week-in-60-minutes-with-andrew-neil: Requesting header
WARNING: Falling back on generic information extractor.
[generic] the-week-in-60-minutes-with-andrew-neil: Downloading webpage
[generic] the-week-in-60-minutes-with-andrew-neil: Extracting information
ERROR: Unsupported URL: https://tv.spectator.co.uk/event/the-week-in-60-minutes-with-andrew-neil
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/extractor/generic.py", line 2387, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "./youtube-dl/youtube_dl/compat.py", line 2562, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
  File "./youtube-dl/youtube_dl/compat.py", line 2551, 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 33, column 1256
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "./youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "./youtube-dl/youtube_dl/extractor/generic.py", line 3382, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: https://tv.spectator.co.uk/event/the-week-in-60-minutes-with-andrew-neil

Description

Playing the video on https://tv.spectator.co.uk/event/the-week-in-60-minutes-with-andrew-neil shows Vimeo is used. Using Firefox's network inspector I think the URL is https://player.vimeo.com/video/453637719.  Passing that URL to youtube-dl -F gives

[vimeo] 453637719: Downloading webpage
ERROR: Cannot download embed-only video without embedding URL. Please call youtube-dl with the URL of the page that embeds this video.

The Spectator is starting a weekly series of programmes featuring Andrew Neil, a respected UK political interviewer, so it would be nice to be able to access them. Watching in Firefox isn't practical for me.

rpvcg commented 4 years ago

As a workaround, use the embed url with referer: youtube-dl --referer https://tv.spectator.co.uk https://player.vimeo.com/video/453637719

TheChatty commented 3 years ago

I can confirm this to be working as well for youtube-dl --referer https://vrk-akademie.de/publikationen/ https://player.vimeo.com/video/464988955