Scrape and summarize articles from The Jakarta Post
Project description
Jakarta Post Scraper & Summarizer
A command-line tool that discovers articles published on The Jakarta Post since the last run, scrapes their full text, summarizes them with Claude, and writes JSON files plus a Markdown report.
Install
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/pear25/scraper/main/install.sh | sh
Windows (PowerShell):
irm https://raw.githubusercontent.com/pear25/scraper/main/install.ps1 | iex
The installer downloads uv (a small
standalone tool that handles Python for you), then installs jakpost-scrape
into an isolated environment and puts it on your PATH. No prior Python
install required.
Optional — summarization: install the
claude CLI and
run claude login. The scraper works without it if you pass --no-summary.
Usage
jakpost-scrape # scrape since last run (24h on first run)
jakpost-scrape --dry-run # list what would be scraped
jakpost-scrape --no-summary # scrape only, skip summarization
jakpost-scrape --since 48h # override the window (also accepts ISO dates)
jakpost-scrape --summary-mode digest # per-article | digest | both
jakpost-scrape --console-output article-text # print title + URL + raw body to stdout
jakpost-scrape --limit 5 # cap article count
jakpost-scrape --sections business # restrict sections
jakpost-scrape --upgrade # print the upgrade command
Configuration file locations
The first time you run jakpost-scrape, it writes a default config.yaml
under your OS's standard app-config directory:
| OS | Config | State + data | Reports |
|---|---|---|---|
| macOS | ~/Library/Application Support/jakpost-scraper/config.yaml |
~/Library/Application Support/jakpost-scraper/ |
~/Documents/jakpost-reports/ |
| Linux | ~/.config/jakpost-scraper/config.yaml |
~/.local/share/jakpost-scraper/ |
~/Documents/jakpost-reports/ |
| Windows | %APPDATA%\jakpost-scraper\config.yaml |
%APPDATA%\jakpost-scraper\ |
%USERPROFILE%\Documents\jakpost-reports\ |
You can override any path:
--config PATH,--data-dir DIR,--reports-dir DIR— per-run.JAKPOST_CONFIG,JAKPOST_DATA_DIR,JAKPOST_REPORTS_DIR— environment.- If
config.yamlexists in your current directory, the tool uses it (preserves the "run from a project folder" workflow).
Resolution order: CLI flag > env var > cwd > platform default.
How it works
- Reads
state.jsonfor the last-run timestamp (first run looks back 24h). - Walks The Jakarta Post's Google News sitemaps to find articles in the window.
- Scrapes each article's full text (paywalled articles yield the teaser).
- Summarizes via the Claude Agent SDK (
per-article,digest, orboth). - Writes
<data-dir>/articles/<run-id>.json,<data-dir>/summaries/<run-id>.json, and<reports-dir>/<run-id>.md, then advancesstate.json.
--console-output article-text keeps those file outputs and also writes
each scraped article to stdout with its title, URL, and raw body text.
See docs/superpowers/specs/2026-05-20-jakpost-scraper-design.md for the
full design.
Upgrading
jakpost-scrape --upgrade # prints the upgrade command
uv tool upgrade jakpost-scraper
Or re-run the installer one-liner — it's idempotent.
Uninstalling
uv tool uninstall jakpost-scraper
This removes the command. Config, state, and reports stay where they are — delete those directories manually if you want a clean wipe.
Authenticated scraping (premium articles)
By default the scraper runs as a guest, so premium articles return only a teaser. To capture full premium article bodies, log in with your own Jakarta Post account.
Set credentials in environment variables:
export JAKPOST_EMAIL=you@example.com
export JAKPOST_PASSWORD=your-password
Then enable in config.yaml (auth_enabled: true) or pass --auth on a
single run. The scraper logs in over HTTP on first use and caches the
session, reusing it on later runs. When the session expires, the run aborts
with a message — re-run with --reauth to log in again.
Authentication is opt-in: with auth_enabled: false (the default) the
scraper behaves as a guest.
Develop from source
git clone https://github.com/pear25/scraper.git jakpost-scraper
cd jakpost-scraper
python -m pip install -e ".[dev]"
python -m pytest
jakpost-scrape --help
When run from a directory containing config.yaml, the tool reads that
local file and writes state/data/reports under that directory — matching
the development workflow.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jakpost_scraper-0.1.0.tar.gz.
File metadata
- Download URL: jakpost_scraper-0.1.0.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d642d358a084a28ed97fcf22d6406385f4c31a190dee86440df9a9789068455
|
|
| MD5 |
ef7aea0ce7e4777bd3f3868ec6ffc2cb
|
|
| BLAKE2b-256 |
06370e2619e478cd03f910e44930e6f2b852c7b2a5fa2c179fb7c78045fc10ef
|
File details
Details for the file jakpost_scraper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jakpost_scraper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0daf44f2bb7147e172e3d08e55a8a742a13f1dc6666b062d9f2077cb2700e95d
|
|
| MD5 |
26b2f09071a0029a73dff0c753cae8e9
|
|
| BLAKE2b-256 |
3cf82ed7a254d356a039409d664d9f60481671a7b2ae71a424a8c13092f42373
|