use-scraper
v1.1.0
Published
React hook that allow you to scrape data from a website
Downloads
19
Maintainers
Readme
Features
- Zero dependencies
- Configurable
Installation
npm i use-scraper
How to use
:warning: To use this component it is necessary to define a CORS-enabled proxy. For example you can use CORS-Anywhere.
import useScraper from "use-scraper"
const MyComponent = () => {
const { isLoading, data, error } = useScraper({
url: 'https://github.com/Alejandroid17',
proxyURL: '<proxy-url>'
});
return (
// This is an example, here you define your component.
<div>
{ isLoading && <div>Loading...</div> }
{ error && <div>{error}</div> }
{ data && <div>{data}</div> }
</div>
);
export default MyComponent;