0
我已经做了这部分代码,但它表明我这个错误,当我跑这NoneType'对象在python中没有属性?
for tmp in links:
jobref=re.search('jobId=(\d+)&', tmp).group()+".html"
print(jobref)
if tmp not in os.listdir('.'):
file=open(jobref,"w+")
file.write(urllib.urlopen(tmp).read())
AttributeError的:“NoneType”对象有没有属性“组”
就如何解决它的主意?
're.search'可能返回'None' –