发布网友 发布时间:2022-04-22 07:12
共2个回答
热心网友 时间:2022-05-11 00:59
import beautifulsoup
import urllib2
def main():
userMainUrl = "你要抓取的地址"
req = urllib2.Request(userMainUrl)
resp = urllib2.urlopen(req)
respHtml = resp.read()
foundLabel = respHtml.findAll("label")
finalL =foundLabel.string
print "biaoti=",finalL
if __name__=="__main__":
main();