1、scrapy 新建项目

  1. scrapy startproject 项目名称

2、spiders编写(以爬取163北京新闻为例)

此例中用到了scrapy的Itemloader机制,itemloader中有三个比较重要的方法,有add_xpath(),add_value(),add_css(),这三个方法中,都有两个参数第一个为item的名,第二个为值或者是提取规则

用法如下例。

  1. 1scrapy 新建项目
  2.  
  3. scrapy startproject 项目名称
  4.  
  5. 2spiders编写(以爬取163北京新闻为例)
  6.  
  7. import json
  8. import time
  9. import scrapy
  10. from scrapy.http import Request
  11. from aticleSpider.items import ArticleItem
  12. from aticleSpider.until.common import get_md5
  13. from aticleSpider.items import ArticleItemLoader
  14. # from scrapy.loader import ItemLoader
  15.  
  16. class ArticleSpider(scrapy.Spider):
  17. #spider名字,scrapy会读取这个name
  18. name = 'bj163news'
  19. #可允许爬取的域名
  20. allowed_domains = ['163.com']
  21. #url入口
  22. start_urls = ["http://bendi.news.163.com/beijing/special/04388GGG/bjxinxiliu.js?callback=data_callback&_="]
  23. num = 1
  24. times = time.time()
  25. add_time = str(times).replace('.','')[0:13]
  26.  
  27. def parse(self, response):
  28. """
  29. 1、获取文章列表中的文章的url并进行具体字段的解析
  30. 2、获取到下页的URL进行下载
  31. :param response:
  32. :return:
  33. """
  34. #解析列表页的所有文章的url
  35. response_str = str(response.body.decode("gbk", "ignore")).replace('data_callback(','').replace(')','')
  36. # print(response_str)
  37. js = json.loads(response_str)
  38. for line in js:
  39. keys = []
  40. title = line['title']
  41. commenturl= line['commenturl']
  42. docurl = line['docurl']
  43. newstype = line['newstype']
  44. title_img = line['imgurl']
  45. for keywords in line['keywords']:
  46. keys.append(keywords['keyname'])
  47. key_words = ','.join(keys)
  48. # print(docurl,'docurl')
  49. metas = {'title':title,'commenturl':commenturl,'newstype':newstype,'title_img':title_img,'key_words':key_words}
  50. yield Request(url=docurl,meta=metas,callback=self.parse_detail)
  51.  
  52. #循环获取所有页面数据的方法
  53. self.num = self.num +1
  54. if self.num==10:
  55. str_num = str(self.num)
  56. else :
  57. str_num = ''+str(self.num)
  58.  
  59. next_url = "http://bendi.news.163.com/beijing/special/04388GGG/bjxinxiliu_"+str_num+".js?callback=data_callback&_="+self.add_time
  60. #
  61. yield Request(url=next_url, callback=self.parse)
  62. if url:
  63. url_page = url
  64.  
  65. #文章内容页数据爬取 item loader 模式
  66. def parse_detail(self,response):
  67. # item =ArticleItem()
  68. main_data = response.meta
  69. # docurl = response.url
  70. # # project_doc_url = get_md5(docurl)
  71. # # try:
  72. # news_editor = response.xpath('//span[@class="ep-editor"]/text()').extract_first("").replace('责任编辑:','')
  73. # news_source = response.xpath('//div[@class="ep-source cDGray"]/span/text()').extract_first("").replace('本文来源:','')
  74. # # except:
  75. source_title = response.xpath('//div[@id="endText"]/p[@class="otitle"]/text()').extract_first(" ").replace('(原标题:','').replace(')','').strip()
  76. # news_time = response.xpath('//div[@class="post_time_source"]//text()').extract_first("").replace('来源:','').strip()
  77. # content_org = response.xpath('//div[@id="endText"]').extract_first("")
  78. news_conts =response.xpath('//div[@id="endText"]/p')
  79. news_cont =[]
  80. for one_p in news_conts:
  81. img = one_p.xpath('.//img')
  82. # print(img)
  83. if img != []:
  84. img_url = one_p.xpath('.//@src').extract_first("")
  85. news_cont.append({'content':img_url,'type':'pic'})
  86. else:
  87. try:
  88. text = one_p.xpath('.//text()').extract_first("")
  89. if text.find('(原标题:')>0 or text =='':
  90. continue
  91. news_cont.append({'content':text,'type':'text'}).strip()
  92. except:
  93. pass
  94.      #注释部分为不用itemloader的提取方法
  95. # item['content_org'] =''
  96. # item['project_doc_url'] = project_doc_url
  97. # item['title'] = main_data.get('title','') #get方法取值,并传默认值
  98. # item['source_title'] = source_title
  99. # item['commenturl'] = main_data.get('commenturl','')
  100. # item['newstype'] = main_data.get('newstype','')
  101. # item['docurl'] = docurl
  102. # item['title_img'] = [main_data.get('title_img','')]
  103. # item['key_words'] = main_data.get('key','')
  104. # item['news_editor'] = news_editor
  105. # item['news_source'] = news_source
  106. # item['news_time'] = news_time
  107. # item['news_cont'] = news_cont
  108. # yield item
  109.  
  110. item_loader = ArticleItemLoader(item=ArticleItem(),response=response)
  111. item_loader.add_xpath('news_editor','//span[@class="ep-editor"]/text()')
  112. item_loader.add_value('title',main_data.get('title',''))
  113. item_loader.add_value('project_doc_url',get_md5(response.url))
  114. item_loader.add_value('commenturl',main_data.get('commenturl',''))
  115. item_loader.add_value('newstype',main_data.get('newstype',''))
  116. item_loader.add_value('docurl',response.url)
  117. item_loader.add_value('source_title',source_title)
  118. item_loader.add_value('title_img',[main_data.get('title_img','')])
  119. item_loader.add_value('key_words',main_data.get('key_words',''))
  120. item_loader.add_xpath('news_editor','//span[@class="ep-editor"]/text()')
  121. item_loader.add_xpath('news_source','//div[@class="ep-source cDGray"]/span/text()')
  122. item_loader.add_xpath('content_org','//div[@id="endText"]')
  123. item_loader.add_value('news_cont',news_cont)
  124. item_loader.add_xpath('news_time','//div[@class="post_time_source"]//text()')
  125.  
  126. article_item = item_loader.load_item()
  127. yield article_item

