Skip to content

odax/web-scrape-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Scrape X

cli web scraper
default url: naleeriddell.com
default query: console.log($('li').text());

Instructions:
with node installed, navigate to repo and type npm install
to start: node scrape.js
first prompt is url, type in the webpage url you want to scrape
second prompt is query, type in the callback function for the returned data

For Callback Function
query syntax is jquery, for more info visit cheerio.js.org
$ === the returned promise from fetching data

example
on query prompt:
$('h1').each((i, el) => { const item = $(el).text(); console.log(item); })

to scrape and console.log h1's

About

simple cli webscraper built on node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published