Closed bogn closed 12 years ago
+1
My issue got fixed by unsetting the http_proxy variable. http_proxy was set to '' (empty string)
In line 75 of client.rb (parser.parse) was trying to parse the url itself. If it was unable to download the content, the url itself is being returned and being tried to be parsed
parser = YouTubeIt::Parser::VideosFeedParser.new(request.url)
parser.parse
@bogn thanks for this advise we are working on that right now, tomorrow we going to push this fix
cheers!
@bogn now you can find a video like this
client.video_by("http://gdata.youtube.com/feeds/videos/EkF4JD2rO3QE")
client.video_by("http://www.youtube.com/watch?v=8WVTOUh53QY&feature=feedf")
client.video_by("8WVTOUh53QY")
client.video_by("http://youtu.be/6vW0cg3ranw")
Best, Mauro
Using ruby-1.9.2-p180 or ruby-1.9.3-rc1 the exception can be reproduced as follows: client = YouTubeIt::Client.new client.video_by("http://www.youtube.com/watch?v=ll68RgUIbks") or client.video_by("http://www.youtube.com/watch?v=wKjmbt_eTMs")
I'm aware that it works when you parse the unique_id yourself, but I'm quite sure most people expect this to be the responsiblity of the gem. And if a plain call to video_by can't be bothered to handle this, there should at least be a possibility to do this for example like so: client.video_by(:url => "http://www.youtube.com/watch?v=wKjmbt_eTMs")
I think a lot of the users of this gem have their visitors pasting some YouTube-URL into an input field, so this would save them from parsing stuff on their own (which isn't likely to be future proof) e.g. like:
If the gem would do it, the devs could rely on it to handle future changes to the URL schema and could ideally just update it, and everyting works again.