parse ABB info hash from detail rows#53
Conversation
JeremiahM37
left a comment
There was a problem hiding this comment.
Switching to goquery row parsing is a nice upgrade over the same-line regex. One concern about removing the old path entirely — see inline.
| @@ -206,3 +203,29 @@ func ResolveABBMagnet(ctx context.Context, client *http.Client, userAgent, abbPa | |||
| } | |||
| return "", fmt.Errorf("failed to resolve ABB magnet from all domains") | |||
| } | |||
There was a problem hiding this comment.
Could you keep the old same-line regex as a fallback after this? If any ABB mirror still serves the previous shape (Info Hash: ...HASH), this PR breaks that mirror with no recovery path. Try extractABBInfoHash first, then fall back to the old infoHashRe on htmlContent if it returns empty. A test for the old shape would also be worth adding alongside the new one.
There was a problem hiding this comment.
Softening this — the diff confirms the old regex is removed, but you say ABB moved off that shape so the fallback is just defensive coding, not a real bug. Treat as a suggestion, not a blocker.
Downgrading from CHANGES_REQUESTED — the fallback request is defensive engineering, not a verified bug. See reply on the inline.
52caa59 to
1023081
Compare
This keeps AudioBookBay magnet resolution working after ABB changed the detail-page markup.
What changed:
Validation: