Skip to content

v0.2.0

Choose a tag to compare

@jehrr jehrr released this 15 Oct 22:35
76e7412

Behaviour changes. A response whose own total or has_more says
ads exist but whose data is empty is now a failure, not "no ads": a run
holding nothing exits 5 (was 4), and a run with other rows exits 6.
Output files follow the umask (were always 0600) and an existing file
keeps its mode. CSV cells that would run as a spreadsheet formula get a
leading '. Negative --retries, --retry-delay, --delay and
--proxy-block-retries are refused as usage errors (exit 2).

Fixed

  • An empty data beside a non-zero total read as "no ads". The
    classifier returned no_ads for {"total": 5000, "has_more": true, "data": []}, so a run reported the query as matching nothing (exit 4)
    while the response stated 5,000 matches. It is now a parse error in the
    classifier, and each engine treats a zero-row page under such an envelope
    the same way. A genuine total: 0 is still exit 4.
  • Output files were 0600 whatever the umask. The atomic writer kept
    the temporary file's owner-only mode. A new file now gets
    0666 & ~umask and an existing one keeps its own mode, including the
    .meta.json sidecar.
  • CSV formula injection. Advertiser names, titles and creative URLs
    are advertiser-written text. String cells starting with =, +, -,
    @, tab, CR or LF are prefixed with ' in the CSV (after list joining);
    numbers and JSON are untouched. The sidecar records csv_cells_escaped,
    and a caller's own sidecar fields win a name collision.
  • Negative counts and delays. --retries -1 was silently read as 0
    and --retry-delay -1 crashed the first retry with exit 1. All three
    engines (and the refusal-only Scraper API client) now reject negative
    values with an argparse error naming the flag. --retries has help text
    saying it counts extra attempts; --retries 0 still fetches once.
  • Wording. The README said 25 columns per ad (there are 26), and
    comments described sibling routes as if they were this repo's.

Changed

  • Public files no longer cite an external instruction file or its section
    numbers; each comment states its rule directly. A suite check keeps it
    that way. tiktok_payload.py changed only in comments, and its recorded
    digest was updated.
  • The canary keeps the exact payloads it received (--dump-html) in its
    artifact, so a red run can be diagnosed.