无法获取hymls 的值
来源:13-5 HTML结构分析基本原则二条

狂人7
2018-10-22
from urllib import request
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
class Spider():
url = ‘https://www.panda.tv/cate/lol’
def __fetch_content(self):
r = request.urlopen(Spider.url)
htmls = r.read()
a = 1
def go(self):
self.__fetch_content()
spider = Spider()
spider.go()
写回答
3回答
-
狂人7
提问者
2018-10-22
已经解决。
mac 系统的同学,找到python安装包里面的这个文件,运行一下。关掉ide,重新打开,即可不报错。
/Applications/Python\ 3.6/Install\ Certificates.command
012018-10-22 -
狂人7
提问者
2018-10-22
。htmls 没有数值
00 -
狂人7
提问者
2018-10-22
我是mac系统
00
相似问题