Commit 6844402e authored by vicotor's avatar vicotor

fix bug

parent 9dd701e5
...@@ -184,13 +184,12 @@ func (f *FollowerRateLimit) Follower(userName string, cursor string) ([]*twitter ...@@ -184,13 +184,12 @@ func (f *FollowerRateLimit) Follower(userName string, cursor string) ([]*twitter
select { select {
case account := <-accChan: case account := <-accChan:
accChan <- account accChan <- account
history[account.AccountInfo.Username] = true
if _, exist := history[account.AccountInfo.Username]; exist { if _, exist := history[account.AccountInfo.Username]; exist {
// loop all account, exit. // loop all account, exit.
try = 100 try = 100
break break
} }
history[account.AccountInfo.Username] = true
if users, next, err = account.FetchFollowers(userName, 1000, cursor); err != nil { if users, next, err = account.FetchFollowers(userName, 1000, cursor); err != nil {
slog.Error("FetchFollowers", "failed", err.Error()) slog.Error("FetchFollowers", "failed", err.Error())
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment