Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.23 KB

File metadata and controls

39 lines (23 loc) · 1.23 KB

A simple web-based scraping tool that allows you to extract data from websites using CSS selectors.

Screenshot


Getting Started

Clone the repository:

git clone https://github.com/puter-apps/scraper.git

and open the /src/index.html file in your browser.


How It Works

Web Scraper leverages Puter.js to overcome the fundamental challenge of cross-origin requests in web browsers. Traditional web applications are restricted by CORS (Cross-Origin Resource Sharing) policies, which prevent direct requests to external domains from browser-based JavaScript.

Specifically, Web Scraper uses puter.net.fetch() to make cross-origin HTTP requests and bypass CORS restrictions without needing a proxy server. This allows the app to scrape public websites without server-side configuration.

The scraped HTML is then parsed using the browser's built-in DOMParser API, and data is extracted using standard CSS selectors via querySelectorAll().


License

MIT