Actions8
- Browser Rest Apis Actions
Overview
This node interacts with the Browserless API to unblock and access web pages through a browser automation service. It is useful for scenarios where websites are blocked or require automated browsing, such as web scraping, automated testing, or bypassing restrictions. The node supports options to control browser behavior, capture screenshots, return page content, manage cookies, and handle navigation and waiting strategies.
Use Case Examples
- Unblock a website URL and capture a full-page screenshot for analysis.
- Automate browsing to a site with custom cookies and wait for specific page elements before proceeding.
- Use the browser WebSocket endpoint to keep the browser session alive for multiple interactions.
Properties
| Name | Meaning |
|---|---|
| Browser WS Endpoint | Whether to keep the underlying browser alive for future reconnects. |
| Content | Whether to return the content of the site. |
| Screenshot | Whether to return a full-page screenshot of the site. |
| Ttl | Time to keep the browser alive for reconnection in milliseconds, max 30000. |
| Url | The URL of the site to unblock. |
| Wait For Timeout | Timeout duration to wait for certain events or selectors. |
| Wait For Selector | Options to wait for a specific selector with visibility and timeout settings. |
| Goto Options | Parameters controlling page navigation and loading behavior. |
| Wait For Event | Wait for a specific browser event with timeout. |
| Wait For Function | Wait for a function to evaluate true in the browser context with polling and timeout. |
| Timeout | Override system-level timeout for the request in milliseconds. |
| Best Attempt | Attempt to proceed when awaited events fail or timeout. |
| Enable Cookies | Enable cookie handling for the session. |
| Cookies | Array of cookie objects for the session. |
| Block Ads | Load ad-blocking extensions for the session. |
| Enable Launch | Launch a new browser instance. |
| Launch | Options for launching the browser instance including args, viewport, devtools, headless mode, and more. |
| Use Custom Body | Whether to use a custom request body. |
| Custom Body | Custom JSON body to send in the request. |
| Request Options | Additional request options such as batching, SSL handling, proxy, and timeout. |
Output
JSON
content- The HTML content of the unblocked site.screenshot- A full-page screenshot image of the site, if requested.cookies- Cookies set or used during the browsing session.url- The URL of the site accessed.status- Status of the unblock operation, e.g., success or failure.
Dependencies
- Browserless API
Troubleshooting
- Ensure the URL is valid and accessible; invalid URLs may cause errors.
- Timeouts may occur if the page takes too long to load; adjust timeout settings accordingly.
- If using cookies, ensure they are correctly formatted as JSON arrays.
- Ad-blocking may cause some sites to not load properly; disable if issues arise.
- When using browser WebSocket endpoint, ensure the TTL is set appropriately to keep the session alive.
Links
- Browserless Unblock API Documentation - Official documentation for the unblock operation in Browserless API.