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
.envfile 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://x.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(headless=False)
twitterer.authenticate()
for tweet in twitterer.get_tweets(
url="https://x.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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file twitterer-0.0.2.tar.gz.
File metadata
- Download URL: twitterer-0.0.2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6a14dc765d868ef70e2a02d0be294248b65a688524f933c32e9c29665f4fd00
|
|
| MD5 |
7257bcb8a651c295fff1dcd39f98d1e6
|
|
| BLAKE2b-256 |
99d68e138bb187baccc02506c3524e9acc872ef43d8b54e407f2cb8b29dd3686
|
File details
Details for the file twitterer-0.0.2-py3-none-any.whl.
File metadata
- Download URL: twitterer-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ee3f750fb337872d6b454e6e9fd7b931b2c34f1efb81c076e0c2fba650b415d
|
|
| MD5 |
b42d916a4daee1d856de8e28548c259c
|
|
| BLAKE2b-256 |
98c390d788621ca490b0f4c23bc017787a908a9261f88ef97ffa872e71545187
|