README
ray-scrappie
Usage:
npm install ray-scrappie
- Scrappie is a web-scrapping npm package, that provides the functionality to scape a website of data.
Supported DOM element types supported include:
h1
h2
h3
h4
img
a
p
Resource
A function:
Loader
is exposed.
parameters:
These function takes 3 parameters:
1): The link for the website you want to collect data from for example:
https://example.com
2): The type of elementt you want to collect data from for example:
`bash "h1", "h2", "h3", "h4", "img", "a", "p", "li" `
3): The name of the file you wish to store your data into for example:
"headings", "paragraphs", "my heading", "links", "image-links"
NOT
- All 3 parameters must be strings
- After instaling the package, make a folder called "data in your project directly to store the newly collected data" otherwise It will be automatically generated for you.
Example:
Loader("https://example.com", "h3", "subheadings");
- The above code will collect all text in the h3 tags, make folder in your home directory called "data" and write to it a json file containing all your data.