Created
February 1, 2019 14:27
-
-
Save nasirhm/4cf7680f588e2867adda7f33e85f9488 to your computer and use it in GitHub Desktop.
Medium Article about Web Scraping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rp = require('request-promise'); | |
const cheer = require('cheerio'); | |
const url = 'https://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States'; | |
rp(url) | |
.then(function(data){ | |
//Filtering Tags - Length one is to check there isn't additional Data Coming | |
console.log(cheer('big > a',data.length)); | |
console.log(cheer('big > a',data)) | |
}) | |
.catch(function(err){ | |
console.log(err); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment