|
@@ -44,7 +44,13 @@ def webhook_get_promoter():
|
|
|
if media_id == '2' or media_id is None:
|
|
|
if r.zcard('kuaishou_shop_click_token') == 0:
|
|
|
cookie_update.get_click_coookie_to_redis()
|
|
|
-
|
|
|
+ random_member = r.zrange('kuaishou_shop_click_token', 0, -1, withscores=True)
|
|
|
+ random_item = random.choice(random_member)
|
|
|
+ cookie = random_item[0].decode('utf-8')
|
|
|
+ phone_num = int(random_item[1])
|
|
|
+ roll = ReturnPromoterInfoSpider().PromoterInfoSpiderHandler(promoterId, cookie)
|
|
|
+ print(roll,'-----111-----{promoterId}'.format(promoterId=promoterId))
|
|
|
+ return roll
|
|
|
|
|
|
|
|
|
else:
|
|
@@ -121,6 +127,7 @@ def webhook_get_promoter():
|
|
|
r.zrem('kuaishou_shop_click_token', random_item[0])
|
|
|
print(roll, '--------444---roll1---------{promoterId}'.format(promoterId=promoterId))
|
|
|
return roll
|
|
|
+
|
|
|
else:
|
|
|
rep = json.loads(request.data)
|
|
|
promoterId = rep["promoterId"]
|