telepase-scraper

Downloads Telepase factura PDFs and pasada CSVs from saved HTML tables using Playwright and fetch.

Updated Jan 31, 2023
One-click install
npx skills add https://github.com/Briian3306/Transporte --skill telepase-scraper-briian3306
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: telepase-scraper
Source: https://github.com/Briian3306/Transporte/tree/main/scripts/.agents/skills/telepase-scraper
Command: npx skills add https://github.com/Briian3306/Transporte --skill telepase-scraper-briian3306

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, cheerio, and includes references (resource) components.

What problem does it solve? Manually downloading Telepase invoices (factura PDFs) and toll passage records (pasada CSVs) from telepase.com.ar is repetitive and error-prone, especially when some URLs require authenticated sessions. This Skill automates parsing the saved admin HTML table and batch-downloading all files for offline use. ## Core Features & Use Cases - Offline HTML parsing: Extracts periodo, numero, monto, concesionario, and download URLs from saved Telepase admin HTML via parse-facturas.mjs. - Two-pass downloads: Fetches public operator URLs with plain fetch first, then uses Playwright with storageState authentication for session-gated AUSA URLs. - Professional scraping hygiene: Idempotent file writes, retry with backoff, jitter delays, payload validation via magic bytes (%PDF, CSV headers), and gitignored credentials. - Use Case: An operator needs all monthly facturas and pasadas for multiple concesionarios. Run the pipeline to parse the saved HTML, download public files, log in once to refresh auth.json, and backfill gated downloads into per-concesionario folders. ## Quick Start Ask the agent to run the Telepase pipeline by parsing scripts/html/facturas and downloading all factura PDFs and pasada CSVs into scripts/downloads.

Frequently Asked Questions about telepase-scraper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I download Telepase facturas and pasadas in bulk?▼

Run parse-facturas.mjs to extract rows from the saved HTML, then run download-batch.mjs --no-auth for public URLs and login.mjs followed by download-batch.mjs for session-gated AUSA files. Output lands in scripts/downloads per concesionario.

How do I handle Telepase URLs that require login?▼

Run login.mjs to authenticate at telepase.com.ar/login and save a Playwright storageState to auth.json. The download script then uses context.request.get with that state to fetch gated URLs like AUSA facturas.

Can I retry only the failed Telepase downloads?▼

Yes, run download-batch.mjs --tryfailed to retry only unique URLs recorded in errors.csv. You can also use --limit and --diverse to pilot a small subset across concesionarios first.

Does this scraper integrate with the Angular ibarra-app?▼

No, it is explicitly standalone under scripts/ and must not be imported into ibarra-app, call Supabase, or modify the Peajes UI. It produces files for offline use such as manual wizard input.

Why does the scraper reject some downloaded files?▼

It validates payloads by checking magic bytes, accepting only %PDF content or CSV headers like FECHA, and rejecting HTML login or dashboard bodies. This prevents saving error pages as if they were real facturas or pasadas.