Skip to content

Commit 05255c4

Browse files
RoyXianglittlecodersh
authored andcommitted
retry 'synccheck' if it failed (#417)
1 parent 6f7d63b commit 05255c4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818

1919
> [您的内容]
2020
21-
[document]: https://github.com/soimort/you-get/wiki/FAQ
22-
[issues]: https://github.com/soimort/you-get/issues
21+
[document]: http://itchat.readthedocs.io/zh/latest/
22+
[issues]: https://github.com/littlecodersh/itchat/issues
2323
[itchatmp]: https://github.com/littlecodersh/itchatmp

itchat/components/login.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ def sync_check(self):
293293
'_' : int(time.time() * 1000),}
294294
headers = { 'User-Agent' : config.USER_AGENT }
295295
r = self.s.get(url, params=params, headers=headers, timeout=config.TIMEOUT)
296+
r.raise_for_status()
296297
regx = r'window.synccheck={retcode:"(\d+)",selector:"(\d+)"}'
297298
pm = re.search(regx, r.text)
298299
if pm is None or pm.group(1) != '0':

0 commit comments

Comments
 (0)