Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当retry get list达到上限时,程序会直接退出。 #39

Open
pooneyy opened this issue Dec 31, 2024 · 1 comment
Open

当retry get list达到上限时,程序会直接退出。 #39

pooneyy opened this issue Dec 31, 2024 · 1 comment

Comments

@pooneyy
Copy link
Contributor

pooneyy commented Dec 31, 2024

image

如图,当retry get list达到上限时,程序会退出。

if len(all_title) != len(all_username):
if self.RetryList > 0:
log.debug(f"{self.username} get list number error , retry get list , remaining retry times: %d" % self.RetryList)
self.RetryList -= 1
sleep(2)
self.get_today_list()
return
else:
os._exit(0)

建议替换成

if len(all_title) != len(all_username): 
    if self.RetryList > 0: 
        log.debug(f"{self.username} get list number error , retry get list , remaining retry times: %d" % self.RetryList) 
        self.RetryList -= 1 
        sleep(2) 
        self.get_today_list() 
        return 
    else: 
        self.set_invalid()
        self.s.close()

以免影响到其它账号。

@0honus0
Copy link
Owner

0honus0 commented Dec 31, 2024

可以优化下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants