6. Print out story titles


#1

Can anyone tell me what's wrong with this code. I keep getting this error..

http://api.npr.org/query?apiKey=API_KEY&numResults=3&format=json$id=1001
Traceback (most recent call last):
File "python", line 11, in
ValueError: No JSON object could be decoded

I swear its exactly the same as the opening minus the user input. Any help would be appreciated.

from urllib2 import urlopen
from json import load

url = 'http://api.npr.org/query?apiKey='
key = 'API_KEY'
url = url + key
url += '&numResults=3&format=json$id=1001'
print url

response = urlopen(url)
json_obj = load(response)

for story in json_obj['list']['story']:
print story['title']['$text']


#2

    &id=

That's the only mistake I can see.


#3

That was it...Thanks!