X-Git-Url: https://jfr.im/git/z_archive/twitter.git/blobdiff_plain/84c699d25345997979af67b97c6cfccd851945ed..e84abb1c6496c585882ffc9637141c800e4cd067:/twitter/follow.py diff --git a/twitter/follow.py b/twitter/follow.py index 7dddbd1..75297cb 100644 --- a/twitter/follow.py +++ b/twitter/follow.py @@ -218,7 +218,7 @@ def main(args=sys.argv[1:]): else: auth = NoAuth() - twitter = Twitter(auth=auth, api_version='1', domain='api.twitter.com') + twitter = Twitter(auth=auth, api_version='1.1', domain='api.twitter.com') if options['api-rate']: rate_limit_status(twitter) @@ -237,9 +237,16 @@ def main(args=sys.argv[1:]): for uid in user_ids: if options['show_id']: - print(str(uid) + "\t" + users[uid].encode("utf-8")) + try: + print(str(uid) + "\t" + users[uid].encode("utf-8")) + except KeyError: + pass + else: - print(users[uid].encode("utf-8")) + try: + print(users[uid].encode("utf-8")) + except KeyError: + pass # print total on stderr to separate from user list on stdout if options['followers']: