{"provider_url": "http://www.youtube.com/","title": "Auto-Tune the News #8: dragons. geese. Michael Vick. (ft. T-Pain)","html": "embed code",...}
JsonRestaurantInfoView
views.py
ajax_restaurant_info.html
restaurants_info
providers/restaurants.py
# Create client and query to execute a YouTube search:gdata_youtube_client = gdata.youtube.service.YouTubeService();query = gdata.youtube.service.YouTubeVideoQuery()query.vq = "%s %s" % (restaurant.name, restaurant.city)video_feed = gdata_youtube_client.YouTubeQuery(query)# Grab the URL to the embeddable Flash player SWF (if embeddable)swf_url = video_entry.GetSwfUrl()if swf_url: restaurant.player = """<object width="425" height="350"> <param name="movie" value="%s"></param> <embed src="%s" type="application/x-shockwave-flash" width="425" height="350"></embed></object>""" % (swf_url, swf_url)
gdata_picasawebalbums_client = gdata.photos.service.PhotosService()query_parameters = map(urllib.quote, [restaurant.name, restaurant.city]);# Fetch a feed of 10 thumbnails, 32x32 pixels in size and cropped to a squarephoto_feed = gdata_picasawebalbums_client.GetFeed( "/data/feed/api/all?q=%s%%20%s&max-results=10&thumbsize=32c" % (query_parameters[0], query_parameters[1]))
show_restaurant_info
ajax_api_restaurant_info
http://gdata.youtube.com/feeds/api/playlists/snippets?q=soccer&v=2
// FlexoutBox = new LocalConnection(); outBox.send(outBoxName, "dispose");outBox.send(outBoxName, "loadMovie", ids[counter]);// AS2var inbox = new LocalConnection();inbox.connect(_root.boxName);inbox.dispose = function () { youtubeMC.destroy(); ...};
// FlexoutBoxName = String(new Date().getUTCMilliseconds()); swfLoader.load("youtubebridge.swf?boxName=" + outBoxName);// AS2inbox.connect(_root.boxName);