# Changelog of El Mouchir Scraper (elmouchir.dz) (`hamza325/elmouchir-scraper`) Actor

- **URL**: https://apify.com/hamza325/elmouchir-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/hamza325/elmouchir-scraper.md

## Changelog

### 1.0.1

#### Fixed

- A phone number or e-mail address resolved in an earlier run was dropped from
  every later row. The contact cache was consulted to skip the look-up, but the
  remembered value never reached the row, so a repeated run silently returned
  companies without contacts. Cached values now land in the output like freshly
  resolved ones (and a value shared by several companies is written to each).
- `maxItems` now also bounds the work, not only the rows: with
  `includeDetails` on, a listing page queued a company page for every card it
  held (300 cards queued 300 requests for a 5-row run), and pagination went on
  fetching pages the row cap would discard. Both stop at the cap.
- An unknown wilaya, a category page the site does not serve, or a listing
  answer that is not a listing at all now fail the run with the reason (and the
  start of the response) instead of finishing as a success with an empty
  dataset. A site answer that cannot change is no longer retried six times
  first.
- Browsing an activity no longer ends as a silent empty run: the directory's
  listing endpoint answers 0 companies for every activity id (it filters by
  sector only, whatever field the request uses), so an activity URL now stops
  the run and names the sector to browse instead.
- A company page opened from a listing keeps the category the run asked for, so
  `includeDetails` rows carry `categoryUrl`/`categoryId` like the other rows.
- In `detail` mode every row named the first URL as its `sourceUrl`; each row
  now names its own company page.

### 1.0.0

Initial release on the Apify platform.

#### Added

- Five run modes, derived from one pasted page URL (`startMode: auto`):
  company listings by keyword, company listings by sector/activity, single
  company pages, the sector/activity catalog and name lookups.
- Company rows with name, address, wilaya, category, logo and resolved phone
  and e-mail addresses; catalog rows for the sector tree; lookup rows for the
  name suggestions.
- A session pool that keeps several cookie jars open at once. The site
  rate-limits every session on its own, so the sessions pace themselves
  independently and one session's wait never stalls the others.
- Automatic captcha handling: the site's challenge carries its answer in the
  page, so the Actor clears it and continues.
- A filter guard: the site sometimes answers a listing request with the whole
  directory instead of the filtered result. The Actor detects that and stops
  the run instead of publishing wrong rows.
- Contact resolution through the site's own endpoint, with the resolved values
  cached in the key-value store so a repeated value is only resolved once.
- A sector catalog walker that emits both the sectors and their activities,
  with the company count of every node.
- A `wilaya` mode: the companies of one wilaya, by name or id. The wilaya can
  also narrow a search or a sector listing. The name is resolved by the site
  itself, and the rows carry the wilaya they belong to.
- The task is described by filters in separate fields — a keyword, a sector, a
  wilaya, a list of company pages — and the filters compose. A pasted page URL
  stays as a shortcut for the pages of the site that have a shareable address.

#### Fixed

- `pageSize` defaults to 100, the largest page size the directory honours. Any
  other value is still accepted and sent unchanged; the directory silently
  answers with 10 companies per page, which the docs now state.
- Pagination counts the companies actually returned, so a short page no longer
  ends a listing before the page budget is spent.
