Pinchana Twitter/X
This FastAPI module extracts public posts from X/Twitter and supported fixup domains. It uses X GraphQL with guest-token and CSRF handling, and can use the FxTwitter API as a metadata fallback. Confirmed rate limits and repeated DNS/connectivity failures trigger a bounded retry with Gluetun recovery; exhausted transient failures remain typed 503 responses.
Result behavior
- Images and videos are downloaded into
/media/twitter/{post_id}/...within the shared cache. - Animated GIF-style posts are returned as video assets with
looping: truein the gateway's API v1 response. - A client that requires an actual GIF must perform the conversion explicitly. Pinchana Web exposes this as the Convert Twitter GIFs setting.
API
POST /scrapeaccepts{"url":"https://x.com/account/status/POST_ID"}.GET /media/twitter/{post_id}/{filename}serves cached media inside the trusted gateway network.GET /healthreports service and VPN readiness.
External clients should use the gateway's authenticated POST /v1/scrape and /media/... routes.
Development
uv sync --frozen
uv run uvicorn pinchana_twitter.main:app --host 0.0.0.0 --port 8089 --reload
# Run from the repository root.
docker build --file scrapers/pinchana-twitter/Dockerfile --tag pinchana-twitter:local .
Metadata
Release files for pinchana-twitter 26.11.17
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 |
|---|---|---|---|---|
| pinchana_twitter-26.11.17.tar.gz | 12.8 kB | With provenance | Details for pinchana_twitter-26.11.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pinchana_twitter-26.11.17-py3-none-any.whl | Python 3 | none | any | Details for pinchana_twitter-26.11.17-py3-none-any.whl |
Total release size: 27.1 kB
Release files / pinchana_twitter-26.11.17.tar.gz
| Download URL | pinchana_twitter-26.11.17.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b853322d8982a798563723edb29c61bb9819defa8cd2ed4df3223e07711998b
|
|
BLAKE2b-256 checksum How to use checksums |
8eaaa75d3c8de5c3a631e456b39a974668a560e10cc5b3cb04fcf91f4ee4dbaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / pinchana_twitter-26.11.17-py3-none-any.whl
| Download URL | pinchana_twitter-26.11.17-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c256298fb85eb28fdc5e4de68f7fdd302f843d665cc6dd785ee01c28cfcb06e
|
|
BLAKE2b-256 checksum How to use checksums |
8078405c39a10a4bc7ec5d1b0663ddcbfdafba0fdb2a6cfca2a205214b52cdd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for pinchana-twitter 26.11.17
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pinchana_twitter-26.11.17.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA 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.