Skip to content

tennisonchan/cat-claws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

Cat Claws 🐾

Cat's claws for scraping any furnitures 🐱

NPM

Build StatusDownloads

cat-claws-logo

Installation

npm install --save cat-claws

Examples

const claws = require('cat-claws');

claws('https:// nytimes /', {
stories: ['.story.theme-summary',
{
storyHeading: '.story-heading a',
url: function ($el) {
return $el.find('[href]').attr('href');
},
summary: '.summary'
}
]
}).then(json => {
console.log(json);
// {
// stories: [{
// storyHeading: 'The Breaking Cat News!',
// url: 'https:// huffingtonpost /topic/funny-cats',
// summary: 'I smelled something funny when I was getting ready for work one day. I followed the smell to the kitchen, where I found that my cat had turned...'
// }, {
//...
// }]
// }
});

Releases

No releases published

Packages

No packages published