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

MLB URL (from iframe) #4063

Closed
RingoTheDog opened this issue Oct 30, 2014 · 4 comments
Closed

MLB URL (from iframe) #4063

RingoTheDog opened this issue Oct 30, 2014 · 4 comments

Comments

@RingoTheDog
Copy link

@RingoTheDog RingoTheDog commented Oct 30, 2014

<iframe src='http://mlb.mlb.com/shared/video/embed/embed.html?content_id=36751717?topic_id=6479266&width=400&height=224&property=mlb' width='400' height='224' frameborder='0'>

I am not really sure if the iframe is now expected to work, (I saw: inlineframe links in generic info extractor #3974) BUT....it seems the actual video URL (mlb.mlb.com) itself is not recognized: http://mlb.mlb.com/shared/video/embed/embed.html?content_id=36599553

youtube-dl.py -v "<iframe src='http://mlb.mlb.com/shared/video/embed/embed.html?content_id=36751717?topic_id=6479266&width=400&height=224&property=mlb' width='400' height='224' frameborder='0'>Your browser does not support iframes.</iframe>"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', "<iframe src='http://mlb.mlb.com/shared/video/ embed/embed.html?content_id=36751717?topic_id=6479266&width=400&height=224&prope rty=mlb' width='400' height='224' frameborder='0'>Your browser does not support
iframes.</iframe>"]
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2014.10.30
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-40824-
[debug] Proxy map: {}
WARNING: The url doesn't specify the protocol, trying with http
[generic] iframe>: Requesting header
WARNING: Could not send HEAD request to http://<iframe src='http://mlb.mlb.com/s hared/video/embed/embed.html?content_id=36751717?topic_id=6479266&width=400&heig ht=224&property=mlb' width='400' height='224' frameborder='0'>Your browser does
not support iframes.</iframe>: <urlopen error [Errno 11004] getaddrinfo failed>
[generic] iframe>: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 11004] getaddrinfo fail
ed> (caused by URLError(gaierror(11004, 'getaddrinfo failed'),))
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\common.py", line 23
1, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\YoutubeDL.py", line 1286, in
urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "C:\Python27\lib\urllib2.py", line 404, in open
response = self._open(req, data)
File "C:\Python27\lib\urllib2.py", line 422, in _open
'_open', req)
File "C:\Python27\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 1214, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "C:\Python27\lib\urllib2.py", line 1184, in do_open
raise URLError(err)

youtube-dl.py -v http://mlb.mlb.com/shared/video/embed/embed.html?content_id=36599553
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://mlb.mlb.com/shared/video/embed/embed.h
tml?content_id=36599553']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2014.10.30
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-40824-
[debug] Proxy map: {}
[generic] embed: Requesting header
WARNING: Falling back on generic information extractor.
[generic] embed: Downloading webpage
[generic] embed: Extracting information
ERROR: Unsupported URL: http://mlb.mlb.com/shared/video/embed/embed.html?content
_id=36599553; please report this issue on https://yt-dl.org/bug . Be sure to cal
l 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 "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\generic.py", line 5
81, in _real_extract
doc = parse_xml(webpage)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\utils.py", line 1629, in pars
e_xml
tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1300, in XML
parser.feed(text)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
raise err
ParseError: junk after document element: line 41, column 0
Traceback (most recent call last):
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\YoutubeDL.py", line 533, in e
xtract_info
ie_result = ie.extract(url)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\common.py", line 19
8, in extract
return self._real_extract(url)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\generic.py", line 9
62, in _real_extract
raise ExtractorError('Unsupported URL: %s' % url)
ExtractorError: Unsupported URL: http://mlb.mlb.com/shared/video/embed/embed.htm
l?content_id=36599553; please report this issue on https://yt-dl.org/bug . Be su
re to call youtube-dl with the --verbose flag and include its complete output. M
ake sure you are using the latest version; type youtube-dl -U to update.

(sorry if this is actually two separate issues....I wasn't really sure???)
Thanks as always....
Ringo

@phihag
Copy link
Contributor

@phihag phihag commented Oct 30, 2014

youtube-dl takes URLs, not HTML code. Now, http://mlb.mlb.com/shared/video/embed/embed.html?content_id=36599553 does not strike me as a URL that a user would visit. Can you share with us the URL of the site where you found the embedded video?

@RingoTheDog
Copy link
Author

@RingoTheDog RingoTheDog commented Oct 30, 2014

Sorry, not exactly sure where she found the iframe code...but here are some other mlb.mlb.com examples:
http://mlb.mlb.com/mlb/scoreboard/index.jsp
http://mlb.mlb.com/es/video/play.jsp?content_id=36599553

...she might have just pasted from the bottom of: http://www1.katc.com/news/video-attached-jeter-gives-yankees-win-at-stadium-finale/ ....which is just bad HTML (sorry)

@dstftw dstftw closed this in b2a68d1 Oct 31, 2014
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 31, 2014

Fixed. Thanks for the report.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 2, 2014

This has been fixed in youtube-dl 2014.11.02.1 and newer. Type youtube-dl.py -U to update.

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