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

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.17
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)

Table of built distributions (wheels) for pinchana-twitter 26.11.17
File Interpreter ABI Platform Actions
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 log

Release 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 log

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

Select from 2 files

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