17
การขูด: SSL: CERTIFICATE_VERIFY_FAILED ข้อผิดพลาดสำหรับ http://en.wikipedia.org
ฉันกำลังฝึกโค้ดจาก 'Web Scraping with Python' และมีปัญหาใบรับรองนี้อยู่เรื่อย ๆ : from urllib.request import urlopen from bs4 import BeautifulSoup import re pages = set() def getLinks(pageUrl): global pages html = urlopen("http://en.wikipedia.org"+pageUrl) bsObj = BeautifulSoup(html) for link in bsObj.findAll("a", href=re.compile("^(/wiki/)")): if 'href' in link.attrs: if link.attrs['href'] not in pages: #We have encountered a new …