Closed rainchen closed 12 years ago
When I tried
youtube_client.activity(user_id)
it will raise an error "NoMethodError Exception: undefined method `elements' for nil:NilClass"
the bug is here:
https://github.com/kylejginavan/youtube_it/blob/master/lib/youtube_it/parser.rb#L218
the value of link_tag would be (when video_type is "video_rated"):
"<link href='http://gdata.youtube.com/feeds/api/videos/videoid' rel='http://gdata.youtube.com/schemas/2007#video' type='application/atom+xml'/>"
then
YouTubeIt::Parser::VideoFeedParser.new(link_tag).parse
will be exceptional
here is a quick fix:
videos << YouTubeIt::Parser::VideoFeedParser.new(link_tag).parse if link_tag.elements["entry"]
gem version : 2.1.4
thanks for this report, I added the fix
When I tried
it will raise an error "NoMethodError Exception: undefined method `elements' for nil:NilClass"
the bug is here:
the value of link_tag would be (when video_type is "video_rated"):
then
will be exceptional
here is a quick fix:
videos << YouTubeIt::Parser::VideoFeedParser.new(link_tag).parse if link_tag.elements["entry"]
gem version : 2.1.4