Skip to main content

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: true in 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 /scrape accepts {"url":"https://x.com/account/status/POST_ID"}.
  • GET /media/twitter/{post_id}/{filename} serves cached media inside the trusted gateway network.
  • GET /health reports 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.12.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pinchana-twitter 26.12.1
File Size Uploaded Provenance Actions
pinchana_twitter-26.12.1.tar.gz 12.8 kB With provenance Details for pinchana_twitter-26.12.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pinchana-twitter 26.12.1
File Interpreter ABI Platform Actions
pinchana_twitter-26.12.1-py3-none-any.whl Python 3 none any Details for pinchana_twitter-26.12.1-py3-none-any.whl

Total release size: 27.0 kB

Release files / pinchana_twitter-26.12.1.tar.gz

Download URL pinchana_twitter-26.12.1.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0d7f4add67c1197d24f731558fe59285564a84c1ecfd02e42b26a160ff783efa
BLAKE2b-256 checksum
How to use checksums
389836f766b09e7ae97aa0084b90d11afee6aa8f0502fac1d9769a3dfc9938e1
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 Dec 1, 2026.

Transparency log

Release files / pinchana_twitter-26.12.1-py3-none-any.whl

Download URL pinchana_twitter-26.12.1-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
571e88e637170ed6fea82501b2408c65fde4f27ab6992fe9dd3ba5b8d37357d7
BLAKE2b-256 checksum
How to use checksums
c6c2d0ea458a1087d14e90d9213d04403fa3b0a9fe979204a0e796648ce37e8f
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 Dec 1, 2026.

Transparency log

Security for pinchana-twitter 26.12.1

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.

Select from 2 files

Attestation for pinchana_twitter-26.12.1.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 Dec 1, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page