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

MTV.com extractor not working #4153

Closed
RealDeviil opened this issue Nov 11, 2014 · 4 comments
Closed

MTV.com extractor not working #4153

RealDeviil opened this issue Nov 11, 2014 · 4 comments

Comments

@RealDeviil
Copy link

@RealDeviil RealDeviil commented Nov 11, 2014

Am I doing something wrong? Here is the verbose output:

root@ubuntu:/home/user# youtube-dl -v -o /home/user/Desktop/video.mp4 "http://www.mtv.com/videos/french-montana/1096736/julius-caesar.jhtml"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-o', '/home/user/Desktop/video.mp4', 'http://www.mtv.com/videos/french-montana/1096736/julius-caesar.jhtml']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.11.09
[debug] Python version 2.7.6 - Linux-3.13.0-32-generic-i686-with-Ubuntu-14.04-trusty
[debug] exe versions: ffmpeg N-63893-
[debug] Proxy map: {}
[MTV] 1096736: Downloading webpage
[MTV] 1096736: Downloading info
[MTV] 1096736: Extracting information
[MTV] 1096736: Downloading video urls
[debug] Invoking downloader on u'http://mtvnmobile.vo.llnwd.net/kip0/_pxn=1+_pxI0=Ripod-h264+_pxL0=undefined+_pxM0=+_pxK=18639+_pxE=mp4/44620/mtvnorigin/gsp.alias/mediabus/mtv.com/2014/11/03/04/26/5377987/5377987_5377987_20141103162628873_1280x720_3500_h32.mp4'
ERROR: unable to download video data: HTTP Error 400: Bad Request
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1064, in process_info
success = dl(filename, info_dict)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1040, in dl
return fd.download(name, info)
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 292, in download
return self.real_download(filename, info_dict)
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 64, in real_download
data = self.ydl.urlopen(request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1298, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request

Thank you!

@RealDeviil
Copy link
Author

@RealDeviil RealDeviil commented Nov 11, 2014

Here's another one:

root@ubuntu:/home/user# youtube-dl -v -o /home/user/Desktop/video.mp4 "http://www.mtv.com/shows/ema/problem-break-free-live/1098546/video/#id=1731514"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-o', '/home/user/Desktop/video.mp4', 'http://www.mtv.com/shows/ema/problem-break-free-live/1098546/video/#id=1731514']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.11.09
[debug] Python version 2.7.6 - Linux-3.13.0-32-generic-i686-with-Ubuntu-14.04-trusty
[debug] exe versions: ffmpeg N-63893-
[debug] Proxy map: {}
[generic] #id=1731514: Requesting header
WARNING: Falling back on generic information extractor.
[generic] #id=1731514: Downloading webpage
[generic] #id=1731514: Extracting information
ERROR: Unsupported URL: http://www.mtv.com/shows/ema/problem-break-free-live/1098546/video/#id=1731514; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 599, in _real_extract
doc = parse_xml(webpage)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1310, in parse_xml
tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
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
ParseError: not well-formed (invalid token): line 14, column 1239
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 536, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 199, in extract
return self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 980, in _real_extract
raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: http://www.mtv.com/shows/ema/problem-break-free-live/1098546/video/#id=1731514; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.

@RealDeviil
Copy link
Author

@RealDeviil RealDeviil commented Nov 11, 2014

Hey guys:

Regarding this video:
http://www.mtv.com/videos/french-montana/1096736/julius-caesar.jhtml

For this RTMP source URL:
rtmpe://viacommtvstrmfs.fplive.net/viacommtvstrm/gsp.alias/mediabus/mtv.com/2014/11/03/04/26/5377987/5377987_5377987_20141103162628873_1280x720_3500_h32.mp4

This HTTP-equivalent URL works: http://viacommtvstrmfs.fplive.net/gsp.alias/mediabus/mtv.com/2014/11/03/04/26/5377987/5377987_5377987_20141103162628873_1280x720_3500_h32.mp4

Instead of the current youtube-dl HTTP-equivalent URL:
http://mtvnmobile.vo.llnwd.net/kip0/_pxn=1+_pxI0=Ripod-h264+_pxL0=undefined+_pxM0=+_pxK=18639+_pxE=mp4/44620/mtvnorigin/gsp.alias/mediabus/mtv.com/2014/11/03/04/26/5377987/5377987_5377987_20141103162628873_1280x720_3500_h32.mp4

I will do some more testing to verify that this holds true for other videos as well.

@Tailszefox
Copy link
Contributor

@Tailszefox Tailszefox commented Nov 11, 2014

I can confirm that this works perfectly, including for Gametrailers videos re. #4123 .

Changing https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/mtv.py#L36 to base = "http://viacommtvstrmfs.fplive.net/" allows the video to be downloaded.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 12, 2014

@RealDeviil thanks for finding the solution!

By the way, you should avoid running youtube-dl as the root user. It's only needed for updating.

@jaimeMF jaimeMF closed this Nov 12, 2014
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
5 participants
@Tailszefox @jaimeMF @RealDeviil and others
You can’t perform that action at this time.