A bit of oofle dust to scrape websites
it useful ★ ★ ★
- Scrape by query selector
- Built on headless chrome
npm install --save sooty
import Sooty from 'sooty';
const scrapper = new Sooty({
url: 'https://google.com', // go to google search page
interactions: {
search: [
{ // fill out Google search
fields: { q: 'funny cat videos' }
},
{ // press "Google Search" button
click: 'input[name=btnK]',
waitUntil: 'networkidle0'
}
]
},
queries: {
catVideos: { // query google search results
selector: '.rc .r a',
requires: ['search']
}
}
});
scrapper.run().then(results => {
results.catVideos.forEach(catVideo => {
console.log(`${catVideo}\n`);
});
});
Submit an issue
Contribute a screenshot
Review the guidelines for contributing
Jam Risser © 2018
Review the changelog
- Jam Risser - Author
A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.
Add some fuel if you'd like to keep me going!