This forum is now read-only. Please use our new forums! Go to forums
1.3 npr API story
can’t figure out how to do 1.3 of the npr story API. this is what i have:
urllib2(urlopen) json(load) url = “http://api.npr.org/query?apiKey=“ key = “API_KEY” url += key
not sure what i’m doing wrong.
Answer 5111567592232bf84e000851
2 votes
Hi James,
Your syntax for importing modules is incorrect. It should be in the format:
from module_name import function
Thanks
Answer 5160c2f7563c2668e10025e9
1 vote
should be: from urllib2 import urlopen from json import load url = “http://api.npr.org/query?apiKey=“ key = “API_KEY” url += key
Answer 510fc323f72679af810039a5
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency