Python3.6中的简单抓取百度网页源代码

xiaoxiao2021-02-28  87

import urllib.request url=’http://www.baidu.com/’ def getHtml(url): page=urllib.request.urlopen(url) html=page.read().decode(encoding=’utf-8’,errors=’strict’) return html print(getHtml(url))

转载请注明原文地址: https://www.6miu.com/read-37622.html

最新回复(0)