juan 6 år sedan
förälder
incheckning
bd6ce20270

BIN
hgg070_spider/__pycache__/settings.cpython-37.pyc


+ 7 - 7
hgg070_spider/pipelines/lanqiu.py

@@ -26,20 +26,20 @@ class ZuqiuPipeline(object):
         else:
             is_rollball=1
 
-        obj={"uuid":uuid,"league_id":item['id'],"league_name":league_name}
+        league_key = ["name_chinese", "kind", "match_mode", "if_stop", "last_time", "lg_id", "source", "uuid"]
+        league_value = [league_name, "1", "1", "0", item['datetime'], item['id'], "hgg070", uuid]
+        #赛事
+        childer = dict(zip(league_key, league_value))
+        #联赛
+        obj = {"game_code": "lq", "title": "league", "source": "hgg070","data":[childer]}
+        # obj={"uuid":uuid,"league_id":item['id'],"league_name":league_name}
         res=Helper.async_post(LEAGUE_URL,obj)
         if res:
-            print('提交联赛成功888888888888888888888888888*******************')
             if res.get('status')==1:
                 logging.warning("联赛提交成功,{}".format(res))
                 #提交赛事
-                match_identity = Helper.genearte_uuid(item['team_h'] + item['team_c'] + item['datetime'])
-                childer={"uuid":uuid,"match_identity":match_identity,"team_h":item["team_h"],"team_c":item["team_c"],
-                         "is_today":is_today,"is_morningplate": is_morningplate, "is_rollball": is_rollball
-                }
                 lres=Helper.async_post(MATCH_URL,childer)
                 if lres.get('status')==1:
-                    print("提交赛事成功666666666666666666666666666666666666666666666")
                     logging.warning("联赛提交成功,{}".format(res))
                 else:
                     logging.warning("联赛提交失败,{}".format(res))

+ 3 - 3
hgg070_spider/settings.py

@@ -96,11 +96,11 @@ M_DB = 'kaiyou'
 M_PASSWORD = 'kaiyou'
 # M_PASSWORD = '123456'
 
-LEAGUE_URL = 'http://admin.5gogo.com:19093/setLeague'  #联赛
+LEAGUE_URL = 'http://admin.5gogo.com/setLeague'  #联赛
 # LEAGUE_URL = 'http://stadmin.bocai108.com/setLeague'
-MATCH_URL = 'http://admin.5gogo.com:19093/setMatch'  #赛事
+MATCH_URL = 'http://admin.5gogo.com/setMatch'  #赛事
 # MATCH_URL = 'http://stadmin.bocai108.com/setMatch'
-ODDS_URL = 'http://admin.5gogo.com:19093/setOdds'  #赔率
+ODDS_URL = 'http://admin.5gogo.com/setOdds'  #赔率
 # ODDS_URL = 'http://stadmin.bocai108.com/setOdds'
 TOKEN_URL = "http://admin.5gogo.com/getToken"  #Token
 MATCH_RESULT = "http://stadmin.bocai108.com:19093/setMatchResult"

+ 1 - 1
hgg070_spider/utils/LocalToken.py

@@ -1 +1 @@
-token = {'token': 'mVUm5Y15717377705daed0aad4869', 'username': 'python', 'password': 'python888', 'token_url': 'http://admin.5gogo.com/getToken'}
+token = {'token': 'JlUo1415650051585d481566c10c9', 'username': 'python', 'password': 'python888', 'token_url': 'http://admin.5gogo.com/getToken'}