During scraping or taking screenshots, unwanted elements such as ads, chat widgets, cookie banners, etc. can appear on the page. These elements can be annoying and can ruin the quality of the screenshots. To solve this problem, ScrapeAutomate provides flexibility to block these elements from appearing on the page.
We all know how annoying ads can be, they can ruin the quality of the screenshots and can make the page look unprofessional. Ads can also slow down the page load time.
To block ads, you need to include the block_ads
query parameter in your request and set it to true
. Here is an example:
If ads are still appearing on the page, please create a support ticket so we can investigate the issue.
Chat widgets can be distracting and may not be needed for your use case. For example, if you are taking screenshots of a page for a blog post, you may not want the chat widget to appear in the screenshots. To block chat widgets, you can use the block_chat_widgets
query parameter and set it to true
. Here is an demo:
If chat widgets are still appearing on the page, feel free to create a support ticket so we can investigate the issue.
Cookie banners often appear on websites to comply with privacy regulations. Sometimes it requires you to click on “Yes” or “No”, which can be annoying and can ruin the quality of the screenshots. To avoid this, you can use the block_cookie_banners
query parameter to block cookie banners from appearing. Here is an example:
To optimize the performance of your scraping or to avoid loading unnecessary resources, you can use the block_resources
query parameter. This feature allows you to block some specific resources from loading. This can include stylesheets, images, media and other elements that might not be needed for your use case.
You can specify the type of resources you want to block. ScrapeAutomate supports the following resource types:
To block resources, you need to include the block_resources
query parameter in your request and specify the resource types you want to block. To block multiple resource types, you can separate them with a comma and a space. For example, to block images, videos, and fonts, you can set block_resources=image, media, font
. Here is the full API request:
Sometimes blocking resources can break the page layout or functionality. If you encounter any issues, please create a support ticket so we can investigate the issue.
1. Could blocking resources break the page layout or functionality?
Yes, blocking resources can break the page layout or functionality. For example, if you block CSS files, the page may not be styled correctly. If you block JavaScript files, the page may not function as expected especially SPA (Single Page Applications).
2. How do I know if I'm using these features correctly?
If your requests are working as intended ads are gone, chat widgets are blocked, and pages load faster—you’re doing it right! But if something feels off or isn’t working, don’t hesitate to reach out. We’re always happy to help you fine-tune your setup.