Alison Moura d7f990ebd7 fix(extractors): search all metadataRows for views/published in lockupViewModel videos
Collaboration videos (multiple authors) have an extra metadataRows entry
before the views/date one, containing the byline (e.g. "Channel A and
Channel B"). The video branch of LockupViewModelParser always read
metadataRows[0], which for these videos is the byline, not views/date,
so both silently defaulted to 0 views and the current time.

Fixed by searching every row's parts instead of assuming a fixed index,
mirroring the same reasoning already used a few lines below for the
playlist branch of this parser.

Verified against real, live-captured YouTube API responses for both a
single-author video and a real collaboration video (Veritasium x 2swap):
confirmed the bug reproduces against the original code (views: 0) and is
fixed by this change (views: 7900000). Full spec suite (174 examples)
passes.

Fixes: #5740
I want to be awarded the bounty associated to the issue this PR is fixing.

--
AI disclosure (per AI_POLICY.md): this change was written with assistance
from Claude Sonnet 5 (model id claude-sonnet-5), via Claude Code (Anthropic's
CLI agent). The human (Alison Moura) read the AI usage policy, reviewed the
diff, and reviewed the before/after test verification described above prior
to this commit being made.
2026-08-14 11:08:56 -03:00
..