newbie. how can i solve this looping problem?

asdasdqeqe at gmail.com asdasdqeqe at gmail.com
Tue Feb 9 05:49:27 EST 2016


http://pastebin.com/Khrm3gHq

for the code above, everytime it scraps off tweets and loads the next 13 tweets, it'll re-run through the previous scrapped tweets before recording the new ones. I'm up to 700 over tweets and it'll keep re-running the previous 700 before adding the final 13 to the list. I'm looking at a few thousand tweets so it'll slow down as the tweets get more and more. Any idea how i can stop it from going over the previous tweets and just add the last few?

how can i get this line 
elem = WebDriverWait(driver,10).until(EC.visibility_of_element_located((By.CSS_SELECTOR,lastTweetCss))) 
to move on further in the code if it doesn't find anything after waiting for 10 sec?


More information about the Python-list mailing list