初学爬虫
Gxjd_Mr_蒋
python爬虫学习交流
展开
-
爬取某市的公交路线站点
创建类在这class Gongjao8684(object): def __init__(self,url): self.url=url self.all_gj_list=[] self.filename=(urlsplit(self.url)[1]).split('.')[0]get_tree(url)函数,便于调用def get_tree(selfj,url): he...原创 2019-09-08 12:22:55 · 1108 阅读 · 0 评论 -
爬取’史书典籍‘
‘’’http://www.shicimingju.com/book/index.html‘’’import urllib.requestimport urllib.parsefrom lxml import etreeimport osimport timefrom urllib.parse import urljoinclass Choose(object):def get...原创 2019-09-08 21:04:43 · 1179 阅读 · 0 评论