Repository navigation
v0.1.2
Behaviour changes.
--querynow filters: it was sent without the
search type the library needs and was ignored, so every keyword run
returned the whole region. A keyword that matches nothing is exit 4 (the
library's owntotal: 0), not exit 5.diff_runs.pyrefuses two runs
that asked a different keyword, region set, ad type or window.
Fixed
- A recovered page is not a blocked one.
_fetch_with_policykept a
"refusal seen" flag that a later successful attempt never cleared, so a
retry that got the page still reported it blocked. Measured live on
2026-09-29 (pyppeteer, @nasa): one empty HTTP 200, then the profile,
thenpartial/stop_reason: blockedwithpages_failed: []. And the
HTTP -> browser switch spent a--retriesattempt, so with--retries 0
a browser started and was never asked for the page. Both fixed in all
three engines, with a check that drives the real function. --querywas ignored.search_body()sentquery_type: ""; the
library's UI sends"1", and only then does the keyword filter.
Measured 2026-09-29, DE, same window: 19,000,309 / 19,000,308 (keyword /
nonsense) before, 416 / 0 after, in all three engines. The canary now
runs a positive and a negative keyword control.- "Nothing matched" read as an API error. The library's answer is
{"code": 0, "total": 0, "has_more": false}with nodatakey, and the
classifier called that an error, so the fixed keyword search would have
made every empty result exit 5. It is exit 4. - The envelope is judged before any row. A non-zero
codeis the API
refusing even whendatais[](it read as "no ads");datathat is
not a list is a parse error; records none of which carries anid
raise instead of reading as an empty region. - A failed region was listed as having no ads.
failedholds region
numbers and was compared against a region name. diff_runs.pycompares only runs that asked the same question. The
sidecar now recordsquery,query_type,ad_typeandwindow_days.
diff_runs.pycompared almost nothing. ItsTRACKED_FIELDSwere
tiktok-profile-scraper's account columns, 26 of whichAdvertisement
does not have, so a diff of two runs reported "0 changed" whenever only
an ad's run dates, review status or audience changed. It now tracks this
repo's own columns and prints each run's share of the library's
per-region total.smoke_test.pypins every tracked name against the
dataclass and checks that a changed column is actually reported.
A copied
.env.examplesetTIKTOK_URL=nasa, a TikTok handle, which
is not a region. It is nowDE.
-
Donor prose removed from the shared core.
output_writer.py,
diff_runs.py, the engines,page_flow.py,smoke_test.py,
.github/ci_checks.pyand theDockerfilecarried text from the repos
this core was copied from — YouTube comment threads,--sort top,
reply threads, job listings, "the business",--mode comments --out software-engineer— describing those sites as if they were this one.
Rewritten from this repo's own README, code and fixtures, or deleted
where there was no measured equivalent. Explicit sibling provenance
("measured on tiktok-profile-scraper's route", "a sibling repo
(youtube-scraper) had…") is kept and now says whose it is. -
output_writer.py's docstring described--mode profileand account
statistics;page_flow.py, the engines andsmoke_test.pydescribed a
profile page, an account,video_unavailableand the embed window. All
now describe the Ad Library (or are gone). -
The engines'
_rotate_if_per_pagesaid nothing one fetch receives feeds
the next; on this route thesearch_idcursor does, and it now says so. -
smoke_test.py'srun_metatest data is anadsrun on
library.tiktok.comrather than aprofilerun on@nasa. -
.github/ci_checks.pyno longer exempts anavatar_idcolumn this repo
does not have from the credential scan. -
captcha_solver.py's docstring pointed at a "No DataDome solver" section
that does not exist in this repo (it came with the copied core). Removed. -
The Scraper API engine failed on every
--wait-text/--wait-element/
--wait-statecall, and was billed for it. It sentwaitForas a
JSON-encoded string; measured 2026-09-23 the live API answers that with
HTTP 422 "params.waitFor must be an object" and still charges $0.0005,
while the same request with an object is answered 200. It is now sent as
an object. (The target status was already read fromhttp_code; the new
regression check pins that too, driving the realfetch_htmlwith
requests.poststubbed.) -
--wait-state networkidleis refused by the Scraper API (HTTP 422
"params.waitFor.state must be one of: load, domcontentloaded", still
billed — measured 2026-09-23 on a sibling repo with the object-shaped
waitFor). The choice is removed.