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

please improve error handling for unsupported site #5296

Closed
leggewie opened this issue Mar 27, 2015 · 3 comments
Closed

please improve error handling for unsupported site #5296

leggewie opened this issue Mar 27, 2015 · 3 comments

Comments

@leggewie
Copy link

@leggewie leggewie commented Mar 27, 2015

It would be nice if youtube-dl did better than simply crash like this. The error should be caught and a more meaningful message displayed to the user that the [site](http://www.handelsblatt.com/video/dirk-muellers-cash-kurs-rocket-internet-und-die-neue-new-economy-blase/10753844.html site) is currently unsupported.

$ youtube-dl -v http://www.handelsblatt.com/video/dirk-muellers-cash-kurs-rocket-internet-und-die-neue-new-economy-blase/10753844.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.handelsblatt.com/video/dirk-muellers-cash-kurs-rocket-internet-und-die-neue-new-economy-blase/10753844.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.12.01
[debug] Python version 2.7.6 - Linux-3.13.0-46-generic-i686-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 10753844: Requesting header
[redirect] Following redirect to http://www.handelsblatt.com/video/finanzen/dirk-muellers-cash-kurs-rocket-internet-und-die-neue-new-economy-blase/10753844.html
[generic] 10753844: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 10753844: Downloading webpage
[generic] 10753844: Extracting information
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 6, in
youtube_dl.main()
File "/usr/lib/python2.7/dist-packages/youtube_dl/init.py", line 355, in main
_real_main(argv)
File "/usr/lib/python2.7/dist-packages/youtube_dl/init.py", line 345, in _real_main
retcode = ydl.download(all_urls)
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1117, in download
res = self.extract_info(url)
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 564, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 617, in process_ie_result
extra_info=extra_info)
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 553, in extract_info
ie_result = ie.extract(url)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 241, in extract
return self._real_extract(url)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 700, in _real_extract
bc_urls = BrightcoveIE._extract_brightcove_urls(webpage)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/brightcove.py", line 186, in _extract_brightcove_urls
return [cls._build_brighcove_url(m) for m in matches]
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/brightcove.py", line 118, in _build_brighcove_url
object_doc = xml.etree.ElementTree.fromstring(object_str.encode('utf-8'))
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
parser.feed(text)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: mismatched tag: line 19, column 2

@ghost
Copy link

@ghost ghost commented Mar 27, 2015

The error should be caught and a more meaningful message displayed to the user that the site is currently unsupported.

youtube-dl currently already does this, though.

$ youtube-dl http://veetle.com/?play=c6e2259c0ff96548766448b8c7f6ec54
[generic] ?play=c6e2259c0ff96548766448b8c7f6ec54: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?play=c6e2259c0ff96548766448b8c7f6ec54: Downloading webpage
[generic] ?play=c6e2259c0ff96548766448b8c7f6ec54: Extracting information
ERROR: Unsupported URL: http://veetle.com/?play=c6e2259c0ff96548766448b8c7f6ec54

In regards to the website, it works fine here. Try updating youtube-dl.

$ youtube-dl -v http://www.handelsblatt.com/video/dirk-muellers-cash-kurs-rocket-internet-und-die-neue-new-economy-blase/10753844.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.handelsblatt.com/video/dirk-muellers-cash-kurs-rocket-internet-und-die-neue-new-economy-blase/10753844.html']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.03.24
[debug] Python version 3.4.3 - Linux-3.19.2-1-ARCH-x86_64-with-arch-Arch-Linux
[debug] exe versions: ffmpeg 2.6.1, ffprobe 2.6.1, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 10753844: Requesting header
[redirect] Following redirect to http://www.handelsblatt.com/video/finanzen/dirk-muellers-cash-kurs-rocket-internet-und-die-neue-new-economy-blase/10753844.html
[generic] 10753844: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 10753844: Downloading webpage
[generic] 10753844: Extracting information
[generic] Brightcove video detected.
[download] Downloading playlist: Dirk Müllers Cash-Kurs: Rocket Internet und die neue „New Economy“-Blase - Finanzen - Video - Handelsblatt
[generic] playlist Dirk Müllers Cash-Kurs: Rocket Internet und die neue „New Economy“-Blase - Finanzen - Video - Handelsblatt: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[Brightcove] 3805601096001: Downloading webpage
[Brightcove] 3805601096001: Extracting information
[debug] Invoking downloader on 'http://brightcove.vo.llnwd.net/pd16/media/110743091001/201409/3189/110743091001_3805775361001_140925-NewEconomy.mp4'
[download] Destination: Rocket Internet und die neue 'New Economy'-Blase-3805601096001.mp4
[download] 100% of 44.48MiB in 01:18

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Mar 27, 2015

As @hotdogman has said, update youtube-dl (see our FAQ if you have any problem).

@jaimeMF jaimeMF closed this Mar 27, 2015
@leggewie
Copy link
Author

@leggewie leggewie commented Mar 27, 2015

Indeed, that works. Sorry about the noise.

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.