radimbig-pinchana-twitter
Unofficial PyPI distribution of the Pinchana Twitter/X scraper, maintained by radimbig for use as both a Pinchana plugin and an importable Python package.
Original project and copyright belong to Pinchana. This fork keeps the original logic and adds packaging metadata plus a small synchronous library wrapper.
Strategy
- Primary: X internal GraphQL (
TweetResultByRestId) using guest token activation + CSRF (ct0) handling. - Resilience: Automatic VPN IP rotation via Gluetun on rate limits (429/403).
- Fallback:
api.fxtwitter.comfor public tweet metadata when GraphQL is blocked. - Media: Download media to local cache and expose via
/media/twitter/{tweet_id}/{file}.
API
POST /scrape— scrape a tweet URLGET /media/twitter/{tweet_id}/{filename}— serve cached mediaGET /health— VPN status
Library Usage
Install the package:
pip install radimbig-pinchana-twitter
Import the package as pinchana_twitter:
from pinchana_twitter import download_x_post_assets
result = download_x_post_assets(
post_url="https://x.com/user/status/1234567890",
temp_directory="./temp_videos",
user_id=42,
request_id="abc123",
)
print(result["text"])
print(result["author_username"])
print(result["files"])
The synchronous wrapper returns:
{
"text": "...",
"author_username": "user",
"files": [{"path": "...", "media_type": "photo"}],
}
Use media_type == "photo" for images and media_type == "video" for videos.
Publishing
The package publishes to PyPI when a v* tag is pushed and the repository has a
PYPI_API_TOKEN secret configured.
Metadata
Release files for radimbig-pinchana-twitter 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| radimbig_pinchana_twitter-1.0.0.tar.gz | 9.7 kB | Without provenance | Details for radimbig_pinchana_twitter-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| radimbig_pinchana_twitter-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for radimbig_pinchana_twitter-1.0.0-py3-none-any.whl |
Total release size: 21.6 kB
Release files / radimbig_pinchana_twitter-1.0.0.tar.gz
| Download URL | radimbig_pinchana_twitter-1.0.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d28f6d4af70a38fbbf6254481a0717038ec3e304613c05abab47a087618316b
|
|
BLAKE2b-256 checksum How to use checksums |
fa6ccef40dd63a22ff997053be2291fac8df152da61939fa74516117d6c05dc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / radimbig_pinchana_twitter-1.0.0-py3-none-any.whl
| Download URL | radimbig_pinchana_twitter-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa22e9ce090d64f2d59ff439dc7c3ff8a0b13eefc5daa3b124ea78110b7ebc57
|
|
BLAKE2b-256 checksum How to use checksums |
6a3e8283a2b7efe37cd57bb5696368400730db2455ecc8e925e967af1de6506b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for radimbig-pinchana-twitter 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.