3、使用item loader的item设计

  1. # -*- coding: utf-8 -*-
  2.  
  3. # Define here the models for your scraped items
  4. #
  5. # See documentation in:
  6. # http://doc.scrapy.org/en/latest/topics/items.html
  7.  
  8. import scrapy
  9. from scrapy.loader import ItemLoader
  10. from scrapy.loader.processors import TakeFirst, MapCompose
  11.  
  12. class ArticleSpiderItem(scrapy.Item):
  13. # define the fields for your item here like:
  14. # name = scrapy.Field()
  15. pass
  16.  
  17. #自定义article loader 设置默认输出值为list的第一个
  18. class ArticleItemLoader(ItemLoader):
  19. # pass
  20. default_output_processor = TakeFirst()
  21.  
  22. #item loader的返回原本值,不做任何改变
  23. def return_value(value):
  24. return value
  25.  
  26. #163时间格式化
  27. def return_time(value):
  28. return value.replace('来源:','').strip()
  29.  
  30. #163格式化获取作者
  31. def get_editor(value):
  32. # if value != '':
  33. return value.replace('责任编辑:','')
  34.  
  35. #163格式化获取本文来源
  36. def get_source(value):
  37. # if value != '':
  38. return value.replace('本文来源:','')
  39.  
  40. #163item
  41. class ArticleItem(scrapy.Item):
  42.  
  43. """
  44. item= scrapy.Field() Field() 有两个参数,即输入/输出处理器 一个为
  45. input_processor 输入处理器在数据被接受到时执行
  46. output_processor 输出处理器在ItemLoader.load_item()时再执行输出处理器,返回最终结果
  47. 输入处理器在数据被接受到时执行,当数据收集完后调用ItemLoader.load_item()时再执行输出处理器,返回最终结果。
  48. """
  49.  
  50. #文章标题
  51. source_title = scrapy.Field()
  52.  
  53. title = scrapy.Field()
  54. #文章URL
  55. docurl = scrapy.Field()
  56. #文章md5 URL
  57. project_doc_url = scrapy.Field()
  58. #大标题图片
  59. title_img = scrapy.Field(
  60. output_processor = MapCompose(return_value)
  61. )
  62. #图片存储路径
  63. img_path = scrapy.Field()
  64. #关键字
  65. key_words = scrapy.Field()
  66. #新闻类型 article
  67. newstype = scrapy.Field()
  68. #评论url
  69. commenturl = scrapy.Field()
  70. #文章作者
  71. news_editor = scrapy.Field(
  72. input_processor = MapCompose(get_editor)
  73. )
  74. #分段内容,图片名或者是内容
  75. news_cont = scrapy.Field(
  76. output_processor = MapCompose(return_value)
  77. )
  78. #文章内容源码
  79. content_org = scrapy.Field()
  80. #图片url
  81. # news_pic_url = scrapy.Field()
  82. #发表时间
  83. news_time = scrapy.Field(
  84. input_processor = MapCompose(return_time)
  85. )
  86. #文章来源
  87. news_source = scrapy.Field(
  88. input_processor = MapCompose(get_source)
  89. )
  90. down_img = scrapy.Field()

