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.11.15

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.11.15
File Size Uploaded Provenance Actions
pinchana_twitter-26.11.15.tar.gz 12.8 kB With provenance Details for pinchana_twitter-26.11.15.tar.gz

Built distribution (wheel)

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

Total release size: 27.0 kB

Release files / pinchana_twitter-26.11.15.tar.gz

Download URL pinchana_twitter-26.11.15.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a9284eb21030ea27e55995962385adfe5372eab0f12ed7945548bfde429e9828
BLAKE2b-256 checksum
How to use checksums
78f70a479b048bd789bc0ceb7fc1f49c6264148281fcbe8301b6b16ef25a7e6d
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 log

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

Download URL pinchana_twitter-26.11.15-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36bba5c240111c62145d5c32b0646f90e540ec278c4a556530bb9fc8543f4958
BLAKE2b-256 checksum
How to use checksums
4f1fccb1018a3ed8464c54c08b8506567dae7317a3bc164f95d5d151747b26d1
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 log

Security for pinchana-twitter 26.11.15

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.11.15.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 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.

Release history Release notifications | RSS feed

This release

26.11.15 This release

2 release files Full provenance

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