How to improve web scraper performance and wait for the full page load
Generally, our system waits until the entire page load from the networking perspective. It means that the result will be returned right after the networking is performed.
Still, in some cases, a web scraper may require waiting for a particular DOM element appearance. This DOM element may appear in the HTML before and after the entire page load. So, with waiting for CSS selector feature, it's possible to decrease the ScrapingAnt API response time or make a delay after the whole page load to wait for the DOM element.
wait_for_selector parameter is specified, the ScrapingAnt service will no longer wait until the entire page load but wait for the desired DOM element appearance instead.
For example, with waiting for the element:
Your request will have the following look:
Don't forget to urlencode
wait_for_selector parameter while using GET request