在Field定义中声明输入/输出处理器

优先级:

  1. 在Item Loader中定义的field_infield_out
  2. Filed元数据(input_processoroutput_processor关键字)
  3. Item Loader中的默认的

Tips:一般来讲,将输入处理器定义在Item Loader的定义中field_in,然后将输出处理器定义在Field元数据中

内置的处理器

  1. Identity 啥也不做
  2. TakeFirst 返回第一个非空值,通常用作输出处理器
  3. Join 将结果连起来,默认使用空格’ ‘
  4. Compose 将函数链接起来形成管道流,产生最后的输出
  5. MapCompose 跟上面的Compose类似,区别在于内部结果在函数中的传递方式.它的输入值是可迭代的,首先将第一个函数依次作用于所有值,产生新的可迭代输入,作为第二个函数的输入,最后生成的结果连起来返回最终值,一般用在输入处理器中。
  6. SelectJmes 使用json路径来查询值并返回结果

4、pipleines设计

pipelines是用来处理item的,此例中用图片下载、json格式存储文件、数据存入数据库。数据库具体sql用*代替。

  1. # -*- coding: utf-8 -*-
  2.  
  3. # Define your item pipelines here
  4. #
  5. # Don't forget to add your pipeline to the ITEM_PIPELINES setting
  6. # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
  7. import codecs
  8. # import hashlib
  9. import json
  10. # import random
  11. # from scrapy.utils.python import to_bytes
  12.  
  13. import pymysql
  14. # import time
  15. from scrapy.pipelines.images import ImagesPipeline
  16. from scrapy.exporters import JsonItemExporter
  17. from scrapy.http import Request
  18.  
  19. from aticleSpider.until.common import get_md5
  20.  
  21. #默认方法
  22. class ArticleSpiderPipeline(object):
  23. def process_item(self, item, spider):
  24. return item
  25.  
  26. #调用scrapy提供的json export导出json文件
  27. class JsonExporterPipeline(object):
  28. #调用scrapy提供的json export导出json文件
  29. def __init__(self):
  30. self.file = open('articleexport.json', 'wb')
  31. self.exporter = JsonItemExporter(self.file, encoding="utf-8", ensure_ascii=False)
  32. self.exporter.start_exporting()
  33.  
  34. def close_spider(self, spider):
  35. self.exporter.finish_exporting()
  36. self.file.close()
  37.  
  38. def process_item(self, item, spider):
  39. self.exporter.export_item(item)
  40. return item
  41.  
  42. #北京163新闻数据入库操作
  43. class Bj163MySqlPipeline(object):
  44. def __init__(self,db_parms):
  45.  
  46. self.conn = pymysql.connect(**db_parms)
  47. self.cursor = self.conn.cursor()
  48.  
  49. @classmethod
  50. def from_settings(cls,settings):
  51. db_parms = dict(
  52. host = settings['MYSQL_HOST'],
  53. user = settings['MYSQL_USER'],
  54. password = settings['MYSQL_PASSWORD'],
  55. database = settings['MYSQL_DBNAME'],
  56. charset='utf8'
  57. )
  58. # conn = pymysql.connect(**db_parms)
  59. return cls(db_parms)
  60.  
  61. def process_item(self,item,spider):
  62. select_sql_find = """
  63. select id from toon_news_163 WHERE pageurl = %s;
  64. """
  65. self.cursor.execute(select_sql_find,(item['docurl']))
  66. odis = self.cursor.fetchall()
  67. if odis == ():
  68. insert_sql = """
  69. insert into toon_news_163(*)
  70. VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s);
  71. """
  72. try:
  73. source_title = item['source_title']
  74. except:
  75. source_title = item['title']
  76. # print(item['news_time'],item['docurl'],item['news_editor'],source_title,item['key_words'],item['news_source'],
  77. # item['title'],item['title_img'],item['content_org'],item['img_path'],item['docurl'])
  78. self.cursor.execute(insert_sql,('163网易北京',item['news_time'],item['docurl'],item['news_editor'],source_title,item['key_words'],item['news_source'],
  79. item['title'],item['title_img'],item['content_org'],item['img_path'],item['docurl']))
  80. self.conn.commit()
  81. select_sql = """
  82. select max(id) FROM toon_news_163;
  83. """
  84. self.cursor.execute(select_sql)
  85. oidss = self.cursor.fetchall()
  86. max_id = oidss[0][0]
  87. # print(max_id)
  88. content = item['news_cont']
  89. for i in range(0,len(content)):
  90. if content[i]['type'] == 'pic':
  91. pic_url = content[i]['content']
  92. else:
  93. pic_url = ''
  94. insert_con_sql = """
  95. insert into toon_news_content_163(*)
  96. VALUES( %s,%s,%s,%s,%s,%s);
  97. """
  98. # print(str(max_id),content[i]['content'],content[i]['type'],str(i),0,pic_url,item['docurl'])
  99. self.cursor.execute(insert_con_sql,(str(max_id),content[i]['content'],content[i]['type'],str(i+1),0,item['docurl']))
  100. self.conn.commit()
  101. # return item
  102.  
  103. #json格式数据存储
  104. class JsonWithEncodingPipeline(object):
  105. #自定义json文件的导出
  106. def __init__(self):
  107. self.file = codecs.open('article.json', 'w', encoding="utf-8")
  108. def process_item(self, item, spider):
  109. lines = json.dumps(dict(item), ensure_ascii=False) + "\n"
  110. self.file.write(lines)
  111. return item
  112. def spider_closed(self, spider):
  113. self.file.close()
  114.  
  115. #文章标题页图片下载
  116. class ArticleImagePipeline(ImagesPipeline):
  117. #图片下载
  118. def file_path(self, request, response=None, info=None):
  119. ## start of deprecation warning block (can be removed in the future)
  120. def _warn():
  121. from scrapy.exceptions import ScrapyDeprecationWarning
  122. import warnings
  123. warnings.warn('ImagesPipeline.image_key(url) and file_key(url) methods are deprecated, '
  124. 'please use file_path(request, response=None, info=None) instead',
  125. category=ScrapyDeprecationWarning, stacklevel=1)
  126.  
  127. # check if called from image_key or file_key with url as first argument
  128. if not isinstance(request, Request):
  129. _warn()
  130. url = request
  131. else:
  132. url = request.url
  133.  
  134. # detect if file_key() or image_key() methods have been overridden
  135. if not hasattr(self.file_key, '_base'):
  136. _warn()
  137. return self.file_key(url)
  138. elif not hasattr(self.image_key, '_base'):
  139. _warn()
  140. return self.image_key(url)
  141. ## end of deprecation warning block
  142.  
  143. image_guid = get_md5(url) # change to request.url after deprecation
  144. return '%s.jpg' % (image_guid)
  145.  
  146. def item_completed(self, results, item, info):
  147. # if "title_img" in item:
  148. if "title_img" in item:
  149. img_path =''
  150. for ok,value in results:
  151. img_path = value['path']
  152. item['img_path'] = img_path
  153. # pass
  154. return item

