from urllib import request, parsefrom urllib.error import HTTPError, URLError def get(url, headers=None): return urlrequests(url, headers=headers) #必须写headers,因为按顺序走会form def post(url, form, headers=None): return urlrequests(url, form, headers=header…