Giter VIP home page Giter VIP logo

tweepy-issues's People

Watchers

 avatar

tweepy-issues's Issues

Max retries exceeded with url: /1.1/followers/list.json?cursor=1516792635609098963&id=

I'm using Python and Tweepy to fetch the Twitter followers from an account using a cursor. But I'm facing this below issue frequently, Could some one help me on how to handle this issue and Why this issue occurs.

Error
TTPSConnectionPool(host='api.twitter.com', port=443): Max retries exceeded with url: /1.1/followers/list.json?cursor=1516792635609098963&id=%40Careers (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',)))

Code

def process_follower(follower,i):
Mycode

consumer_key = ''
consumer_secret = ''
''
access_token = ''**************************''
access_token_secret = ''*************''

import sys
import os
import tweepy
import time

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)

get_user_to_query = 'Accountname'

f = open('Account_followers_Location04012017.json', 'w', encoding='utf-8', errors="surrogateescape")

try:
for follower in tweepy.Cursor(api.followers, id = get_user_to_query).items():
#print(follower.name)
process_follower(follower, i)
i=i+1
if i%100 == 0:
time.sleep(600)
print("sleeping")

except Exception as e:

print(e) 

f.close()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.