Discuss / Python / 抄了作业了 不清楚json 还有感谢楼下老哥的新网站!

抄了作业了 不清楚json 还有感谢楼下老哥的新网站!

Topic source

def fetch_data(url):

    with request.urlopen(url) as f:

        data = f.read()

        data_str = data.decode('utf-8')

        return json.loads(data_str)


  • 1

Reply