What you pay for, what Discord drops, and pixiv switched off #251
@@ -396,6 +396,16 @@ def _roster_rows(table: str, identifier: str, base: str) -> list[Membership]:
|
||||
name = _ROSTER_NAME_RE.search(row)
|
||||
slug = unescape(href.group(1))
|
||||
cells = _ROSTER_CELL_RE.findall(row)
|
||||
if len(cells) != len(labels):
|
||||
# Canary, not a refusal. Identity above does not depend on columns,
|
||||
# so a shifted column must not fail the whole roster — but it would
|
||||
# silently mislabel `details` (a price filed under "discord"), so
|
||||
# say so in the worker log where it is diagnosable.
|
||||
log.warning(
|
||||
"SubscribeStar roster %r: %d cells against %d headers — column "
|
||||
"details may be mislabelled; markup likely changed (note #3989)",
|
||||
identifier, len(cells), len(labels),
|
||||
)
|
||||
rows.append(Membership(
|
||||
campaign_id=user_id.group(1),
|
||||
display_name=(_cell_text(name.group(1)) if name else "") or None,
|
||||
@@ -420,7 +430,7 @@ def _roster_rows(table: str, identifier: str, base: str) -> list[Membership]:
|
||||
# its <th>'s class at all.
|
||||
"columns": {
|
||||
label: _cell_text(cell)
|
||||
for label, cell in zip(labels, cells)
|
||||
for label, cell in zip(labels, cells, strict=False)
|
||||
if label not in _ROSTER_SKIP_COLUMNS
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user