DEV Community

Attila
Attila

Posted on

Scrape Protected Sites Like Amazon Directly from Google Sheets with Bright Data

I am sorry guys but I dont prefer to work with n8n. No-code platforms promise a world where anyone can build complex workflows and link different apps using simple drag-and-drop actions. For many small business owners, this sounds like a dream come true. However, here’s the catch: no-code tools are essentially just visual ways of doing what code does. People who aren’t familiar with coding often hit roadblocks fast.

This is a submission for the AI Agents Challenge powered by n8n and Bright Data

What I Built

I built a Google Sheet from which anyone can scrape data from any sites, using simple CSS selectors.

Demo

https://bestflow.io/blog/posts/how-to-scrape-protected-sites-like-amazon-directly-from-google-sheets-with-bright-data/

n8n Workflow

I am sorry but I dont believe in no-code platforms.

Technical Implementation

  1. Read: The script reads a list of target URLs and their corresponding CSS selectors from your Google Sheet.
  2. Request via Bright Data: For each URL, it sends a request to the Bright Data API, which intelligently fetches the page content using its advanced proxy network and unlocking technology.
  3. Parse: The clean HTML returned by the API is loaded into the Cheerio library, enabling jQuery-like traversal of the document.
  4. Extract: It uses the provided CSS selector to find all matching elements on the page and extracts their text content into an array.
  5. Write: Finally, it writes this array of data back into the sheet, populating the columns to the right of the URL and selector.

Bright Data Verified Node

I use Web Unlocker API to fetch HTML of websites

Top comments (0)