@trawlme/skills 1.4.9 → 1.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -38,6 +38,7 @@ const price = await page.$eval(PRICE_SEL, (el) => el.textContent.trim());
|
|
|
38
38
|
- module-CSS (stable prefix + hash suffix) → match the prefix: `[class*="ListingCard_price"]`
|
|
39
39
|
- `aria-label` often encodes the value (`[aria-label*="Current price"]`) — more stable than any class
|
|
40
40
|
- **JSON beats DOM**: `window.__NEXT_DATA__` (Next.js SSR) and JSON-LD (`script[type="application/ld+json"]`, schema.org) carry the data pre-render — use as primary, DOM as fallback.
|
|
41
|
+
- **An XHR is not the data**: before you build on a JSON call the page makes, open its response body in a local run (`trawl-scrap-local-test`) and check it holds the rows and fields the user asked for — many JSON calls are analytics, ads or tracking.
|
|
41
42
|
|
|
42
43
|
## Waits
|
|
43
44
|
|