Your Name vor 6 Jahren
Ursprung
Commit
8f91a5bc3b
1 geänderte Dateien mit 40 neuen und 40 gelöschten Zeilen
  1. 40 40
      hg3535/spiders/zuqiu.py

+ 40 - 40
hg3535/spiders/zuqiu.py

@@ -391,78 +391,78 @@ class ZuqiuSpider(scrapy.Spider):
                         try:
                             home_data = data['o']['ou']['v']
                             # 球队进球 大条件
-                            full_dict_rule['home_size_big'] = home_data[1]
+                            full_dict_rule['score_home_big'] = home_data[1]
                             # 球队进球小条件
-                            full_dict_rule['home_size_small'] = home_data[3]
+                            full_dict_rule['score_home_small'] = home_data[3]
 
                             if pt is 3:
                                 # 球队进球大赔率
-                                full_dict['home_size_big'] = round(float(home_data[5]) - 1, 2)
+                                full_dict['score_home_big'] = round(float(home_data[5]) - 1, 2)
                                 # 球队进球小赔率
-                                full_dict['home_size_small'] = round(float(home_data[7]) - 1, 2)
+                                full_dict['score_home_small'] = round(float(home_data[7]) - 1, 2)
                             else:
                                 # 球队进球大赔率
-                                full_dict['home_size_big'] = home_data[5]
+                                full_dict['score_home_big'] = home_data[5]
                                 # 球队进球小赔率
-                                full_dict['home_size_small'] = home_data[7]
+                                full_dict['score_home_small'] = home_data[7]
                         except:
-                            full_dict['home_size_small'] = ""
-                            full_dict_rule['home_size_small'] = ""
-                            full_dict['home_size_big'] = ""
-                            full_dict_rule['home_size_big'] = ""
+                            full_dict['score_home_small'] = ""
+                            full_dict_rule['score_home_small'] = ""
+                            full_dict['score_home_big'] = ""
+                            full_dict_rule['score_home_big'] = ""
                         try:
                             half_home_data = data['o']['ou1st']['v']
-                            half_dict_rule['half_home_size_big'] = half_home_data[1]
-                            half_dict_rule['half_home_size_small'] = half_home_data[3]
+                            half_dict_rule['half_score_home_big'] = half_home_data[1]
+                            half_dict_rule['half_score_home_small'] = half_home_data[3]
 
                             if pt is 3:
-                                half_dict['half_home_size_big'] = round(float(half_home_data[5]) - 1, 2)
-                                half_dict['half_home_size_small'] = round(float(half_home_data[7]) - 1, 2)
+                                half_dict['half_score_home_big'] = round(float(half_home_data[5]) - 1, 2)
+                                half_dict['half_score_home_small'] = round(float(half_home_data[7]) - 1, 2)
                             else:
                                 half_home_size_big = half_home_data[5]
-                                half_dict['half_home_size_big'] = half_home_size_big
+                                half_dict['half_score_home_big'] = half_home_size_big
                                 half_home_size_small = half_home_data[7]
-                                half_dict['half_home_size_small'] = half_home_size_small
+                                half_dict['half_score_home_small'] = half_home_size_small
 
                         except:
-                            half_dict_rule['half_home_size_big'] = ""
-                            half_dict['half_home_size_big'] = ""
-                            half_dict_rule['half_home_size_small'] = ""
-                            half_dict['half_home_size_small'] = ""
+                            half_dict_rule['half_score_home_big'] = ""
+                            half_dict['half_score_home_big'] = ""
+                            half_dict_rule['half_score_home_small'] = ""
+                            half_dict['half_score_home_small'] = ""
 
                     if new_data is 13:
                         try:
                             guest_data = data['o']['ou']['v']
-                            full_dict_rule['guest_size_big'] = guest_data[1]
-                            full_dict_rule['guest_size_small'] = guest_data[3]
+                            full_dict_rule['score_guest_big'] = guest_data[1]
+                            full_dict_rule['score_guest_small'] = guest_data[3]
 
                             if pt is 3:
-                                full_dict['guest_size_big'] = round(float(guest_data[5]) - 1, 2)
-                                full_dict['guest_size_small'] = round(float(guest_data[7]) - 1, 2)
+                                full_dict['score_guest_big'] = round(float(guest_data[5]) - 1, 2)
+                                full_dict['score_guest_small'] = round(float(guest_data[7]) - 1, 2)
                             else:
-                                full_dict['guest_size_big'] = guest_data[5]
-                                full_dict['guest_size_small'] = guest_data[7]
+                                full_dict['score_guest_big'] = guest_data[5]
+                                full_dict['score_guest_small'] = guest_data[7]
                         except:
-                            full_dict_rule['guest_size_big'] = ""
-                            full_dict['guest_size_big'] = ""
-                            full_dict_rule['guest_size_small'] = ""
-                            full_dict['guest_size_small'] = ''
+                            full_dict_rule['score_guest_big'] = ""
+                            full_dict['score_guest_big'] = ""
+                            full_dict_rule['score_guest_small'] = ""
+                            full_dict['score_guest_small'] = ''
                         try:
                             half_guest_data = data['o']['ou1st']['v']
-                            half_dict_rule['half_guest_size_big'] = half_guest_data[1]
-                            half_dict_rule['half_guest_size_small'] = half_guest_data[3]
+                            half_dict_rule['half_score_guest_big'] = half_guest_data[1]
+                            half_dict_rule['half_score_guest_small'] = half_guest_data[3]
                             if pt is 3:
-                                half_dict['half_guest_size_big'] = round(float(half_guest_data[5]) - 1, 2)
-                                half_dict['half_guest_size_small'] = round(float(half_guest_data[7]) - 1, 2)
+                                half_dict['half_score_guest_big'] = round(float(half_guest_data[5]) - 1, 2)
+                                half_dict['half_score_guest_small'] = round(float(half_guest_data[7]) - 1, 2)
                             else:
-                                half_dict['half_guest_size_big'] = half_guest_data[5]
-                                half_dict['half_guest_size_small'] = half_guest_data[7]
+                                half_dict['half_score_guest_big'] = half_guest_data[5]
+                                half_dict['half_score_guest_small'] = half_guest_data[7]
                         except:
-                            half_dict_rule['half_guest_size_big'] = ""
-                            half_dict['half_guest_size_big'] = ""
+                            half_dict_rule['half_score_guest_big'] = ""
+                            half_dict['half_score_guest_big'] = ""
 
-                            half_dict_rule['half_guest_size_small'] = ""
-                            half_dict['half_guest_size_small'] = ""
+                            half_dict_rule['half_score_guest_small'] = ""
+                            half_dict['half_score_guest_small'] = ""
 
                 item['league_id'] = league_id
                 item['league_name'] = league_name