Explorar o código

修改正文清洗规则、修改es配置

lizongze %!s(int64=3) %!d(string=hai) anos
pai
achega
891cd020ca
Modificáronse 2 ficheiros con 4 adicións e 3 borrados
  1. 2 2
      ybw/config/conf.yaml
  2. 2 1
      ybw/detail_spider.py

+ 2 - 2
ybw/config/conf.yaml

@@ -15,10 +15,10 @@ redis:
 
 
 es:
-  host: 172.17.4.184
+  host: 172.17.145.178
 #  host: 127.0.0.1
 #  host: 192.168.3.206
-  port: !!int 19800
+  port: !!int 9800
   db: biddingall # es库别名
 
 

+ 2 - 1
ybw/detail_spider.py

@@ -184,7 +184,8 @@ class DetailSpider:
         item["contenthtml"] = html
         special = {
             '若附件无法下载,你可以尝试使用360极速浏览器进行下载!': '',
-            'DD000E;|EE000F;|FF000E;': '',
+            # 'DD000E;|EE000F;|FF000E;|DD000F;|EE000E;|AA000E;': '',
+            '[(]?[)]?[A-Z]{2}000[A-Z]{1};[(]?[\d{1,4}]*[;]?[)]?[;]?':''
         }
         item["detail"] = cleaner(html, special)
         item["comeintime"] = int2long(int(time.time()))