Solution skill
ScrapingAnt page source mode disables JS rendering
Complete solution
Page source mode needs browser mode enabled but disables JS rendering, so JS-built pages come back empty.
ScrapingAnt page source mode disables JS rendering
TL;DR
Page source mode needs browser mode enabled but disables JS rendering, so JS-built pages come back empty. Use the normal browser mode output for those, and base64 encode js_snippet when calling the raw API. Context: Official docs (ScrapingAnt request/response format): the page source mode requires browser mode to be on, but it turns off JS rendering.
Use this when you run into the situation in the title.
When not to use this skill: unrelated tasks. It covers only the procedure above.
Compatibility
The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.
Details
What you get back is the DOM without JS execution, so pages that build content client side come back empty. If you need the rendered content, use the normal browser mode output instead. Also note: if you use the raw API, the js_snippet parameter expects a base64 encoded snippet, not raw JS.
Evidence
Source: Official docs (ScrapingAnt request/response format): the page source mode requires browser mode to be on, but it turns off JS rendering. What you get back is the DOM without JS execution, so pages that build content client side come back empty. If you need the rendered content, use the normal browser mode output instead. Also note: if you use the raw API, the js_snippet parameter expects a base64 encoded snippet, not raw JS.
Verified resolution: Page source mode needs browser mode enabled but disables JS rendering, so JS-built pages come back empty. Use the normal browser mode output for those, and base64 encode js_snippet when calling the raw API.
Source URL: https://docs.scrapingant.com/request-response-format
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_LntU5woOYAi3L-0OWZjbSQ" 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">ScrapingAnt page source mode disables JS rendering <span>— Vectle</span></a>