Spaces:
Runtime error
Runtime error
Commit History
-
Fix: fast-fail on hosted URL fetch with clear error message
Instagram blocks all cloud server IPs (HF, CF Workers — returns login wall). URL feature is local Docker only. Hosted builds now immediately return a clear error instead of waiting 30s for yt-dlp to time out. CF Worker script kept in deploy/ for future reference but unused. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>54d09f0 -
Feat: Cloudflare Worker relay for hosted Instagram URL fetch
Instagram blocks all cloud server IPs (HF, Render, etc). The Worker runs on Cloudflare's edge IPs which Instagram cannot block. deploy/cf-worker/worker.js fetches /embed/captioned/ and returns {"contents": html}. Server-side: proxy path now skips yt-dlp entirely (no 15s timeout), uses _parse_embed_caption on the returned HTML. hosted.env.example documents CAPTION_PROXY_URL as the Worker URL. Local builds unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a8b1596 -
Fix: URL fetch works on hosted via Instagram's embed/captioned endpoint
Uses /embed/captioned/ (statically served for website embeds — works from any server IP, no proxy needed) as the primary caption source. The proxy path (CAPTION_PROXY_URL) is kept as an override but is no longer needed or set by default. yt-dlp remains as a local fallback that also captures geotag data. Adds 3 new unit tests for _parse_embed_caption (basic, empty page, creator fallback) bringing pipeline checks to 101. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>495ba69 -
Feat: single Instagram URL extraction via CAPTION_PROXY_URL
Re-adds the URL input on the Extract tab. Caption fetch now routes through a configurable proxy (CAPTION_PROXY_URL) on hosted builds — default allorigins.win requires no account. Local Docker skips the proxy and uses yt-dlp + direct OG scraping instead. pipeline/transcribe.py: fetch_post_metadata gains proxy_url param; _fetch_via_proxy handles allorigins.win JSON response format. web/app.py: _run_url_pipeline + /extract-url + /url-chatbot-prepare restored; reads CAPTION_PROXY_URL from env. deploy/hosted.env.example: CAPTION_PROXY_URL=https://api.allorigins.win/get TODO.md: P0 item for server-side video transcription; URL item updated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>56b50ce
-
HF deploy: container hosted-readiness + client-side geocoding (#8–#11)
Make the app deployable to HF Spaces in hosted mode, with browser-side geocoding (decision B — no server geocoder key/quota). #8 docker-entrypoint.sh: skip the Ollama wait/pull when OLLAMA_ENABLED=false (else it hangs forever on HF, which has no Ollama). Honor PORT. #9 Dockerfile: run as non-root UID 1000 (HF requirement), /app writable, ENTRYPOINT ./docker-entrypoint.sh. Local `docker compose up` unchanged. #10 Client-side geocoding: - web/app.py: CLIENT_GEOCODE = public_bulk_blocked(HOSTED); _run_pipeline skips server geocode and marks client_geocode; new POST /set-coords/{job_id} persists browser-geocoded lat/lng (range-validated); flag exposed to template. - index.html: geocodeClientSide() ports geocode.py (country/city/proximity gates, 3-tier search) and pins ungeocoded rows live from the visitor's IP, saving via /set-coords; banner in the results view. #11 Resilience (within #10): 1.1s throttle, localStorage cache, resumable (persisted coords +…8d29bb2 -
Demarcate the two deployment modes + add guardrails, CLAUDE.md
The app ships in two web shapes over one codebase (local Docker vs hosted free web), differentiated only by env config. Make each mode's contract explicit and guard against a change to one breaking the other. Guardrails: - Extract pure helpers encoding each contract: web.app.resolve_provider() (hosted hides Ollama -> Claude; local honors it) and pipeline.geocode.public_bulk_blocked() (HOSTED=1 + public OSM refused; unset/self-hosted allowed). Behavior unchanged; now unit-testable. - tests/test_deployment_modes.py pins both columns (hosted vs local). - CI: add a fast `guardrails` job (no Ollama) running the deployment-mode + prefilter tests on every push. CI fix: benchmark.yml set working-directory/artifact path to a nonexistent nested `your_instagram_activity/saved` folder (repo root IS that folder), so the existing benchmark job could never run. Fixed both. Docs: - DEPLOY.md — the two options side-by-side + the guardrail that protects them. - deploy/hosted.env.example — hos…c68fdea