Преглед изворни кода

华农车型查询问题处理

Administrator пре 7 месеци
родитељ
комит
db65c5e559
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      spiders/huanong/baojia/hn_bfjs.py

+ 2 - 1
spiders/huanong/baojia/hn_bfjs.py

@@ -450,8 +450,9 @@ class hn_calculation(object):
 
         data = json.dumps(data)
         response = requests.post(url, headers=headers, params=params, data=data)
+        print(response.text)
         carModel_list=response.json().get('carModel')
-        if '未查到车辆合格证信息'  in response.text or carModel_list==[]:
+        if '未查到车辆合格证信息'  in response.text or carModel_list==[] or '车辆信息预填异常' in response.text:
             #车型送所
             url = "https://channel-cx.chinahuanong.com.cn/singlePlatform/kscd.do"
             params = {