Open jackrhysider opened 6 years ago
The program still crashes for certain suspended accounts. But I did manage to get past this by just adding those account IDs to the USERS_KEEP_FOLLOWING list. So the script doesn't try to unfollow that user ID anymore.
I am getting the same error, here is what I run:
from TwitterFollowBot import TwitterBot
my_bot = TwitterBot("/root/twitterfollowbot/configbot.txt")
my_bot.sync_follows()
my_bot.auto_unfollow_nonfollowers()
And here is the error:
Choosing time between 10 and 30 - waiting 30 seconds before action
Unfollowed 1071444127
Choosing time between 10 and 30 - waiting 23 seconds before action
Traceback (most recent call last):
File "/root/twitterfollowbot/unfollow.py", line 5, in <module>
my_bot.auto_unfollow_nonfollowers()
File "/usr/local/lib/python2.7/dist-packages/TwitterFollowBot/__init__.py", line 404, in auto_unfollow_nonfollowers
self.TWITTER_CONNECTION.friendships.destroy(user_id=user_id)
File "/usr/local/lib/python2.7/dist-packages/twitter/api.py", line 308, in __call__
return self._handle_response(req, uri, arg_data, _timeout)
File "/usr/local/lib/python2.7/dist-packages/twitter/api.py", line 315, in _handle_response
handle = urllib_request.urlopen(req, **kwargs)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open
context=self._context)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
The account my bot unfollowed isn't restricted or suspended, so I'm not sure whats going on.
Hi! Looking at the last line in your log it’s a different error.
Name resolution errors are normally associated with DNS errors, try clearing your dns cache and try again.
Well thank you, that was the problem! This vps always gives me trouble with DNS, I flushed them and its working again.
I run the following program:
And I get this error:
I've tried to look up that user: https://twitter.com/intent/user?user_id=988034843962421248
But it says account suspended.
Perhaps this script can't unfollow suspended accounts? I can't figure out what username they are. Is there anyway to get the script to not try to unfollow this account using the user id??