A library for automating several social media actions, such as posting, login, notifications etc. for multiple social media and scraping data from these social medias. API free (no official social media APIs used), front-end selinium based solutions only.
Will be uploaded to PyPI soon. Some versions will be uploaded to TestPyPI
USE CASE 1: Fetch profile of a twitter user
- Create twitter engine
from social_media.twitter.base import TwitterEngine
t = TwitterEngine(patience=10) # patience is in seconds
or
from social_media.base import Engine
t = Engine.select('twitter', patience=10)
- Login (optional)
t.login(read_from_env=True) # read from a .env file
or
t.login(username="username", email="[email protected]", contact="123456789", password="password")
"""pass the username, contact, email and password manually.
(at least one of username, email or contact number is needed)
password is required"""
- Get the profile of the person
t.get_profile(username="@dannygonzalez") # I am truly greg (@ is optional, not really needed, also username should be exact)
- Logout (optional)
t.logout()
- Close the browser window
t.close(wait_for_input=False) # if wait_for_input is true then script will wait for the user to enter q to terminate