Commit b3831fb
fix: Update Chrome Web Store crawler selector for user count
Google changed the CWS detail page DOM layout — a new "Add to Chrome"
div was appended as the last child of the header section, causing the
`div:last-child` selector to miss the user count element. The crawler
threw on `weeklyActiveUsers` extraction, which nullified the entire
extension entry in the GraphQL response.
Replace the positional `div:last-child` selector with a text-content
search for the div containing " users", making it resilient to future
DOM reordering. Add a test fixture from the current (Apr 2026) CWS HTML.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 53371e3 commit b3831fb
2 files changed
Lines changed: 161 additions & 3 deletions
File tree
- src/services
- __tests__/fixtures/chrome-web-store
Lines changed: 150 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
0 commit comments