Rebuild Vinted side on its own JSON API - fixes both remaining bugs
Root-caused why the avatar filter and item count were still wrong for a real, larger, logged-in closet (not reproducible with my anonymous 14/39-item test accounts): - Fresh testing showed Vinted's grid genuinely does not scroll-load more items via a simple scrollTo(bottom) - confirmed by scrolling and waiting up to 18s on a 96-result catalog page with the count never moving past the initial batch. The DOM-scraping approach was fundamentally guessing at a lazy-load mechanism that doesn't work the way I'd assumed, which explains the undercounts. - Inspecting the page's own network requests found the real mechanism: a clean, same-origin JSON API the page itself calls, /api/v2/wardrobe/<user_id>/items?page=N&per_page=50, returning title/brand/size/status/price/photos already structured - and the photos are item-scoped, so there's no avatar to filter out at all (that was a separate field entirely: item.user.photo). Rebuilt the Vinted bookmarklet around this API: page through it until a short page confirms the end (reliable, complete count - verified 41/41 items on a real closet, vs. 20 in the initial DOM-scraped render), then still fetch each item's own page once for the fuller free-text description via the same ld+json block as before, since the wardrobe API only returns the short title. If that per-item fetch fails, the draft now falls back to the title alone instead of being dropped - the wardrobe data already covers everything else. Depop's side is unchanged - it has no equivalent API (confirmed earlier: blocked by Cloudflare bot management server-side, no CORS browser-side), so DOM-scraping remains the only option there. Verified against a real, live, larger closet (41 items, not reproducible with the smaller test accounts used earlier) - full pagination, correct brand/size/condition/price/photos, zero avatar contamination by construction rather than by filtering. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
I
Ian Lee committed
ff0ce9702c8c3abf662db5b48709da152aae2846
Parent: d647b93