[Python3]爬虫HTTP Error 500错误

【Python3】爬虫出现HTTP Error 500: Internal Server Error,加入headers也不能解决,求教

刚刚开始学习,看了一个****之后按照教程尝试,但是结果出现了urllib.error.HTTPError: HTTP Error 500: Internal Server Error,按照老师教的方法怎么也解决不了问题,想请教一下大家!网页信息都是刚刚copy的,也没有问题,下面是我的代码:
from urllib import request
from urllib import parse

url = ‘https://www.lagou.com/jobs/positionAjax.json?city=%E4%B8%8A%E6%B5%B7&needAddtionalResult=false’
headers = {
‘User-Agent’:‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36’,
‘Referer’:‘https://www.lagou.com/jobs/list_python%E5%AE%9E%E4%B9%A0?oquery=Python&fromSearch=true&labelWords=relative&city=%E4%B8%8A%E6%B5%B7’,
}

data = {‘first’:‘true’,
‘pin’:‘1’,
‘kd’:‘python’
‘’}
req=request.Request(url,headers=headers,data=parse.urlencode(data).encode(‘utf-8’),method=‘post’)
resp = request.urlopen(req)
print(resp.read().encode(‘utf-8’))

运行结果是:[Python3]爬虫HTTP Error 500错误
麻烦大家看一下,谢谢!