Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tychxn committed Feb 3, 2020
1 parent eeb9eb1 commit eca3f93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jd_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ def _validate_cookies(self): # True -- cookies is valid, False -- cookies is in
}
try:
resp = self.sess.get(url=url, params=payload, allow_redirects=False)
return resp.status_code == requests.codes.OK
if resp.status_code == requests.codes.OK:
return True
except Exception as e:
logger.error(e)

self.sess = requests.session()
return False

Expand Down

0 comments on commit eca3f93

Please sign in to comment.