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

Unable to fetch favorites where page > 1 #1

Open
akahn opened this issue Jul 15, 2009 · 0 comments
Open

Unable to fetch favorites where page > 1 #1

akahn opened this issue Jul 15, 2009 · 0 comments

Comments

@akahn
Copy link

akahn commented Jul 15, 2009

I'm using youtube_g to retrieve users' favorites. But when I specify a page that is greater than 1, I get an error. This is illustrated below:

>> client = YouTubeG::Client.new
=> #<YouTubeG::Client:0x1110368>
>> vids = client.videos_by(:favorites, :user => 'alexanderkahn', :page => 1)
=> #<YouTubeG::Response::VideoSearch:0x1cf7960.......
>> vids = client.videos_by(:favorites, :user => 'alexanderkahn', :page => 2)
NoMethodError: undefined method `text' for nil:NilClass
    from /opt/local/lib/ruby/gems/1.8/gems/tmm1-youtube-g-0.5.0/lib/youtube_g/parser.rb:46:in `parse_entry'
    from /opt/local/lib/ruby/gems/1.8/gems/tmm1-youtube-g-0.5.0/lib/youtube_g/parser.rb:155:in `parse_content'
    from /opt/local/lib/ruby/1.8/rexml/element.rb:891:in `each'
    from /opt/local/lib/ruby/1.8/rexml/xpath.rb:53:in `each'
    from /opt/local/lib/ruby/1.8/rexml/element.rb:891:in `each'
    from /opt/local/lib/ruby/gems/1.8/gems/tmm1-youtube-g-0.5.0/lib/youtube_g/parser.rb:154:in `parse_content'
    from /opt/local/lib/ruby/gems/1.8/gems/tmm1-youtube-g-0.5.0/lib/youtube_g/parser.rb:9:in `parse'
    from /opt/local/lib/ruby/gems/1.8/gems/tmm1-youtube-g-0.5.0/lib/youtube_g/client.rb:58:in `videos_by'
    from (irb):7

It appears that specifying a page greater than one works with API methods other than :favorites, but I haven't tested this extensively. Any information on this issue would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant