A small Rust CLI that regenerates the data CSVs kept in this repository.
Currently supported source: weleda — the Weleda Arzneimittel-Verzeichnis
(https://medical.weleda.ch/de/arzneimittel/verzeichnis), which backs
weleda_arzneimittel.csv. That file is consumed
by oddb2xml's chapter-70 / SL recovery
(lib/oddb2xml/weleda_sl.rb).
cd weleda_scraper
cargo build --releaseThe directory is behind a login, so the scraper asks for the session cookie on stdin. The cookie is used only for this run's HTTP requests and is never written to disk.
# from the repository root (so the default --out path resolves to ./weleda_arzneimittel.csv):
./weleda_scraper/target/release/scraper --update weleda
# Paste the medical.weleda.ch session cookie (e.g. PHPSESSID=...) when prompted.Log in at https://medical.weleda.ch in your browser, then copy the
PHPSESSID cookie value (DevTools → Application/Storage → Cookies). You can
paste either PHPSESSID=<value> or just the bare <value>.
| flag | default | meaning |
|---|---|---|
--update <SOURCE> |
— | data source; currently only weleda |
--out <PATH> |
auto (weleda_arzneimittel.csv, in . or ..) |
output CSV path |
--cookie <COOKIE> |
prompt | session cookie, to avoid the stdin prompt |
--base <URL> |
https://medical.weleda.ch |
site base URL |
--lang <de|fr> |
de |
language path segment |
- Walks the paginated listing (
?page=N&per-page=50) collecting, per product:id(from…/details/drug/{id}),name, Arzneiform, Grösse, Kategorie (→abgabekategorie), Art.Nr. (artikelnummer) and availability (the signalaria-label, used asstatus). Cross-reference rows ("X → siehe Y", which carry no Art.Nr. and reuse the target's id) are skipped. - Fetches each product's detail page (
…/details/drug/{id}) forpharmacode,ean,zulassungsnummer,csl. A pure pointer entry (no pharma data) instead records itsverweistarget. - Replaces
weleda_arzneimittel.csvwith exactly the products currently listed (delisted products are dropped). The on-disk format is preserved byte-for-byte: same column order, UTF-8, CRLF line endings, quote-only-when- necessary, sorted by numericid. The site's–"no value" placeholder is written as an empty field.
The run prints a diff summary (added / removed / updated / unchanged) to stderr before writing.
id,name,darreichung,status,verweis,artikelnummer,pharmacode,ean,abgabekategorie,zulassungsnummer,csl