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.35k stars 9.95k forks source link

Waiting in a queue - metopera.com #24392

Open superian opened 4 years ago

superian commented 4 years ago

Checklist

Description

MetOpera.com is freely streaming some of its back catalogue at the moment.

Unsurprisingly, it's been very popular. The demand meant I had difficulty getting the first one, Carmen, to play in a browser and was delighted to see that youtube-dl worked fine in getting it.

As a result of the demand, they've added an automated queuing system. Requests are redirected to queue-it.net before coming back to the Met. In a browser, I get access to the second stream, La Boheme, in a few seconds, but youtube-dl is stopped by the queue page, every time:

:~/Videos/opera$ youtube-dl "https://www.metopera.org/season/on-demand/opera/?upc=811357011737" -v [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'https://www.metopera.org/season/on-demand/opera/?upc=811357011737', u'-v'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2020.03.08 [debug] Python version 2.7.17 (CPython) - Linux-5.3.0-42-generic-x86_64-with-Ubuntu-19.10-eoan [debug] exe versions: ffmpeg 4.1.4-1build2, ffprobe 4.1.4-1build2, phantomjs 2.1.1, rtmpdump 2.4 [debug] Proxy map: {} [generic] ?upc=811357011737: Requesting header [redirect] Following redirect to https://metopera.queue-it.net/?c=metopera&e=testevent&ver=v3-aspnet-3.6.1&cver=7&man=Production%20Queue&t=https%3A%2F%2Fwww.metopera.org%2Fseason%2Fon-demand%2Fopera%2F%3Fupc%3D811357011737 [generic] ?c=metopera&e=testevent&ver=v3-aspnet-3.6.1&cver=7&man=Production Queue&t=https://www.metopera: Requesting header WARNING: Falling back on generic information extractor. [generic] ?c=metopera&e=testevent&ver=v3-aspnet-3.6.1&cver=7&man=Production Queue&t=https://www.metopera: Downloading webpage [generic] ?c=metopera&e=testevent&ver=v3-aspnet-3.6.1&cver=7&man=Production Queue&t=https://www.metopera: Extracting information ERROR: Unsupported URL: https://metopera.queue-it.net/?c=metopera&e=testevent&ver=v3-aspnet-3.6.1&cver=7&man=Production%20Queue&t=https%3A%2F%2Fwww.metopera.org%2Fseason%2Fon-demand%2Fopera%2F%3Fupc%3D811357011737 Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2375, in _real_extract doc = compat_etree_fromstring(webpage.encode('utf-8')) File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2551, 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 2540, 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: undefined entity: line 19, column 0 Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract ie_result = self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 3351, in _real_extract raise UnsupportedError(url) UnsupportedError: Unsupported URL: https://metopera.queue-it.net/?c=metopera&e=testevent&ver=v3-aspnet-3.6.1&cver=7&man=Production%20Queue&t=https%3A%2F%2Fwww.metopera.org%2Fseason%2Fon-demand%2Fopera%2F%3Fupc%3D811357011737

superian commented 4 years ago

I have tried copying cookies from the browser to youtube-dl, but this generates an error: cookies.txt

youtube-dl "https://www.metopera.org/season/on-demand/opera/?upc=811357011737" --cookies cookies.txt /usr/lib/python2.7/_MozillaCookieJar.py:109: UserWarning: cookielib bug! Traceback (most recent call last): File "/usr/lib/python2.7/_MozillaCookieJar.py", line 71, in _really_load line.split("\t") ValueError: too many values to unpack

_warn_unhandled_exception() Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/youtube-dl/main.py", line 19, in File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 474, in main File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 441, in _real_main File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 419, in init File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2329, in _setup_opener File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 2762, in load File "/usr/lib/python2.7/_MozillaCookieJar.py", line 111, in _really_load (filename, line)) cookielib.LoadError: invalid Netscape format cookies file u'cookies.txt': u'www.metopera.org\tFALSE\t/\tFALSE\t0\tcurrentinfo\tSessID=76e80c5468f911ea80df00505685612f00000000000000000000000000000000&LASTACCESS=03/18/20\t5:18:45'

cookies.txt

superian commented 4 years ago

They've switched to a provider who can cope with the demand, but it's possibly still an interesting issue.