# Changelog of Glovo Scraper – Menus, Prices, Promos & Delivery Fees (`badr_xba/glovo-scraper`) Actor

- **URL**: https://apify.com/badr_xba/glovo-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/badr_xba/glovo-scraper.md

## Changelog

### 2026-11-27 (retry rule)

- Owner rule: a refusal by Glovo (403, 429, anti-robot challenge, login page) is never retried — no new session, no new IP — and goes to `FAILED_INPUTS` as BLOCKED, not charged. A technical error (network, timeout, 5xx, proxy) gets at most 2 new tries with the same proxy configuration (was: up to 9 session rotations plus 4 retries). Billing, output and run statuses unchanged.

### 2026-11-09 (review invitation)

- Successful runs that saved at least one result end their status message with one short, optional invitation to leave a Store review or open an issue (never on failed or empty runs); README section "Feedback and reviews". Output and billing unchanged.

### 2026-11-08 (visual kit 1.1.0)

#### Added

- `discountAmount` (products): amount saved per unit (`price` - `promoPrice`) in the row's currency, `null`
  without a discount and on store rows. Shown in the *Overview* view and as "You save" in the report's compare table.
- Error codes: every `FAILED_INPUTS` entry now has a stable `code` (`INVALID_INPUT`, `EMPTY_PAGE`, `BLOCKED`,
  `NOT_FOUND`, `TIMEOUT`, `SERVER_ERROR`, `NETWORK`, `UNREADABLE_PAGE`, `NOTHING_READ`, `ERROR`); `RUN_SUMMARY`
  gains `failedByCode` (count per code). Existing keys are unchanged.
- Visual report on kit 1.1.0: live progress while the run is going (rows so far, progress bar, refresh every
  30 s; at most one write per minute), data-quality panel, warnings and failed inputs grouped by code (closed
  stores skipped, budget reached), at most 3 pictures per row (product photo, then the store's cover and logo).
  The report is also finalised (status FAILED) when the run stops on an unexpected error.

### 2026-11-08

#### Added

- **Visual report** (`REPORT` record, Output tab → *Visual report*): product cards (photo, store and section,
  description, price, usual price, promotion, option groups, store rating, delivery time and fee) or, in store-only
  mode, store cards (initials placeholder — Glovo gives no store picture link —, rating, delivery time, distance,
  fees, badges); compare mode (up to 4); key figures and charts adapted to the row type, search, filters, sorting,
  table view and CSV/JSON export of the filtered rows. Built by the shared `src/visual_kit.py` (v1.0.1) with this
  Actor's `src/report.py`. At most 2,000 rows are kept in memory for it; it is never billed and a report error is
  only logged as a warning.
- Output schema: *Visual report* link; key-value store schema: `REPORT` (text/html).

#### Fixed

- Product photos: products for which Glovo gives only an image key (`imageId` = `dh:menus-glovo/…`, typically
  offers and new items) had `imageUrl: null` (9 of 50 rows of the default demo). The key is now turned into the
  photo Glovo itself shows, through the image service the site declares (`https://glovo.dhmedia.io/image/…`):
  50/50 rows have a photo in the same demo. A link given by Glovo still wins; nothing is invented.
- Store photos: new `storeImageUrl` (cover photo) and `storeLogoUrl` (logo) on store and product rows, from the
  store card / store page already downloaded. The *Magasins* view and the visual report's store cards and table now
  show the photo first (initials only when Glovo gives none).
- `imageUrl`: `//host/…` becomes `https://host/…`; blank, `data:` and other non-http values become `null`.
  Valid links are unchanged.

#### Tests

- `tests/test_report.py`: 13 tests on 15 real product rows of a production run and the real Casablanca store and
  category pages (image ownership, store placeholder and layout, URL normalization in the parser, escaping, a
  5,000-row synthetic set, export = embedded data, failure safety, REPORT saved as exactly text/html, rows pushed → report).

### 2026-11-07

#### Fixed

- *Maximum products per store* counted the first N menu items before filters: with *Only promotions* or a price filter, a store gave fewer matching products than asked although they were on the page already downloaded. The limit now counts saved products (restaurant menus; no extra request).
- `proxyConfiguration` with your own proxy URLs (`proxyUrls`) was ignored (only Apify Proxy was taken into account); a value that is not an object no longer crashes the run.

#### Reliability

- Retries wait 1 s, 2 s, 4 s… with ±30 % jitter (was a fixed 2^n delay).
- Explicit 60 s timeout per page or API download (`navigation_timeout`).
- Price history loaded and saved with parallel requests.

#### Data

- Every row is checked against the types of `.actor/dataset_schema.json` before it is saved (`src/item_check.py`); `storeId` is always text (declared as such), `productsCount` and `optionsCount` integers; descriptions say which fields are often empty (promotions, price tracking, store-card-only fields).

#### Maintenance

- Offline test suite (`tests/`, 21 tests) on real Glovo data (a Casablanca store page and category page); `pytest.ini`. `tests/` excluded from the Docker image.
- `requirements.txt`: `apify>=3.4,<4`, `crawlee[httpx]>=1.11,<2`.
