Socket Error When Using Gdata Youtube Api In Python
I'm using gdata to map YouTube URLs to video titles, using the following code: import gdata.youtube.service as youtube import re import queue import urlparse ytservice = youtube
Solution 1:
My mistake was that the video_id
should be passed as a keyword parameter, like so:
self.ytdata = ytservice.GetYouTubeVideoEntry(video_id=self.video_id)
It seems that the socket exception is the only layer of gdata
that will throw an exception; it tries to get a URL blindly based on the arguments and it only fails when the URL fetch fails.
Post a Comment for "Socket Error When Using Gdata Youtube Api In Python"