scrapeByCssPath
Scrape any part of a webpage using the CSS Path.
Check this article on how to scrape web pages using CSS selectors.
Basically, if you click on the element that you want to scrape, right click > inspect element then a sidebar will appear. Right click on the HTML element that you've inspected and click on Copy > Copy Selector.
That's it! You'll have the CSS Path copied in your clipboard

How to obtain the CSS selector from a browser
This function spends 1 credit per execution
Scraping one NPM repository with CSS Path
- url: The URL you want to scrape (i.e.
https://www.domain.com/path-1
) - scrapeSeveralElements: Set to True if you want to scrape several elements. For default is set to False so it will scrape only the first element
- cssPath: The CSS Path to select the element you want to scrape (i.e.
h3
) - method The method to use to get the element (i.e.
textcontent
)
- string: The element you want to scrape
scrapeByCssPath("https://www.npmjs.com/package/seo-scraper", TRUE, "h2", "textContent")
// seo-scraper
// Installing
// Get started with default config
// Custom Configuration
// Custom scraping example
// Transformers
// Keywords
- Scrape any website from Google Sheets
Last modified 4mo ago