我正在尝试从CKAN API URL检索数据:
import urllib.request
import json
import pandas as pd
url = 'https://data.gov.il/api/3/action/datastore_search?resource_id=dcf999c1-d394-4b57-a5e0-9d014a62e046&limit=1000000'
with urllib.request.urlopen(url) as response:
html = response.read()
result = jso
我有一个小爬虫,我正在提取一个网页内容的一个简单的网页。
def url2dict(url):
'''
DOCSTRING: converts two-column data into a dictionary with first column as a key.
INPUT: URL address as a string
OUTPUT: dictionary with one key and one value
'''
with urlopen(url) as page:
p