首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

python进阶-04课程源码

后端 74.21KB 10 需要积分: 1
立即下载

资源介绍:

python进阶-04课程源码
# Scrapy settings for tutorial project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-middleware.html # https://docs.scrapy.org/en/latest/topics/spider-middleware.html import random BOT_NAME = 'tutorial' SPIDER_MODULES = ['tutorial.spiders'] NEWSPIDER_MODULE = 'tutorial.spiders' # Crawl responsibly by identifying yourself (and your website) on the user-agent #USER_AGENT = 'tutorial (+http://www.yourdomain.com)' # Obey robots.txt rules ROBOTSTXT_OBEY = False # Configure maximum concurrent requests performed by Scrapy (default: 16) #CONCURRENT_REQUESTS = 32 # Configure a delay for requests for the same website (default: 0) # See https://docs.scrapy.org/en/latest/topics/settings.html#download-delay # See also autothrottle settings and docs DOWNLOAD_DELAY = 0 #每次请求间隔 0 秒 # The download delay setting will honor only one of: #CONCURRENT_REQUESTS_PER_DOMAIN = 16 #CONCURRENT_REQUESTS_PER_IP = 16 # Disable cookies (enabled by default) #COOKIES_ENABLED = False # 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://docs.scrapy.org/en/latest/topics/spider-middleware.html #SPIDER_MIDDLEWARES = { # 'tutorial.middlewares.TutorialSpiderMiddleware': 543, #} # Enable or disable downloader middlewares # See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html #DOWNLOADER_MIDDLEWARES = { # 'tutorial.middlewares.TutorialDownloaderMiddleware': 543, #} # Enable or disable extensions # See https://docs.scrapy.org/en/latest/topics/extensions.html #EXTENSIONS = { # 'scrapy.extensions.telnet.TelnetConsole': None, #} # Configure item pipelines # See https://docs.scrapy.org/en/latest/topics/item-pipeline.html ITEM_PIPELINES = { # 'tutorial.pipelines.TutorialPipeline': 300, # 'tutorial.save_Image_pipeline.SaveImagePipeline': 300, # 'tutorial.video_download_pipeline.VideoDownloadPipeline': 500, 'tutorial.text_download_pipeline.TextDownloadPipeline':300 } # Enable and configure the AutoThrottle extension (disabled by default) # See https://docs.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 # 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 # Enable and configure HTTP caching (disabled by default) # See https://docs.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' ####################################### #图片处理 ####################################### #设置图片过期时间天数 #专业图片服务器:FastDFS, TFS IMAGES_EXPIRES = 90 # IMAGES_THUMBS = { 'small': (50, 50), 'big': (270, 270), } import os IMAGES_STORE = 'F:\\zhaoxi_project\\base_project\\part2_spider\\day04\\toscrape\\images' if not os.path.exists(IMAGES_STORE): os.makedirs(IMAGES_STORE) #linux IMAGES_STORE = '/opt/images' ################################################ #日志功能 #debug, info, error, warn 从低到高 #level 设置打印日志的水位线 #打印日志原则:level=info, 凡是比level的优先级高或者等,则打印日志 #线上日志一般level=error LOG_LEVEL = "INFO" from datetime import datetime LOG_DIR = "log" if not os.path.exists(LOG_DIR): os.makedirs(LOG_DIR) today = datetime.now() LOG_FILE = f"{LOG_DIR}/scrapy_{today.year}_{today.month}_{today.day}.log" ################################################### USER_AGENT_LIST = [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1", "Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6", "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/19.77.34.5 Safari/537.1", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5", "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.36 Safari/536.5", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3", "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3", "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3", "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.0 Safari/536.3", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24" ] USER_AGENT = random.choice(USER_AGENT_LIST)

资源文件列表:

