Python's package to scrape Twitter with selenium.
Project description
twitterer
Python's package to scrape Twitter with selenium. Get, like, retweet tweets with automatically.
Usage
- Install python package
pip install twitterer
- Create
.env
file at project root.
TWITTER_USERNAME = ReplaceThisToYourOwns
TWITTER_PASSWORD = ReplaceThisToYourOwns
Get tweets and save it
from twitterer import Twitterer
twitterer = Twitterer()
twitterer.authenticate()
tweets = list(
twitterer.get_tweets(
url="https://twitter.com/search?q=funny%20filter:videos",
max_tweets=20,
)
)
twitterer.save_to_file(tweets)
Like and retweet tweets
.get_tweets()
method returns generator.
This is real-time processing, so when you use .like()
or .retweet()
method on tweets, i must be handled by a generator.
from twitterer import Twitterer
twitterer = Twitterer()
twitterer.authenticate()
for tweet in twitterer.get_tweets(
url="https://twitter.com/home",
max_tweets=20,
):
tweet.like()
tweet.retweet()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
twitterer-0.0.1.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for twitterer-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85fafccf97cb991c1c88bf645741be1bb2de37bdbe08e61ad49152d173f978c0 |
|
MD5 | dd578993caa07d5d5c238e5394b0dac0 |
|
BLAKE2b-256 | dc48488d2c1991dced6176e6fce11c5afe3cf35b1cdcf10270e64cc6d8b1c74b |