5、setting设置

其中重要部分均已做注释,ITEM_PIPELINES参数为运行优先级,数值越小越优先

  1. # -*- coding: utf-8 -*-
  2.  
  3. # Scrapy settings for aticleSpider project
  4. #
  5. # For simplicity, this file contains only settings considered important or
  6. # commonly used. You can find more settings consulting the documentation:
  7. #
  8. # http://doc.scrapy.org/en/latest/topics/settings.html
  9. # http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
  10. # http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
  11. import os
  12.  
  13. BOT_NAME = 'aticleSpider'
  14.  
  15. SPIDER_MODULES = ['aticleSpider.spiders']
  16. NEWSPIDER_MODULE = 'aticleSpider.spiders'
  17.  
  18. # Crawl responsibly by identifying yourself (and your website) on the user-agent
  19. #USER_AGENT = 'aticleSpider (+http://www.yourdomain.com)'
  20.  
  21. # Obey robots.txt rules
  22. ROBOTSTXT_OBEY = False
  23.  
  24. # Configure maximum concurrent requests performed by Scrapy (default: 16)
  25. #CONCURRENT_REQUESTS = 32
  26.  
  27. # Configure a delay for requests for the same website (default: 0)
  28. # See http://scrapy.readthedocs.org/en/latest/topics/settings.html#download-delay
  29. # See also autothrottle settings and docs
  30. #DOWNLOAD_DELAY = 3
  31. # The download delay setting will honor only one of:
  32. #CONCURRENT_REQUESTS_PER_DOMAIN = 16
  33. #CONCURRENT_REQUESTS_PER_IP = 16
  34.  
  35. # Disable cookies (enabled by default)
  36. #COOKIES_ENABLED = False
  37.  
  38. # Disable Telnet Console (enabled by default)
  39. #TELNETCONSOLE_ENABLED = False
  40.  
  41. # Override the default request headers:
  42. #DEFAULT_REQUEST_HEADERS = {
  43. # 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  44. # 'Accept-Language': 'en',
  45. #}
  46.  
  47. # Enable or disable spider middlewares
  48. # See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
  49. #SPIDER_MIDDLEWARES = {
  50. # 'aticleSpider.middlewares.AticlespiderSpiderMiddleware': 543,
  51. #}
  52.  
  53. # Enable or disable downloader middlewares
  54. # See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
  55. #DOWNLOADER_MIDDLEWARES = {
  56. # 'aticleSpider.middlewares.MyCustomDownloaderMiddleware': 543,
  57. #}
  58.  
  59. # Enable or disable extensions
  60. # See http://scrapy.readthedocs.org/en/latest/topics/extensions.html
  61. #EXTENSIONS = {
  62. # 'scrapy.extensions.telnet.TelnetConsole': None,
  63. #}
  64.  
  65. # Configure item pipelines
  66. # See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html
  67. ITEM_PIPELINES = {
  68. # 'aticleSpider.pipelines.ArticleSpiderPipeline': 100,
  69. 'aticleSpider.pipelines.Bj163MySqlPipeline': 3,
  70. 'aticleSpider.pipelines.ArticleImagePipeline':1,
  71.  
  72. }
  73.  
  74. IMAGES_URLS_FIELD ='title_img' #图片URL的item ,其值类型为list
  75. project_dir = os.path.abspath(os.path.dirname(__file__))
  76. IMAGES_STORE = os.path.join(project_dir, '163_news') #图片存储位置
  77.  
  78. MYSQL_HOST = '' #数据库host
  79. MYSQL_USER = '' #数据库user
  80. MYSQL_DBNAME = '' #数据库database
  81. MYSQL_PASSWORD = '' #数据库密码
  82.  
  83. # Enable and configure the AutoThrottle extension (disabled by default)
  84. # See http://doc.scrapy.org/en/latest/topics/autothrottle.html
  85. #AUTOTHROTTLE_ENABLED = True
  86. # The initial download delay
  87. #AUTOTHROTTLE_START_DELAY = 5
  88. # The maximum download delay to be set in case of high latencies
  89. #AUTOTHROTTLE_MAX_DELAY = 60
  90. # The average number of requests Scrapy should be sending in parallel to
  91. # each remote server
  92. #AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
  93. # Enable showing throttling stats for every response received:
  94. #AUTOTHROTTLE_DEBUG = False
  95.  
  96. # Enable and configure HTTP caching (disabled by default)
  97. # See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
  98. #HTTPCACHE_ENABLED = True
  99. #HTTPCACHE_EXPIRATION_SECS = 0
  100. #HTTPCACHE_DIR = 'httpcache'
  101. #HTTPCACHE_IGNORE_HTTP_CODES = []
  102. #HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'

