Playing with youtube’s XML-RPC api’s
January 7th, 2006
I quote a mail from one of the developers from www.youtube.com… They proved to be extremely helpfull & fast in responding to my query. I hope this mail will help all noobs like me ;-P
Hi,
To call the API functions through Python’s XML-RPC interface, you need to pass in a dictionary that holds all the parameters. The dictionary needs to contain an entry for each parameter specified in the API reference. servers.youtube.users.get_profile requires two parameters, dev_id (your developer id, which can be found in your profile
http://www.youtube.com/my_profile_dev.php) and the user that you want to retrieve the profile for.Here’s an example:
>>> import xmlrpclib
>>> server = xmlrpclib.Server(”http://www.youtube.com/api2_xmlrpc”)
>>> server.youtube.users.get_profile({ “dev_id” : “your-dev-id”, “user” : “makuchaku” })…..
Please let me know if this helps.
Cuong
& you can find a very simple example of how to create an XML-RPC server in python, HERE.
Posted in Python | Comments (0)