ScrapeNinja

부분 유료
분류별 Anthony | 업데이트됨 23 days ago | Data
인기

9.9 / 10

지연 시간

3,760ms

서비스 수준

97%

Health Check

N/A

모든 자습서로 돌아가기 (2)

Puppeteer: click an element and get raw JSON from XHR/AJAX response

This lately became a pretty popular question when scraping with Puppeteer: let’s say you want to interact with the page (e.g. click the button) and retrieve the raw ajax response (usually, JSON). Why would you want to do this? This is actually an interesting “hybrid” approach to extracting data from the web page - while we interact with the page like a real browser, we still do not mess around with the usual DOM traversing process to extract the data, and we grab raw JSON server response instead.

Read more: https://pixeljets.com/blog/puppeteer-click-get-xhr-response/