# Changelog of TikTok Influencer Finder & Followers Scraper (`badr_xba/tiktok-scraper-pro`) Actor

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

## Changelog

### 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

- `engagementRate` on post rows: (likes + comments + shares) / views in percent, 2 decimals, empty when
  TikTok reports no views. Same formula as the report's engagement figure; shown in the *Posts overview* view.
- Visual report on kit 1.1.0: live `Running` page from the start of the run with inputs done / total (at most one
  update a minute, never billed), warnings & errors panel with failed inputs grouped by error code and coded run notes
  (`MAX_CHARGE_REACHED`, `PINNED_SKIPPED`, `FILTERED_BY_DATE`, `FILTERED_BY_POPULARITY`, `OPTION_NOT_OFFERED`),
  data-quality panel, at most 3 images per result (photo posts keep their real photo count on the badge).
- The final report is also written when the run is aborted or crashes (status FAILED, with the error).

### 2026-11-08

#### Changed

- *Media and files* view: the first column is now the real video cover (`videoMeta.coverUrl`, filled on every
  post row). The top-level `coverUrl` / `avatarUrl` are the stored copies made only when cover / avatar downloads
  are on, so they now show as *Saved cover file* / *Saved avatar file* links instead of mostly empty image columns.

#### Added

- **Visual report** (`REPORT` record, Output tab → *Visual report*): video cards with cover, avatar, views,
  likes, comments, shares, saves, duration, hashtags and subtitle languages; Story / Repost badges and the search
  keyword on keyword-search videos; profile header cards; compact follower / following cards; slideshow galleries;
  key figures, charts, search, filters (type, source, keyword, language…), sorting, table view, full-size viewer
  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.
- Dataset views show thumbnails: cover (Posts overview, Hashtags) and avatar (Profiles, Authors and music).
- Output schema: *Visual report* link; key-value store schema: `REPORT` (text/html).

#### Fixed

- Image fields (`authorMeta.avatar`, `avatar`, `videoMeta.coverUrl` / `originalCoverUrl` / `dynamicCoverUrl`,
  `musicMeta.coverMediumUrl`, hashtag `coverUrl`, `slideshowImages`, follower / following `avatar`) are
  normalized: `//host/…` becomes `https://host/…`, blank or non-http(s) values become `null`, and unusable
  slideshow entries are dropped instead of being saved as `null`. Valid links are kept byte for byte (they are
  signed).

#### Tests

- `tests/test_report.py`: 17 tests on 13 real rows (image ownership, placeholders, galleries, Pro rows —
  followers, stories, reposts, keyword search —, URL normalization, escaping, a 5,000-row synthetic set,
  export = embedded data, failure safety).

### 2026-11-07

#### Fixed

- Hashtag rows: `videoCount` is filled again from TikTok's exact `statsV2` figures (it was always empty), `viewCount` uses the exact figure, and `coverUrl` falls back to the hashtag picture when TikTok has no cover.
- Fields of the wrong type (`"profiles": 12.5`, `"hashtags": true`, a string proxy setting, `profileScrapeSections` given as one string) no longer crash or vanish silently: they are reported in `FAILED_INPUTS` / the log and the run carries on.
- Switches sent as text by API clients (`"false"`, `"0"`, `"no"`) are read as off.
- `resultsPerPage` is kept between 1 and 1,000; negative filters count as 0.
- Local and API runs without `scrapeProfileVideos` now use the input schema default (off), like platform runs.
- A video link pasted in *Search queries* that is already in *Post URLs* (as URL or ID) is read and billed once.
- Followers / following: a missing residential proxy or a Chromium that cannot start is reported per profile (`BROWSER_UNAVAILABLE`) instead of crashing the run.
- Dates in full ISO form (`2026-01-31T10:00:00.000Z`) and `N years` are understood.
- An unexpected error on one hashtag, profile or browser job is recorded as `UNEXPECTED_ERROR` for that input instead of ending the run.
- The run stops as soon as the last row the maximum charge allows has been saved.
- Browser: failed context/page creation, a crash while closing a page, or a non-JSON feed answer are handled as a failed attempt.

#### Improved

- One Chromium serves hashtag videos, related videos, keyword search and reposts/stories (it used to be started up to three times, plus a test start each time). It starts in the background while the plain-HTTP steps run; only the residential follower lists get their own, after the shared one is closed.
- Browser waits end as soon as TikTok's answer has arrived (same ceilings as before). Local measurement, hashtag with 10 videos: 24.7 s before; 39.1 s and 13.8 s on the two runs after (TikTok's answer time varies a lot from one run to the next), peak memory 720 → 513–609 MB.
- Media downloads are streamed with the size cap applied while downloading, and retried with back-off on network errors, 429 and 5xx.
- Explicit connect timeout (15 s) on every HTTP request; every row checked against the dataset schema types; `RUN_SUMMARY` adds `httpRequests`, `stepSecs`, `outputTypeMismatches`; the log shows each step's duration and each browser page's timing.

#### Schemas and docs

- `dataset_schema.json` `fields` completed to every column the code writes (65, all nullable, notes on columns that are often empty).
- README: row types, hashtag figures and new summary keys documented; `RUN_STATS` description corrected.
- `requirements.txt`: Playwright upper-bounded (`<2`).

#### Tests

- `tests/`: offline tests for inputs and aliases, parsers on a saved TikTok page and hashtag answer, schema checks on real platform rows, retries with a mocked HTTP layer, billing limits, add-on charges, dedupe, search / follower mappers and browser helpers. Run `python -m pytest -q`.