6、运行scrapy项目

  1. scrapy crawl 项目名称

Python scrapy爬虫学习笔记01的更多相关文章

  1. python网络爬虫学习笔记

    python网络爬虫学习笔记 By 钟桓 9月 4 2014 更新日期:9月 4 2014 文章文件夹 1. 介绍: 2. 从简单语句中開始: 3. 传送数据给server 4. HTTP头-描写叙述 ...

  2. python网络爬虫学习笔记(二)BeautifulSoup库

    Beautiful Soup库也称为beautiful4库.bs4库,它可用于解析HTML/XML,并将所有文件.字符串转换为'utf-8'编码.HTML/XML文档是与“标签树一一对应的.具体地说, ...

  3. python网络爬虫学习笔记(一)Request库

    一.Requests库的基本说明 引入Rquests库的代码如下 import requests 库中支持REQUEST, GET, HEAD, POST, PUT, PATCH, DELETE共7个 ...

  4. python Scrapy 从零开始学习笔记(一)

    在之前我做了一个系列的关于 python 爬虫的文章,传送门:https://www.cnblogs.com/weijiutao/p/10735455.html,并写了几个爬取相关网站并提取有效信息的 ...

  5. python Scrapy 从零开始学习笔记(二)

    在之前的文章中我们简单了解了一下Scrapy 框架和安装及目录的介绍,本章我们将根据 scrapy 框架实现博客园首页博客的爬取及数据处理. 我们先在自定义的目录中通过命令行来构建一个 scrapy ...

  6. Scrapy爬虫学习笔记 - 爬虫基础知识

    一.正则表达式 二.深度和广度优先                                三.爬虫去重策略

  7. Scrapy爬虫学习笔记 - windows \ linux下搭建开发环境2

    四.虚拟环境的安装和配置 virtualenv可以搭建虚拟且独立的python运行环境, 使得单个项目的运行环境与其它项目独立起来. virtualenv本质上是个python包 虚拟环境可以将开发环 ...

  8. Scrapy爬虫学习笔记 - windows \ linux下搭建开发环境1

    一.pycharm的安装和简单使用                                   二.mysql和navicat的安装和使用    三.windows和linux下安装pytho ...

  9. Requests:Python HTTP Module学习笔记(一)(转)

    Requests:Python HTTP Module学习笔记(一) 在学习用python写爬虫的时候用到了Requests这个Http网络库,这个库简单好用并且功能强大,完全可以代替python的标 ...

