|
@@ -36,20 +36,25 @@ def api_root():
|
|
|
def webhook_get_promoter():
|
|
|
rep = json.loads(request.data)
|
|
|
promoterId = rep["promoterId"]
|
|
|
- if rep["mediaId"] == 2 or rep["mediaId"] is None:
|
|
|
+ # media_id = rep["mediaId"]
|
|
|
+ media_id = 2
|
|
|
+
|
|
|
+ if media_id == 2 or media_id is None:
|
|
|
cookie = cookie_update.get_cookie_handler()[0]
|
|
|
phone_num = cookie_update.get_cookie_handler()[1]
|
|
|
roll = ReturnPromoterInfoSpider().PromoterInfoSpiderHandler(promoterId, cookie)
|
|
|
|
|
|
if json.loads(roll).__contains__("result"):
|
|
|
if json.loads(roll)["result"] == 100110000:
|
|
|
- SendFeiShuMsg.send_cookie_robot_msg("cookie 永久失效 轻更新cookie 唯一电话为{phone_num}".format(phone_num=phone_num))
|
|
|
+ SendFeiShuMsg.send_cookie_robot_msg(
|
|
|
+ "cookie 永久失效 轻更新cookie 唯一电话为{phone_num}".format(phone_num=phone_num))
|
|
|
cookie_update.update_cookie_handler(phone_num)
|
|
|
retry_cookie = cookie_update.get_cookie_handler()[0]
|
|
|
rollback = ReturnPromoterInfoSpider().PromoterInfoSpiderHandler(promoterId, retry_cookie)
|
|
|
p1 = Process(target=PromoterInfoSpider().PromoterInfoSpiderHandler, args=(promoterId, retry_cookie))
|
|
|
p2 = Process(target=PromoterFansInfo().PromoterFansInfoHandler, args=(promoterId, retry_cookie))
|
|
|
- p3 = Process(target=PromoterLiveInfoSpider().PromoterLiveInfoSpiderHander, args=(promoterId, retry_cookie))
|
|
|
+ p3 = Process(target=PromoterLiveInfoSpider().PromoterLiveInfoSpiderHander,
|
|
|
+ args=(promoterId, retry_cookie))
|
|
|
p4 = Process(target=PromoterVideoAnalysisInfo().PromoterVideoAnalysisInfoHandler,
|
|
|
args=(promoterId, retry_cookie))
|
|
|
p5 = Process(target=PromoterVideoAnalysisTrend().PromoterVideoAnalysisTrendHandler,
|
|
@@ -70,7 +75,8 @@ def webhook_get_promoter():
|
|
|
rolls = ReturnPromoterInfoSpider().PromoterInfoSpiderHandler(promoterId, retry_cookie)
|
|
|
p1 = Process(target=PromoterInfoSpider().PromoterInfoSpiderHandler, args=(promoterId, retry_cookie))
|
|
|
p2 = Process(target=PromoterFansInfo().PromoterFansInfoHandler, args=(promoterId, retry_cookie))
|
|
|
- p3 = Process(target=PromoterLiveInfoSpider().PromoterLiveInfoSpiderHander, args=(promoterId, retry_cookie))
|
|
|
+ p3 = Process(target=PromoterLiveInfoSpider().PromoterLiveInfoSpiderHander,
|
|
|
+ args=(promoterId, retry_cookie))
|
|
|
p4 = Process(target=PromoterVideoAnalysisInfo().PromoterVideoAnalysisInfoHandler,
|
|
|
args=(promoterId, retry_cookie))
|
|
|
p5 = Process(target=PromoterVideoAnalysisTrend().PromoterVideoAnalysisTrendHandler,
|
|
@@ -87,7 +93,8 @@ def webhook_get_promoter():
|
|
|
p2 = Process(target=PromoterFansInfo().PromoterFansInfoHandler, args=(promoterId, cookie))
|
|
|
p3 = Process(target=PromoterLiveInfoSpider().PromoterLiveInfoSpiderHander, args=(promoterId, cookie))
|
|
|
p4 = Process(target=PromoterVideoAnalysisInfo().PromoterVideoAnalysisInfoHandler, args=(promoterId, cookie))
|
|
|
- p5 = Process(target=PromoterVideoAnalysisTrend().PromoterVideoAnalysisTrendHandler, args=(promoterId, cookie))
|
|
|
+ p5 = Process(target=PromoterVideoAnalysisTrend().PromoterVideoAnalysisTrendHandler,
|
|
|
+ args=(promoterId, cookie))
|
|
|
p1.start()
|
|
|
p2.start()
|
|
|
p3.start()
|