# -*- coding: utf-8 -*-

# Scrapy settings for maoyan project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
# https://doc.scrapy.org/en/latest/topics/spider-middleware.html # #Scrapy项目的名字,这将用来构造默认 User-Agent
BOT_NAME = 'BLZX' SPIDER_MODULES = ['BLZX.spiders'] # Scrapy搜索spider的模块列表 默认: [xxx.spiders]
NEWSPIDER_MODULE = 'BLZX.spiders' # 使用 genspider 命令创建新spider的模块。默认: 'xxx.spiders' # 通过在用户代理上标识您自己(和您的网站)来负责地爬行
# Crawl responsibly by identifying yourself (and your website) on the user-agent
#USER_AGENT = 'maoyan (+http://www.yourdomain.com)' # Obey robots.txt rules 遵守robots.txt规则
ROBOTSTXT_OBEY = False # 配置Scrapy执行的最大并发请求(默认值:16)
# Configure maximum concurrent requests performed by Scrapy (default: 16)
#CONCURRENT_REQUESTS = 32 # 同一网站的请求配置延迟(默认值:0)
# Configure a delay for requests for the same website (default: 0)
# See https://doc.scrapy.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
# 下载延迟
#DOWNLOAD_DELAY = 3 # 下载延迟设置将仅满足以下条件之一(二选一)
# The download delay setting will honor only one of:
#CONCURRENT_REQUESTS_PER_DOMAIN = 16 # 每个域的并发请求的最大值
#CONCURRENT_REQUESTS_PER_IP = 16 # 对单个IP进行并发请求的最大值 # 禁用cookie(默认情况下启用)
# Disable cookies (enabled by default)
#COOKIES_ENABLED = False # 禁用telnet控制台(默认启用)
# Disable Telnet Console (enabled by default)
#TELNETCONSOLE_ENABLED = False # 覆盖默认请求头
# Override the default request headers:
#DEFAULT_REQUEST_HEADERS = {
# 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
# 'Accept-Language': 'en',
#} # 启用或禁用蜘蛛中间件
# Enable or disable spider middlewares
# See https://doc.scrapy.org/en/latest/topics/spider-middleware.html # =======================Spider Middleware=============================
#SPIDER_MIDDLEWARES = {
# 'maoyan.middlewares.MaoyanSpiderMiddleware': 543,
#} # 启用或禁用下载器中间件
# Enable or disable downloader middlewares
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html # =====================Downloader Middleware===========================
# DOWNLOADER_MIDDLEWARES = {
# 'maoyan.middlewares.MaoyanDownloaderMiddleware': 543,
# } # 启用或禁用扩展
# Enable or disable extensions
# See https://doc.scrapy.org/en/latest/topics/extensions.html
#EXTENSIONS = {
# 'scrapy.extensions.telnet.TelnetConsole': None,
#} # 管道配置项目
# Configure item pipelines
# See https://doc.scrapy.org/en/latest/topics/item-pipeline.html
#ITEM_PIPELINES = {
# 'maoyan.pipelines.MaoyanPipeline': 300,
#} # 启用和配置AutoThrottle扩展(默认情况下禁用)
# Enable and configure the AutoThrottle extension (disabled by default)
# See https://doc.scrapy.org/en/latest/topics/autothrottle.html
#AUTOTHROTTLE_ENABLED = True # 初始下载延迟
# The initial download delay
#AUTOTHROTTLE_START_DELAY = 5 # 在高延迟情况下设置的最大下载延迟
# The maximum download delay to be set in case of high latencies
#AUTOTHROTTLE_MAX_DELAY = 60 # Scrapy平均请求数应与每个远程服务器并行发送
# The average number of requests Scrapy should be sending in parallel to
# each remote server
#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
#AUTOTHROTTLE_DEBUG = False # 启用和配置HTTP缓存(默认情况下禁用)
# Enable and configure HTTP caching (disabled by default)
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
#HTTPCACHE_ENABLED = True
#HTTPCACHE_EXPIRATION_SECS = 0
#HTTPCACHE_DIR = 'httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES = []
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'

最新文章

  1. 优雅的使用python之环境管理
  2. my_strstr()
  3. 【linux】jdk安装
  4. 便携式文件夹加密器 lockdir 5.74
  5. FMDB 使用方法
  6. *HTML5 新元素
  7. UVa11526 H(n)
  8. Windows8 正式版最简单的去除桌面水印方法
  9. RabbitMQ入门-Routing直连模式
  10. Android Tv 中的按键事件 KeyEvent 分发处理流程
  11. 错误:This function has none of DETERMINISTIC... 的解决
  12. 《SQL CookBook 》笔记-第二章-查询结果排序
  13. FTP软件FileZilla 3.38.1下载
  14. float清除浮动
  15. poj3074 DLX精确覆盖
  16. admin 的流程 Xadmin
  17. python3 开发面试题(面向对象)6.6
  18. 1 - bootstrap基本模板
  19. C# Winform下一个热插拔的MIS/MRP/ERP框架14(自动更新)
  20. pt-archiver(数据导入导出工具)

热门文章

  1. [App Store Connect帮助]七、在 App Store 上发行(3.1)提交至“App 审核”:提交 App 以供审核
  2. [Swift]编程语言:文档修订历史
  3. Noip2014生活大爆炸版石头剪刀布【水模拟】
  4. BZOJ2006 超级钢琴
  5. [USACO 2011 Nov Gold] Cow Steeplechase【二分图】
  6. Proactive Patching Overview
  7. Object流
  8. MongoDB操作简记
  9. CF949A/950C Zebras
  10. MVC中使用MVCPager简单分页