# Changelog of WeChat Channels User Videos Scraper (`opspilot.cc/wechat-channels-user-videos-scraper`) Actor

- **URL**: https://apify.com/opspilot.cc/wechat-channels-user-videos-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/opspilot.cc/wechat-channels-user-videos-scraper.md

## Changelog

### \[0.7] - 2026-11-09

#### Changed

- **Billing is per page again — this time it actually bills.** `user-videos-result`
  is now registered in the Actor's PPE pricing at $0.012 per page and takes effect
  on 2026-11-24; the per-page charge was re-added to the page loop, so one upstream
  page is one billable event instead of unbounded work under a single
  `apify-actor-start`. Before 2026-11-24 the platform's effective pricing still lists
  only `apify-actor-start`, so the SDK logs one "unknown event" warning per page and
  bills nothing — that warning is the transition window, not revenue.
- A refused charge (caller out of Apify credit) is logged and does not fail the run:
  the videos were already fetched and delivered.

### \[0.6] - 2026-11-09

- The Billing section claimed the Actor charges "pay per result". It does not: the
  only charge event registered on the platform is `apify-actor-start`, collected once
  when the run begins, so a run returning 300 rows costs the same as one returning 3.
  The section now describes that, and stops promising something the invoice contradicts.
- Free-plan runs are capped at 3 pages of videos. Every page, seed and enrichment is one upstream
  request, so this is where the real cost sits. The cap is written to the dataset as a
  `notice` row and to `SUMMARY.appliedLimits.capped`, and a capped run still ends
  SUCCEEDED - exceeding a plan quota is never a failed run.

### \[0.5] - 2026-11-06

#### Fixed

- **An upstream failure no longer reports a failed run.** `fetchUserVideos` sat
  outside any try/catch, so an upstream that failed after its own retries ended
  the run with exit code 91. All 9 FAILED runs this Actor had in the 30 days to
  2026-11-06 were this one path. The run now pushes a `type: 'notice'` row
  explaining what the upstream said and finishes successfully; if the failure
  happens after page 1, the pages already collected stay in the dataset and the
  notice says how many videos were kept.

- **A missing username no longer pushes a bare `{error}` row.** That row had no
  `type`, so any consumer reading rows as videos would ingest it as one. It is
  now a proper `type: 'notice'` row with a `reason`.

- **A phantom per-page charge is gone.** The code called
  `Actor.charge({eventName: 'user-videos-result'})` on every page, but the
  Actor's pricing only defines `apify-actor-start`, so the SDK answered
  `Attempting to charge for an unknown event` on every page and billed nothing.
  The call is removed; charging per page would need the event defined in the
  pricing first.

#### Changed

- **The 5-runs/day free cap is gone, because it never worked.** The counter
  depended on a named key-value store that no API-started run (all of them run
  under `LIMITED_PERMISSIONS`) can read or write; the failure was swallowed and
  the counter fell back to a per-run store, so it read `0` every time.
  Fleet-wide evidence, measured 2026-11-06: 48 of 58 `usage-gate-*` stores held
  a record and every record was dated 2026-10-03..05 with our own
  `APIFY_USER_ID` — local test runs only, not one real user. The gate is now the
  platform's pay-per-event charge. `src/gate_store.js` is deleted.

### \[0.4] - 2026-10-12

- The run can no longer be killed by the key-value store. Under
  `LIMITED_PERMISSIONS` — how Apify's automated QA and every API-triggered run
  starts an Actor — opening the store is refused with HTTP 403
  (`KeyValueStoreCollectionClient.getOrCreate`, path `/v2/key-value-stores`).
  That call sat in a `||` fallback chain and was never inside a `try/catch` of
  ours, so the throw ended the run with exit code 91 and a reported FAILED run
  with zero items. Every store open now goes through a wrapper that returns a
  no-op store instead of throwing, so the free-run counter and the run SUMMARY
  degrade and the actual work proceeds.
- The gate store's name-to-id lookup no longer depends on the store still being
  on the first page. There is no GET-by-name endpoint, so the lookup pages
  through `/v2/key-value-stores`; it used a fixed `limit=50`, which silently
  stopped containing gate stores once the account passed 50 of them — and the
  account creates a new default store on every run, so that list grows on its
  own. The lookup now pages (100 per page, up to 20 pages).

### \[0.2] - 2026-10-08

- KV writes and status messages can no longer hang the run. Under
  `LIMITED_PERMISSIONS` these calls do not merely fail — they can return a
  promise that never resolves. Measured on a live run of a sibling Actor:
  results were fetched successfully, then the following `setValue` never
  returned and the run sat for 49 minutes before being aborted with an empty
  dataset and a paid bill, and not one error in the log. `try/catch` cannot
  help there — it catches a rejection, not a promise that never settles. Every
  bookkeeping write now races a 15s timeout and reports the failure as
  non-fatal, so a stuck store costs one summary field instead of the whole run.

### 0.1

- Initial release. Pulls a WeChat Channels (视频号) account's video list as dataset rows — one row per video, with engagement counters and publish time.
- Input: `username`, plus `max_pages` and `last_buffer` for auto-pagination (buffer cursor), and an optional `raw` flag for the unprocessed provider payload.
- Pagination stops when the provider returns no new rows or reports the end of the feed, so a repeated buffer cannot loop the run.
- Writes a `SUMMARY` record with page count and row totals for auditing.
