twikit icon indicating copy to clipboard operation
twikit copied to clipboard

Async Exception Handling

Open dany27227 opened this issue 1 year ago • 1 comments

This block used to catch an exception when the account/user was private in the old/synced version. In the new async version it just gets an empty following and keeps going. Any idea of how to fix this?

`

if abs(liveCount - len(follows)) > MIN_DIFFERENCE:
    print(user + ': recaching')
    follows = []
    try:
        followList = await liveUser.get_following(count=liveCount)
    except:
        print(f'Skipped {user}: error getting profile (private / inactive)')
        continue

`

dany27227 avatar Jul 13 '24 18:07 dany27227

For my current use/problem I can just precheck the 'user.protected' attribute to exclude/jump private profiles. Still seems like a bug that was introduced in V2 that should be looked at.

dany27227 avatar Jul 13 '24 22:07 dany27227