Commit Graph

5 Commits

Author SHA1 Message Date
2a4252aa1d Simplify coordinate lookup: remove proxy support
Free proxies from proxifly/free-proxy-list don't support HTTPS well
and are unreliable. Stick with cache + concurrent approach.

- Remove proxy fetching and handling code
- Default workers reduced to 2 to be more conservative
- Rely on persistent cache for efficiency

Usage: Run in small batches to avoid Nominatim rate limits.
Once cached, results are instant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 09:04:07 +08:00
1d08779941 Add concurrent geocoding with ThreadPoolExecutor
- Use --workers to set concurrent thread count (default 3)
- Speed up coordinate lookup by ~3x with 3 workers
- Maintain Nominatim rate limiting per thread

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 08:52:36 +08:00
be7f919675 Add coordinate cache to avoid redundant API calls
- Cache stored in ~/.cache/cpc_stations_coords.json
- Cache key based on station name + city + district + address
- Shows cache hit/miss statistics on stderr
- Subsequent runs are instant for cached stations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 08:24:20 +08:00
ee396828ab Add coordinate lookup via Nominatim OSM API
- Add --coords flag to enable geocoding
- Add --delay option for rate limiting (default 1.0s)
- Try multiple query formats: full address, station+city, district
- Include latitude/longitude in JSON and CSV output

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 08:18:26 +08:00
36b12dbe81 Initial commit: Add CPC direct-operated stations scraper
Script for scraping Taiwan CPC (中油) official direct-operated gas station information from vipmbr.cpc.com.tw

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 08:15:17 +08:00