当前位置:网站首页>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边栏推荐
猜你喜欢

自定义组件--父子组件之间的通信

使用wampserver3.2.6时切换中文时造成启动失败

How can fluke dsx2-5000 and dsx2-8000 modules find the calibration expiration date?

qt中Qthread线程的使用以及安全关闭

VS Code 基础配置与美化

EMC experiment practical case ESD electrostatic experiment

Trouble encountered in cable testing -- a case study of a manufacturer?

自定义组件--数据监听器

解决内存占用比应用进程占用高的问题

Pytorch learning note 4 - automatic calculation of gradient descent autograd
随机推荐
PyTorch 学习笔记 1 —— Quick Start
PyTorch 学习笔记
Relative path and absolute path
OpenGL的开发环境配置【VS2017】+常见问题
Measure computer battery capacity
Perl introductory learning (VIII) subroutine
解决内存占用比应用进程占用高的问题
Find the network address and broadcast address of the host according to the IP address and subnet mask
qt批量操作控件,并设置信号槽
How many columns are the most suitable for Clickhouse to build a width table?
Machine learning note 5 - logistic regression
Vs code basic configuration and beautification
当mysql表从压缩表变成普通表会发生什么
【学习笔记】编码能力
Pycharm2019 set editor theme and default code
根据IP地址和子网掩码求主机所在的网络地址和广播地址
Matlab 信号处理
Matlab simulation of radar imaging 3 - multi-target detection
mysql删表不删库
基于 YOLOV5 的 SAR 图像舰船检测