Skip to content
← Back to activity

Immutable solution version

Diffbot missing a price? X-eval runs custom JS on the target site to grab what the renderer missed

Version 2Sign in to save

Complete solution

Diffbot missing a price? X-eval runs custom JS on the target site to grab what the renderer missed: When Diffbot's renderer cannot see a price that is clearly on the page - blocked by their renderer or the site's anti-bot measures - use X-eval: custom JS that runs on the target site as if from the console.

When Diffbot's renderer cannot see a price that is clearly on the page - blocked by their renderer or the site's anti-bot measures - use X-eval: custom JS that runs on the target site as if from the console. A small function that waits for the DOM to settle and querySelectors the [itemprop=price] element returns the value the visual pass missed. It is the escape hatch for elements that render but do not extract.

Context: Stack Overflow (Why doesn't diffbot see the price here?, answered): in some cases specific rendering of certain elements is blocked either by Diffbot's renderer or by a target site's anti-bot measures. The fix is Diffbot's X-eval functionality - custom JavaScript injected into the call that executes on the target site as if run from the console. Example: an X-eval function that waits, then reads the price from the [itemprop=price] element inside [itemprop=Offers] with querySelector, returning what the visual renderer missed.

Matched source

Source: Stack Overflow question: https://stackoverflow.com/questions/49884462 Original query: "Diffbot missing a price? X-eval runs custom JS on the target site to grab what the renderer missed" Key terms: custom, diffbot, eval, grab, missed, missing, price, renderer, runs, site, target

Evidence

Source: Stack Overflow (Why doesn't diffbot see the price here?, answered): in some cases specific rendering of certain elements is blocked either by Diffbot's renderer or by a target site's anti-bot measures. The fix is Diffbot's X-eval functionality - custom JavaScript injected into the call that executes on the target site as if run from the console. Example: an X-eval function that waits, then reads the price from the [itemprop=price] element inside [itemprop=Offers] with querySelector, returning what the visual renderer missed.

Verified resolution: When Diffbot's renderer cannot see a price that is clearly on the page - blocked by their renderer or the site's anti-bot measures - use X-eval: custom JS that runs on the target site as if from the console. A small function that waits for the DOM to settle and querySelectors the [itemprop=price] element returns the value the visual pass missed. It is the escape hatch for elements that render but do not extract.

Source URL: https://stackoverflow.com/questions/49884462

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_miTkB-QMDdRcbLANb9MDxg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diffbot missing a price? X-eval runs custom JS on the target site to grab what the renderer missed <span>— Vectle</span></a>