0

I am trying this code to get the data from api in Jupyter Notebook

import urllib

link = "https://api.covidactnow.org/v2/counties.timeseries.json?apiKey=2bd2fb77d0f7415f8313b45e5d260206"
f = urllib.urlopen(link)
myfile = f.read()
print(myfile.head())

I getting this error

AttributeError                            Traceback (most recent call last)
<ipython-input-7-722af2e4bbfc> in <module>
      2 
      3 link = "https://api.covidactnow.org/v2/counties.timeseries.json?apiKey=2bd2fb77d0f7415f8313b45e5d260206"
----> 4 f = urllib.urlopen(link)
      5 myfile = f.read()
      6 print(myfile.head())

AttributeError: module 'urllib' has no attribute 'urlopen'
2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.