Skip to content

Commit

Permalink
Update jd_wdz.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Faker authored and Faker committed Nov 10, 2022
1 parent 6fc13f8 commit 17be1fe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion jd_wdz.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def getUserInfo(pin):
else:
print(res['errorMessage'])

def getOpenCardAllStatuesNew(pin):
def getOpenCardAllStatuesNew(pin, again=1):
url = "https://cjhy-isv.isvjcloud.com/microDz/invite/activity/wx/getOpenCardAllStatuesNew"
payload = f"activityId={activityId}&pin={quote_plus(quote_plus(pin))}&isInvited=1"
headers = {
Expand All @@ -322,6 +322,12 @@ def getOpenCardAllStatuesNew(pin):
# refresh_cookies(response)
res = response.json()
if res['result']:
if not res['data']['list']:
print(f"第{again}次重试")
if again <= 3:
time.sleep(2)
again += 1
return getOpenCardAllStatuesNew(pin, again=again)
return res['data']['isCanJoin'], res['data']['reward'], res['data']['list']
else:
print(res['errorMessage'])
Expand Down

0 comments on commit 17be1fe

Please sign in to comment.