随笔分类 -  python爬虫相关

python爬虫相关
摘要:from pyquery import PyQuery as pq import os from queue import Queue from threading import Thread class txtparser(Thread): def __init__(self,queue): Thread.__init__(self) self.queu... 阅读全文
posted @ 2019-03-23 01:13 saintdingtheGreat 阅读(190) 评论(0) 推荐(0)
摘要:from queue import Queue from threading import Thread class mydownloader(Thread): def __init__(self,queue): Thread.__init__(self) self.queue = queue def run(self): i =... 阅读全文
posted @ 2019-03-22 00:25 saintdingtheGreat 阅读(142) 评论(0) 推荐(0)
摘要:声明一个beautifulsoup4对象 阅读全文
posted @ 2019-03-14 22:47 saintdingtheGreat 阅读(82) 评论(0) 推荐(0)
摘要:scrapy version -v #该命令用于查看scrapy安装的相关组件和版本 一个工程下可创建多个爬虫 scrapy genspider rxmetal rxmetal.com scrapy genspider rxmetal2 rxmetal2.com scrapy genspider r 阅读全文
posted @ 2018-09-13 12:26 saintdingtheGreat 阅读(384) 评论(0) 推荐(0)
摘要:前提安装好scrapy模块最好 requests和bs4模块都安装好 可以概括为五个步骤 步骤一:新建一个项目 无论你用windows也好,linux也罢,在cmd或者终端 切换到目标文件夹,然后输入命令 scrapy startproject dingsspider(自定义的项目名) 步骤二:生成 阅读全文
posted @ 2018-08-31 00:09 saintdingtheGreat 阅读(187) 评论(0) 推荐(0)