Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.09 KB

README.md

File metadata and controls

25 lines (16 loc) · 1.09 KB

Web Scraping on Twitter

This code shows how you can download easily tweets from several accounts on Twitter without using the API. However, you should be able to retrieve more tweets from a Twitter account using the API.

Installing

Source : https://selenium.dev/selenium/docs/api/py/#installing

  • You need to install selenium
pip install -U selenium
  • You need to install a special driver

Selenium requires a driver to interface with the chosen browser. Firefox, for example, requires geckodriver, which needs to be installed before the below examples can be run. Make sure it’s in your PATH, e. g., place it in /usr/bin or /usr/local/bin.

Failure to observe this step will give you an error selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.

How to use the code ?

You need to change the variable ACCOUNT_NAMES according to your needs. The code is provided with the RATP-SNCF Twitter account names.

Credits

https://stackoverflow.com/questions/48850974/selenium-scroll-to-end-of-page-indynamically-loading-webpage/48851166