python进阶-04课程源码.zip 大约有82个文件
  1. __pycache__/
  2. __pycache__/main.cpython-36.pyc 351B
  3. api/
  4. api/__init__.py
  5. api/__pycache__/
  6. api/__pycache__/__init__.cpython-36.pyc 100B
  7. api/crawler/
  8. api/crawler/__pycache__/
  9. api/crawler/__pycache__/fanyi.cpython-36.pyc 2.97KB
  10. api/crawler/__pycache__/params.cpython-36.pyc 372B
  11. api/crawler/fanyi.py 5.19KB
  12. api/crawler/params.py 200B
  13. api/crawler/text.html 12.97KB
  14. api/system/
  15. api/system/__pycache__/
  16. api/system/__pycache__/user.cpython-36.pyc 3.54KB
  17. api/system/user/
  18. api/system/user/__pycache__/
  19. api/system/user/__pycache__/params.cpython-36.pyc 650B
  20. api/system/user/__pycache__/user.cpython-36.pyc 3.1KB
  21. api/system/user/params.py 310B
  22. api/system/user/user.py 3.96KB
  23. common/
  24. common/common/
  25. common/commonclass/
  26. config/
  27. config/db_config.ini 114B
  28. main.py 4.67KB
  29. scrapy_project.py 185B
  30. tutorial/
  31. tutorial/DownLoadText/
  32. tutorial/geckodriver.log 34.63KB
  33. tutorial/images/
  34. tutorial/log/
  35. tutorial/log/scrapy_2024_11_25.log 98.5KB
  36. tutorial/log/scrapy_2024_11_26.log 49.63KB
  37. tutorial/quotes-1.html 10.8KB
  38. tutorial/quotes-2.html 13.42KB
  39. tutorial/quotes.jsonlines 10.84KB
  40. tutorial/scrapy.cfg 259B
  41. tutorial/tutorial/
  42. tutorial/tutorial/__init__.py
  43. tutorial/tutorial/__pycache__/
  44. tutorial/tutorial/__pycache__/__init__.cpython-36.pyc 146B
  45. tutorial/tutorial/__pycache__/items.cpython-36.pyc 732B
  46. tutorial/tutorial/__pycache__/pipelines.cpython-36.pyc 612B
  47. tutorial/tutorial/__pycache__/save_Image_pipeline.cpython-36.pyc 1.01KB
  48. tutorial/tutorial/__pycache__/settings.cpython-36.pyc 2.87KB
  49. tutorial/tutorial/__pycache__/text_download_pipeline.cpython-36.pyc 1.09KB
  50. tutorial/tutorial/__pycache__/video_download_pipeline.cpython-36.pyc 1.58KB
  51. tutorial/tutorial/items.py 754B
  52. tutorial/tutorial/middlewares.py 3.57KB
  53. tutorial/tutorial/pipelines.py 362B
  54. tutorial/tutorial/save_Image_pipeline.py 1.24KB
  55. tutorial/tutorial/settings.py 6.4KB
  56. tutorial/tutorial/spiders/
  57. tutorial/tutorial/spiders/__init__.py 161B
  58. tutorial/tutorial/spiders/__pycache__/
  59. tutorial/tutorial/spiders/__pycache__/__init__.cpython-36.pyc 154B
  60. tutorial/tutorial/spiders/__pycache__/quotes_spider.cpython-36.pyc 2.38KB
  61. tutorial/tutorial/spiders/__pycache__/xbiqugu.cpython-36.pyc 1.7KB
  62. tutorial/tutorial/spiders/dload_files.py 1.05KB
  63. tutorial/tutorial/spiders/quotes_spider.py 3.58KB
  64. tutorial/tutorial/spiders/xbiqugu.py 1.54KB
  65. tutorial/tutorial/text_download_pipeline.py 1.27KB
  66. tutorial/tutorial/video_download_pipeline.py 1.36KB
  67. tutorial/videos/
  68. utils/
  69. utils/__init__.py
  70. utils/__pycache__/
  71. utils/__pycache__/__init__.cpython-312.pyc 148B
  72. utils/__pycache__/__init__.cpython-36.pyc 134B
  73. utils/__pycache__/config_helper.cpython-36.pyc 862B
  74. utils/__pycache__/module1.cpython-312.pyc 270B
  75. utils/__pycache__/module1.cpython-36.pyc 250B
  76. utils/__pycache__/module2.cpython-312.pyc 270B
  77. utils/__pycache__/module2.cpython-36.pyc 250B
  78. utils/__pycache__/orm_helper.cpython-36.pyc 6.75KB
  79. utils/__pycache__/pymysql_helper.cpython-36.pyc 2.37KB
  80. utils/config_helper.py 867B
  81. utils/orm_helper.py 5.83KB
  82. utils/pymysql_helper.py 2.86KB
