-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, when browser mode is enabled:
- flyscrape will use a browser to navigate to a page
- Wait until the page loaded and return its HTML
- Which then can be used for scraping
The browser control feature should support direct control of the browser, so that it can be used for page interaction and data extraction.
Example code:
export const config = {
url: 'https://example.com/',
browserControl: true,
};
export default function ({ doc, browser }) {
browser.waitPageLoaded();
browser.waitVisible(".products");
const productImages = browser.find(".products").map((product) => {
product.find(".swatches").click();
return product.find(".product-image").attr("src");
});
return {
productImages,
};
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request