You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
390 lines
17 KiB
390 lines
17 KiB
import datetime
|
|
|
|
current_day = datetime.datetime.now()
|
|
# 查策网
|
|
custom_settings_conf_chacewang = {
|
|
# 如果要整个网站续爬就,把参数设置为False ,如果想整个网站都遍历一次那么就把参数改为True
|
|
#'ISQUANPA': False,
|
|
'LOG_FILE': "logs/chacewang_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 8,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 3,
|
|
'ITEM_PIPELINES': {
|
|
'demo1.pipelines.MysqlYiBUPipeline': 678,
|
|
}
|
|
}
|
|
# 科学技术部
|
|
custom_settings_conf_kexujishubu = {
|
|
# 是否全爬 是全爬就写true 不是全爬就写false
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE': "logs/kexujishubu_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
'demo1.pipelines.kexujishubuPipeline': 679
|
|
}
|
|
}
|
|
# 工信部
|
|
custom_settings_conf_gongyehexinxihuabu = {
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE': "logs/gongyehexinxihuabu_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
'demo1.pipelines.gongyehexinxihuabuPipline': 680
|
|
}
|
|
}
|
|
|
|
# 国家自然科学基金委员会
|
|
custom_settings_conf_ziranweiyuanhui = {
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/ziranweiyuanhui_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#火炬中心
|
|
custom_settings_conf_huojuzhognxin = {
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/huojuzhongxin_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#发改委
|
|
custom_settings_conf_fagaiwei = {
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/fagaiwei_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#文化和旅游部
|
|
custom_settings_conf_wenhuahelvyoubu = {
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/wenhuahelvyoubu_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#中小企业总局
|
|
custom_settings_conf_zhongxiaoqiyezongju = {
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/zhongxiaoqiyezongju_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#山西小企业发展促进局
|
|
custom_settings_conf_cujinjuSpider = {
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/fazhancujinju_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#山西省科技厅
|
|
custom_settings_conf_sxkejitingSpider = {
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/sxkejiting_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#山西省商务厅
|
|
custom_settings_conf_sxShangwutingSpider={
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/sxshangwuting_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#山西省工业和信息厅
|
|
custom_settings_conf_sxgongxintingSpider={
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/sxgongxinting_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#山西综改示范区
|
|
custom_settings_conf_sxzonggaishifanSpider={
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/sxzonggaishifanqu_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#山西发改委
|
|
custom_settings_conf_sxfagaiweiSpider={
|
|
'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/sxfagaiwei_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#太原市科学技术局
|
|
custom_settings_conf_taiyuankexuejishujuSpider={
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/taiyuankjj_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#太原市工业和信息化局
|
|
custom_settings_conf_taiyuangongyehexinxihuajuSpider={
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/taiyuangongyehexinxihuaju_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#太原市商务局
|
|
custom_settings_conf_taiyuanshangwujuSpider={
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/taiyuanshangwuju_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 1,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 16,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
#企策通
|
|
custom_settings_conf_qicetongSpider={
|
|
'SHENBAOTONGZHI':"M7EkvSokQa3QVgX6WFf5LP",
|
|
#'ISQUANPA': False,
|
|
# LOG_ENABLED 默认: True,启用 logging
|
|
# LOG_ENCODING 默认: 'utf-8',logging 使用的编码
|
|
# LOG_FILE 默认: None,在当前目录里创建 logging 输出文件的文件名
|
|
# LOG_LEVEL 默认: 'DEBUG',log 的最低级别
|
|
# LOG_STDOUT 默认: False 如果为 True,进程所有的标准输出(及错误)将会被重定向到log 中。
|
|
# 例如,执行 print "hello" ,其将会在 Scrapy log 中显示。
|
|
'LOG_FILE' :"logs/qicetong_{}_{}.log".format(current_day.year, current_day.month, current_day.day),
|
|
# 下载时间间隔
|
|
'DOWNLOAD_DELAY': 8,
|
|
# 并发速度
|
|
'CONCURRENT_REQUESTS': 3,
|
|
'DOWNLOADER_MIDDLEWARES': {
|
|
'demo1.middlewares.DingZhiCookieMiddleware': None,
|
|
},
|
|
'ITEM_PIPELINES': {
|
|
#不带写了,用一个
|
|
'demo1.pipelines.ziranweiyuanhuiPipline': 681
|
|
}
|
|
}
|
|
|