0评论
提交 加载更多评论
其他资源 自动化连线工具使用教程
自动化连线工具使用教程
springboot基于springboot的大创管理系统(代码+数据库+LW)
摘要 随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成熟。本文介绍了大创管理系统的开发全过程。通过分析大创管理系统管理的不足,创建了一个计算机管理大创管理系统的方案。文章介绍了大创管理系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。 本大创管理系统有院系管理员,指导老师以及学生三个角色。学生功能有优秀项目,项目信息,评审方案,大创资讯,项目申报管理,项目中检管理,项目结项管理,项目评审管理,专家评审管理。指导老师功能有个人中心,优秀项目管理,项目类型管理,项目信息管理,项目申报管理,项目中检管理,项目结项管理,项目评审管理,专家评审管理,评审方案管理。院系管理员功能有个人中心,优秀项目管理,项目类型管理,项目信息管理,项目申报管理,项目中检管理,项目结项管理,项目评审管理,专家评审管理,评审方案管理。因而具有一定的实用性。 本站是一个B/S模式系统,采用SSM框架,MYSQL数据库设计开发,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得大创管理系统管理工作系统化、规范化。本系统的使用使管理
springboot视频网站系统的设计与实现(代码+数据库+LW)
摘  要 使用旧方法对视频信息进行系统化管理已经不再让人们信赖了,把现在的网络信息技术运用在视频信息的管理上面可以解决许多信息管理上面的难题,比如处理数据时间很长,数据存在错误不能及时纠正等问题。 这次开发的视频网站系统管理员功能有个人中心,用户管理,视频分享管理,视频排名管理,平台公告管理,视频类型管理,交流论坛管理,留言板管理,系统管理等。用户功能有个人中心和视频分享管理。经过前面自己查阅的网络知识,加上自己在学校课堂上学习的知识,决定开发系统选择B/S模式这种高效率的模式完成系统功能开发。这种模式让操作员基于浏览器的方式进行网站访问,采用的主流的Java语言这种面向对象的语言进行视频网站系统程序的开发,在数据库的选择上面,选择功能强大的MySQL数据库进行数据的存放操作。 视频网站系统被人们投放于现在的生活中进行使用,该款管理类软件就可以让管理人员处理信息的时间介于十几秒之间。在这十几秒内就能完成信息的编辑等操作。有了这样的管理软件,视频信息的管理就离无纸化办公的目标更贴近了。 关键词:视频网站系统;Spring Boot 框架;Java;MySQL数据库
程序设计基础1-8章-PPT.zip
程序设计基础1-8章-PPT.zip
基于MATLAB汉字定位检测识别系统【GUI含界面】.zip
基于MATLAB汉字定位检测识别系统【GUI含界面】.zip
Delphi7实现RTSP代码部分关键源码和文档.zip
以前使用过的开发资料,主要是RTSP协议的实现和演示。
基于MATLAB谷物计数源码【含界面GUI】.zip
基于MATLAB谷物计数源码【含界面GUI】.zip
基于MATLAB谷物计数系统【含界面GUI】.zip
基于MATLAB谷物计数系统【含界面GUI】.zip