Discuss / Python / 作业

作业

Topic source

皇甫Yuri

#1 Created at ... [Delete] [Delete and Lock User]
from urllib import request
import ssl, json

context = ssl._create_unverified_context()

def fetch_data(url):
    with request.urlopen(url, context=context) as f:
        return json.load(f)

  • 1

Reply