Browse Source

中国招标与采购网爬虫维护

lizongze 1 year ago
parent
commit
ddeed1d7b5
2 changed files with 4 additions and 1 deletions
  1. 3 0
      zbytb/config/conf.yaml
  2. 1 1
      zbytb/crawler/spiders/ListPageSpider.py

+ 3 - 0
zbytb/config/conf.yaml

@@ -11,6 +11,9 @@ redis:
   host: 172.17.162.28
   port: !!int 7361
   pwd: "k5ZJR5KV4q7DRZ92DQ"
+#  host: 127.0.0.1
+#  port: !!int 6379
+#  pwd: ""
   db: !!int 1
 
 

+ 1 - 1
zbytb/crawler/spiders/ListPageSpider.py

@@ -60,7 +60,7 @@ class CrawlListPageSpider:
             if title:
                 title = title[0]
                 competehref = node.xpath('./div[@class="title"]/a/@href')[0]
-                publish_time = "2023-" + str(node.xpath('./div[@class="title"]/span[1]/text()')[0])
+                publish_time = "2024-" + str(node.xpath('./div[@class="title"]/span[1]/text()')[0])
             else:
                 title = node.xpath('./div[@class="xiangmu"]/a/text()')[0]
                 competehref = node.xpath('./div[@class="xiangmu"]/a/@href')[0]