python爬虫学习 2.4 (使用Xpath得案例)

上传:qq_60359 浏览: 14 推荐: 0 文件:PDF 大小:32.91KB 上传时间:2020-12-23 02:56:43 版权申诉
python爬虫学习 2.4 (使用Xpath得案例) 啥都不说了,直接看代码吧 # coding=utf-8 import requests from lxml import etree import json class TiebaSpider: def __init__(self,tieba_name): self.tieba_name = tieba_name self.start_url = "http://tieba.baidu.com/mo/q----,sz@320_240-1-3---2/m?kw="+tieba_name+"&pn=0"
上传资源
用户评论