Youtube User query question

15 views
Skip to first unread message

ShriJ

unread,
Aug 9, 2008, 2:08:43 PM8/9/08
to GData Python Client Library Contributors
Hi,

I am using the Youtube API to get videos of a specific user. I am
setting the max_results and the start_index parameters of the query
object but I dont see these taking any effect. I am always getting the
same results.

Pseudo code:

client = gdata.youtube.service.YouTubeService()
query = gdata.youtube.service.YouTubeVideoQuery()
query.orderby = 'published'
query.max_results = '10'
query.start_index = '51'

youtube_username = <the appropriate username>

userFeed = client.GetYouTubeUserFeed(username=youtube_username)
...

What is the mistake I am doing? One possible problem: Is there a
necessity to give the clientIdkey and/or the applicationIdKey when
sending the query? I am using neither. If so, how and where do i use
them?

Jeff S

unread,
Aug 11, 2008, 7:02:30 PM8/11/08
to GData Python Client Library Contributors
I think that your query settings are not taking effect because they
are not being passed to GetYouTubeUserFeed. It looks like the call to
GetYouTubeUserFeed only includes the username, but you should be able
to use max_results and start_index if you use:

userFeed = client.GetYouTubeUserFeed(uri=query.ToString())

You will need to add the username to the feed string in the query
object, since the method will ignore the username when you pass in a
uri. Please let me know if it doesn't work :)

Happy coding,

Jeff
Reply all
Reply to author
Forward
0 new messages