Amidamaru Posted January 19, 2015 Report Share Posted January 19, 2015 Hello, Un nene a descoperit cum sa traga followers de pe conturi de twitter, Collecting Twitter Followers with 25 lines of Python, si a scris un script in Python2 dupa cum urmeaza: "import tweepyimport time#insert your Twitter keys hereconsumer_key ='bla bla'consumer_secret='bla bla'access_token='bla bla'access_secret='bla bla'auth = tweepy.auth.OAuthHandler(consumer_key, consumer_secret)auth.set_access_token(access_token, access_secret)api = tweepy.API(auth)list= open('/go-to-war/Desktop/twitter_list.txt','w')if(api.verify_credentials): print 'We sucessfully logged in'user = tweepy.Cursor(api.followers, screen_name="<targeted_twitter_account>").items()while True: try: u = next(user) list.write(u.screen_name +' n') except: time.sleep(15*60) print 'We got a timeout ... Sleeping for 15 minutes' u = next(user) list.write(u.screen_name +' n')list.close()"Intrebarea mea este, l-a incercat cineva si i-a mers? Eu l-am pornit, sta o perioda pana expira cele 15 minute alocate unui interval valid de interogare si pe urma iese cu urmatoarea eroare: "Traceback (most recent call last): File "twitter_followers_harvesting.py", line 28, in <module> u = next(user) File "/usr/lib/python2.7/dist-packages/tweepy/cursor.py", line 110, in next self.current_page = self.page_iterator.next() File "/usr/lib/python2.7/dist-packages/tweepy/cursor.py", line 60, in next cursor=self.next_cursor, *self.args, **self.kargs File "/usr/lib/python2.7/dist-packages/tweepy/binder.py", line 179, in _call return method.execute() File "/usr/lib/python2.7/dist-packages/tweepy/binder.py", line 162, in execute raise TweepError(error_msg, resp)tweepy.error.TweepError: [{'message': 'Sorry, that page does not exist', 'code': 34}]"Merci fain. Quote Link to comment Share on other sites More sharing options...
bcman Posted January 19, 2015 Report Share Posted January 19, 2015 Sigur ai creat aplica?ia pe Twitter ?i introdus datele de autentificare dupa partea cu: #insert your Twitter keys here ? Quote Link to comment Share on other sites More sharing options...
Amidamaru Posted January 19, 2015 Author Report Share Posted January 19, 2015 Absolut. "bla bla" a fost inlocuit cu token-urile corespunzatoare generate de twitter pentru contul meu. Quote Link to comment Share on other sites More sharing options...
hades Posted January 19, 2015 Report Share Posted January 19, 2015 Uite quickfix-ul:try: user = tweepy.Cursor(api.followers, screen_name="alecsafk").items()except tweepy.error.TweepError: passIn loc de alecsafk pui twitter username-ului de la care vrei followeri. Quote Link to comment Share on other sites More sharing options...
Amidamaru Posted January 20, 2015 Author Report Share Posted January 20, 2015 (edited) Hello, Multumesc. Il incerc acum. Aseara eram mult prea rupt...asadar aceasta: user = tweepy.Cursor(api.followers, screen_name="<targeted_twitter_account>").items()va devenii: try: user = tweepy.Cursor(api.followers, screen_name="<targeted_twitter_account>").items()except tweepy.error.TweepError: pass Edited January 20, 2015 by Amidamaru Quote Link to comment Share on other sites More sharing options...