随机推荐

  1. CF 545C

    题意: 砍树, 树会向左或者向右倒,数不能倒重叠, 问最多可以砍多少树 思路: 贪心 + Dp吧, 树要尽可能网左倒,这样对后面的树影响较小, 才是最优状态 #include<iostream& ...

  2. reportNG定制化之失败截图及日志

    先从github上拉下 reportNg的源代码 reportng  拉下源码后我们使用IDEA进行导入 1.reportng.properties 增加部分类表项 这里我们直接在末尾添加 log=L ...

  3. 使用第三方组件(django-redis)创建连接池

    settings里面: ##redis配置CACHES={ 'default':{ 'BACKEND':'django_redis.cache.RedisCache', 'LOCATION':'red ...

  4. swift 学习- 10 -- 类和结构体

    // '类和结构体' 是人们构建代码所使用的一种通用且灵活的构造体, 我们可以使用完全相同的语法规则来为 '类和结构体' 定义属性 (变量 和 常量) 和添加方法, 从而扩展 类和结构体 的功能 // ...

  5. 访问 Confluence 6 的计划任务配置

    希望访问 Confluence 计划任务配置界面: 进入  > 基本配置(General Configuration) > 计划任务(Scheduled Jobs) 所有的计划任务将会按照 ...

  6. 2。创建第一个angular应用,已经开发前的一些配置

    现在我们开始新建一个angular5的脚手架  . 到想要建项目的目录下.比如我的 在  D:\JsProjects 进入cmd或者powershell cd 进入该文件夹下 然后开始新建,ng ne ...

  7. 【python】threadpool的内存占用问题

    先说结论: 在使用多线程时,不要使用threadpool,应该使用threading, 尤其是数据量大的情况.因为threadpool会导致严重的内存占用问题! 对比threading和threadp ...

  8. 网络编程—udp

    一.ip地址 1. 什么是地址 地址就是用来标记地点的 2. ip地址的作用 ip地址:用来在网络中标记一台电脑,比如192.168.1.1:在本地局域网上是唯一的. 3. ip地址的分类 每一个IP ...

  9. Unity3D料槽设备旋转(一)

    1.使用C#创建控制游戏对象的的脚本语言, 第一步: 在project师徒中create 一个C#脚本,将其按照自己的设备名称进行命名,这里我将其简单的命名成zhuaquanzhou.cs 使用编辑器 ...

  10. sqlmap实例文档

    sqlmap 手册参数整理文档 1.--data sqlmap -u "http://www.target.com/vuln.php" --data="id=1" ...