当前位置:网站首页>scrapy 命令
scrapy 命令
2022-07-28 05:25:00 【幻影七幻】
一、全局命令
1-startproject
创建一个新的Scrapy项目:
scrapy startproject <project_name> [project_dir]例如:scrapy startproject Crawler51job
【注意】项目名称不能以数字开头
2-genspider
在当前文件夹或者当前项目,创建一个新的爬虫文件
scrapy genspider [-t template] <name> <domain>例如:scrapy genspider -t basic spider51job 51job.com
其他template参数见帮助文档
3-runspider
运行一个爬虫文件
scrapy runspider <spider_file.py>例如;scrapy runspider test51job.py
4-fetch
获取指定的URL,并且能够显示出获取的过程
scrapy fetch <url>例如:scrapy fetch https://www.baidu.com
5-view
在浏览器中打开指定的URL
scrapy view <url>scrapy view https://www.baidu.com6-version
打印出Scrapy版本号
scrapy version [-v]scrapy version -v二、项目命令
1-crawl
运行爬虫项目
scrapy crawl <spider>例如:scrapy crawl spider51job [--nolog]
2-bench
测试本地硬件性能
scrapy bench3-list
列出当前项目下的所有爬虫文件
scrapy list边栏推荐
- error: redefinition of ‘xxx‘
- [server usage record] log in to the remote server through the springboard machine and transfer files
- Trouble encountered in cable testing -- a case study of a manufacturer?
- Synopsys Multivoltage Flow
- Talk about the "hybrid mode" of esxi virtual switch and port group
- Detailed explanation of word mail merge function: after merging, multiple word documents are generated and blank pages are deleted
- Transformer self attention mechanism and complete code implementation
- 多个ics日历合并成单个ics日历
- Find the network address and broadcast address of the host according to the IP address and subnet mask
- How to use the bit error meter?
猜你喜欢
随机推荐
clickhouse聚合之探索聚合内部机制
Systemmediasize startup option added in esxi 7.0 update 1C
Matlab 信号处理
基于 YOLOV5 的 SAR 图像舰船检测
qt自定义滑动按钮(美观且使用方便)
Transformer self attention mechanism and complete code implementation
【学习笔记】进程创建
ubunut 服务器上传下载文件
How to use the bit error meter?
mysql join技巧
Fluke dtx-sfm2 single mode module of a company in Hangzhou - repair case
自定义组件--插槽
What about the insufficient memory of Clickhouse aggregation? Then improve the polymerization performance
VS Code 基础配置与美化
Icc2 (III) clock tree synthesis
毕业论文 | 文献综述应该怎么写
VAN(DWConv+DWDilationConv+PWConv)
qt实现将相关信息输出到日志文件
使用wampserver3.2.6时切换中文时造成启动失败
到底什么是Hash?(量化交易机器人系统开发)









