Your Name hace 6 años
padre
commit
b509b7525b

+ 10 - 6
hg3535/pipelines.py

@@ -1294,31 +1294,35 @@ class Roll_Zuqiupipeline(object):
         pt = item['pt']
         match_score = "{}:{}".format(score_home,score_guest)
         corner_ball = item['corner_ball']
-        p_code, p_id = get_pcode(corner_ball, 'concede_size')
         # 构建唯一索引
         half_size_guest = item["half_size_guest"]
         half_size_guest_rule = item["half_size_guest_rule"]
         half_size_home = item["half_size_home"]
         half_size_home_rule = item["half_size_home_rule"]
         try:
+            p_code, p_id = get_pcode(corner_ball, 'goal_size')
             size_data = {'league_id': league_id, 'game_id': competition_id, 'utime': utime, 'p_id': p_id, 'p_code': p_code,
                          'source': "hg3535", 'expire_time': expire_time, 'pt': pt,'match_score':match_score,'team_home':team_home,'team_guest':team_guest,'score_home':score_home,'score_guest':score_guest,'number':number,'time_game':time_game,'half_way':half_way}
             # 让球 数据插入数据库
-            zqone_intodbs(data1=half_size_home, data2=size_data, data3="half_size_home", data4=half_size_home_rule,
+            zqone_intodbs(data1=half_size_home, data2=size_data, data3="half_goal_size_home", data4=half_size_home_rule,
                          cursor=self.cursor, redis_db=self.redis_db)
             # 让球 数据插入数据库
-            zqone_intodbs(data1=half_size_guest, data2=size_data, data3="half_size_guest", data4=half_size_guest_rule,
+            zqone_intodbs(data1=half_size_guest, data2=size_data, data3="half_goal_size_guest", data4=half_size_guest_rule,
                          cursor=self.cursor, redis_db=self.redis_db)
             # 全场场大小
             size_guest = item["size_guest"]
             size_guest_rule = item["size_guest_rule"]
             size_home = item["size_home"]
             size_home_rule = item["size_home_rule"]
-            zqone_intodbs(data1=size_guest, data2=size_data, data3="size_guest", data4=size_guest_rule,
+            zqone_intodbs(data1=size_guest, data2=size_data, data3="goal_size_guest", data4=size_guest_rule,
                          cursor=self.cursor, redis_db=self.redis_db)
-            zqone_intodbs(data1=size_home, data2=size_data, data3="size_home", data4=size_home_rule,
+            zqone_intodbs(data1=size_home, data2=size_data, data3="goal_size_home", data4=size_home_rule,
                          cursor=self.cursor, redis_db=self.redis_db)
             # 上半场大小
+            p_code, p_id = get_pcode(corner_ball, 'concede')
+            size_data = {'league_id': league_id, 'game_id': competition_id, 'utime': utime, 'p_id': p_id, 'p_code': p_code,
+                         'source': "hg3535", 'expire_time': expire_time, 'pt': pt,'match_score':match_score,'team_home':team_home,'team_guest':team_guest,'score_home':score_home,'score_guest':score_guest,'number':number,'time_game':time_game,'half_way':half_way}
+            # 让球 数据插入数据库
             half_concede_home_rule = item["half_concede_home_rule"]
             half_concede_home = item["half_concede_home"]
             half_concede_guest_rule = item["half_concede_guest_rule"]
@@ -1456,7 +1460,7 @@ class Roll_Zuqiupipeline(object):
                     # 构建唯一索引
                     zqtwo_intodbs(data1=value, data2=first_last_data, data3=key, data4=first_last_dict[key], cursor=self.cursor, redis_db=self.redis_db)
 
-            p_code, p_id = get_pcode(corner_ball, 'temaball')
+            p_code, p_id = get_pcode(corner_ball, 'tema_ball')
             full_dicts = item['full_data']
             half_dicts = item['half_data']
             full_dict_rules = item['full_data_rule']

+ 11 - 11
hg3535/settings.py

@@ -147,19 +147,19 @@ SCHEDULER_FLUSH_ON_START = False
 # POST_PORT = '5433'
 # POST_PASSWORD = '123456'
 
-#以后解开这个位置的注释
-POST_HOST = '172.17.0.4'
-POST_DATABASE = 'kaiyou'
-POST_USER = 'kaiyou'
-POST_PORT = '5432'
-POST_PASSWORD = 'yjkj8888'
-
-
-# POST_HOST = '192.168.2.200'
+# #以后解开这个位置的注释
+# POST_HOST = '172.17.0.4'
 # POST_DATABASE = 'kaiyou'
 # POST_USER = 'kaiyou'
-# POST_PORT = '10432'
-# POST_PASSWORD = '123456'
+# POST_PORT = '5432'
+# POST_PASSWORD = 'yjkj8888'
+
+
+POST_HOST = '192.168.2.200'
+POST_DATABASE = 'kaiyou'
+POST_USER = 'kaiyou'
+POST_PORT = '10432'
+POST_PASSWORD = '123456'
 
 R_HOST = 'localhost'
 R_POST = '6379'

+ 20 - 20
hg3535/spiders/bangqiu.py

@@ -145,35 +145,35 @@ class BqrangqiuSpider(scrapy.Spider):
                     total_size_dict_rule = {}
                     try:
                         total_sizes = result['o']["ou"]["v"]
-                        total_size_dict_rule['total_number_big'] = total_sizes[1]
-                        total_size_dict_rule['total_number_small'] = total_sizes[3]
+                        total_size_dict_rule['total_size_big'] = total_sizes[1]
+                        total_size_dict_rule['total_size_small'] = total_sizes[3]
                         if pt is 3:
-                            total_size_dict['total_number_big'] = float(total_sizes[5]) - 1
-                            total_size_dict['total_number_small'] = float(total_sizes[7]) - 1
+                            total_size_dict['total_size_big'] = float(total_sizes[5]) - 1
+                            total_size_dict['total_size_small'] = float(total_sizes[7]) - 1
                         else:
-                            total_size_dict['total_number_big'] = total_sizes[5]
-                            total_size_dict['total_number_small'] = total_sizes[7]
+                            total_size_dict['total_size_big'] = total_sizes[5]
+                            total_size_dict['total_size_small'] = total_sizes[7]
                     except:
-                        total_size_dict_rule['total_number_big'] = ""
-                        total_size_dict['total_number_big'] = ""
-                        total_size_dict_rule['total_number_small'] = ""
-                        total_size_dict['total_number_small'] = ""
+                        total_size_dict_rule['total_size_big'] = ""
+                        total_size_dict['total_size_big'] = ""
+                        total_size_dict_rule['total_size_small'] = ""
+                        total_size_dict['total_size_small'] = ""
 # 总得分: 大/小 前5局-----------------------------------------------------------------------------------------------------
                     try:
                         total_sizes = result['o']["ouf5in"]["v"]
-                        total_size_dict_rule['five_total_number_big'] = total_sizes[1]
-                        total_size_dict_rule['five_total_number_small'] = total_sizes[3]
+                        total_size_dict_rule['five_total_size_big'] = total_sizes[1]
+                        total_size_dict_rule['five_total_size_small'] = total_sizes[3]
                         if pt is 3:
-                            total_size_dict['five_total_number_big'] = float(total_sizes[5]) - 1
-                            total_size_dict['five_total_number_small'] = float(total_sizes[7]) - 1
+                            total_size_dict['five_total_size_big'] = float(total_sizes[5]) - 1
+                            total_size_dict['five_total_size_small'] = float(total_sizes[7]) - 1
                         else:
-                            total_size_dict['five_total_number_big'] = total_sizes[5]
-                            total_size_dict['five_total_number_small'] = total_sizes[7]
+                            total_size_dict['five_total_size_big'] = total_sizes[5]
+                            total_size_dict['five_total_size_small'] = total_sizes[7]
                     except:
-                        total_size_dict_rule['five_total_number_big'] = ""
-                        total_size_dict['five_total_number_big'] = ""
-                        total_size_dict_rule['five_total_number_small'] = ""
-                        total_size_dict['five_total_number_small'] = ""
+                        total_size_dict_rule['five_total_size_big'] = ""
+                        total_size_dict['five_total_size_big'] = ""
+                        total_size_dict_rule['five_total_size_small'] = ""
+                        total_size_dict['five_total_size_small'] = ""
 
 # ------------------------------------------------------总得分:单/双-----------------------------------------------------
                     odd_evens_dict = {}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 694 - 678
hg3535/spiders/lanqiu.py


+ 16 - 16
hg3535/spiders/roll_bangqiu.py

@@ -152,27 +152,27 @@ class BqrangqiuSpider(scrapy.Spider):
                     total_size_dict_rule = {}
                     try:
                         total_sizes = result['o']["ou"]["v"]
-                        total_size_dict_rule['total_number_big'] = total_sizes[1]
-                        total_size_dict['total_number_big'] = total_sizes[5]
-                        total_size_dict_rule['total_number_small'] = total_sizes[3]
-                        total_size_dict['total_number_small'] = total_sizes[7]
+                        total_size_dict_rule['total_size_big'] = total_sizes[1]
+                        total_size_dict['total_size_big'] = total_sizes[5]
+                        total_size_dict_rule['total_size_small'] = total_sizes[3]
+                        total_size_dict['total_size_small'] = total_sizes[7]
                     except:
-                        total_size_dict_rule['total_number_big'] = ""
-                        total_size_dict['total_number_big'] = ""
-                        total_size_dict_rule['total_number_small'] = ""
-                        total_size_dict['total_number_small'] = ""
+                        total_size_dict_rule['total_size_big'] = ""
+                        total_size_dict['total_size_big'] = ""
+                        total_size_dict_rule['total_size_small'] = ""
+                        total_size_dict['total_size_small'] = ""
 # 总得分: 大/小 前5局-----------------------------------------------------------------------------------------------------
                     try:
                         total_sizes = result['o']["ouf5in"]["v"]
-                        total_size_dict_rule['five_total_number_big'] = total_sizes[1]
-                        total_size_dict['five_total_number_big'] = total_sizes[5]
-                        total_size_dict_rule['five_total_number_small'] = total_sizes[3]
-                        total_size_dict['five_total_number_small'] = total_sizes[7]
+                        total_size_dict_rule['five_total_size_big'] = total_sizes[1]
+                        total_size_dict['five_total_size_big'] = total_sizes[5]
+                        total_size_dict_rule['five_total_size_small'] = total_sizes[3]
+                        total_size_dict['five_total_size_small'] = total_sizes[7]
                     except:
-                        total_size_dict_rule['five_total_number_big'] = ""
-                        total_size_dict['five_total_number_big'] = ""
-                        total_size_dict_rule['five_total_number_small'] = ""
-                        total_size_dict['five_total_number_small'] = ""
+                        total_size_dict_rule['five_total_size_big'] = ""
+                        total_size_dict['five_total_size_big'] = ""
+                        total_size_dict_rule['five_total_size_small'] = ""
+                        total_size_dict['five_total_size_small'] = ""
 
 # ------------------------------------------------------总得分:单/双-----------------------------------------------------
                     odd_evens_dict = {}

+ 4 - 4
hg3535/spiders/roll_zuqiu.py

@@ -489,16 +489,16 @@ class ZuqiuSpider(scrapy.Spider):
                         half_dict['half_guest_tema_ball_big'] = half_guest_size_big
 
                         half_guest_size_small_rule = half_guest_data[3]
-                        half_dict_rule['half_guest_tema_ball_smalll'] = half_guest_size_small_rule
+                        half_dict_rule['half_guest_tema_ball_small'] = half_guest_size_small_rule
 
                         half_guest_size_small = half_guest_data[7]
-                        half_dict['half_guest_tema_ball_smalll'] = half_guest_size_small
+                        half_dict['half_guest_tema_ball_small'] = half_guest_size_small
                     except:
                         half_dict_rule['half_guest_tema_ball_big'] = ""
                         half_dict['half_guest_tema_ball_big'] = ""
 
-                        half_dict_rule['half_guest_tema_ball_smalll'] = ""
-                        half_dict['half_guest_tema_ball_smalll'] = ""
+                        half_dict_rule['half_guest_tema_ball_small'] = ""
+                        half_dict['half_guest_tema_ball_small'] = ""
 
             item['league_id'] = league_id
             item['league_name'] = league_name

+ 2 - 2
hg3535/spiders/zuqiu.py

@@ -19,8 +19,8 @@ class ZuqiuSpider(scrapy.Spider):
         "ITEM_PIPELINES":{
             'hg3535.pipelines.Zuqiupipeline': 300,
         },
-        'LOG_LEVEL': 'DEBUG',
-        'LOG_FILE': "../hg3535/log/zuqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day),
+        # 'LOG_LEVEL': 'DEBUG',
+        # 'LOG_FILE': "../hg3535/log/zuqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day),
         # 'RETRY_ENABLED': False,
         # 'COOKIES_ENABLED': False,
         # 'DOWNLOAD_TIMEOUT': 1,

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio