Sfoglia il codice sorgente

更新 'spiders/yaofangwang/yaofangwang_crawl.py'

olin 3 settimane fa
parent
commit
3c65d47809
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      spiders/yaofangwang/yaofangwang_crawl.py

+ 3 - 1
spiders/yaofangwang/yaofangwang_crawl.py

@@ -58,7 +58,7 @@ class YaofangwangCrawl:
         self.account_id = self.task_dict.get("collect_equipment_account_id", "")
         self.collect_region_id = self.task_dict.get("collect_region_id", "")
         self.collect_round = self.task_dict.get("collect_round", 1)
-        self.report_data = {'task_id':self.task_id,'platform':self.platform,'username':'1','total_pages':1}
+        self.report_data = {'task_id':self.task_id,'platform':self.platform,'username':self.scheduler.username,'total_pages':1}
 
     def _error_report(self,data):
             self.report_data.update(data)
@@ -398,7 +398,9 @@ class YaofangwangCrawl:
 
         drug_list = self._search_result_medicine_ids(self.driver.html)
         id_dict = {}
+        print(drug_list)
         for drug in drug_list:
+            
             spec = drug["spec"]
             href = drug["href"]
             if "x" in self.product_desc: