User:-JSON example-: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "import turtle import urllib2 import json url = "http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?v=2&alt=jsonc" f = urllib2.urlopen(url) data = json.load(...")
 
(Blanked the page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
import turtle


import urllib2
import json
url = "http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?v=2&alt=jsonc"
f = urllib2.urlopen(url)
data = json.load(f)
things = data['data']['items']
for i in things:
print i['category']

Latest revision as of 16:13, 9 April 2014