CLI to fetch tweets from X using your Chrome session
Project description
hawkx
CLI to fetch tweets from X using your Chrome session. No API key — uses your logged-in Chrome cookies.
Requirement: Be logged into x.com in Chrome.
Disclaimer
This tool automates access to X using your own browser session. You are responsible for complying with X's Terms of Service and acceptable use policies. Use at your own risk. The authors do not endorse or encourage any use that violates X's policies.
Setup
pip install -r requirements.txt
Or from source:
pip install -e .
Usage
hawkx getuser <name> [number] # e.g. hawkx getuser elonmusk 20
hawkx getuser elonmusk 100 -R -I -t # 100 posts, replies, images, text only
hawkx getpost <post_id> [-R] [-I] # -R include replies, -I include image URLs
hawkx getbookmarks [number] [-R] [-I]
hawkx setprofile 'Profile 1' # set Chrome profile (saved to ~/.hawkx/settings.json)
Run hawkx or hawkx help for command list.
Settings
Profile is stored in ~/.hawkx/settings.json:
{"profile": "Profile 1"}
Update with hawkx setprofile 'Profile 1'. Default is "1" (Profile 1).
Output
Default: JSON with id, text, created_at, user, favorites, retweets, replies. Add -I for images array, -R for reply metadata / reply thread. Use -t for text only.
SDK
from twitter.package import get_user_tweets, get_bookmarks, get_post, get_post_simple
entries = get_user_tweets("elonmusk", limit=40)
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 hawkx-0.1.0.tar.gz.
File metadata
- Download URL: hawkx-0.1.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9aa3f23ab2032902cab0499680757d5bc0b53e7aff20b4276a0d3368f5cde66
|
|
| MD5 |
a8845e40f173e29fd80fb058d61250f5
|
|
| BLAKE2b-256 |
d4b4c495beddc0481626caafd6256265f3522f500eee899ca0bc4b59d86d3750
|
File details
Details for the file hawkx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hawkx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d16f48a1eeb0033a12f1f644d542941e811bd8b7d3792eb013dbef45dcda1b3
|
|
| MD5 |
2e49e0fb15a2338b0fe63ed2da4fc22e
|
|
| BLAKE2b-256 |
af60647c5301535b389a4250322feef16d9941d8d5ca4af3458c2e93d4ab1fb7
|