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
// npm install puppeteer | |
// npm install cheerio | |
// then > npm pupp.js | |
const puppeteer = require('puppeteer'); | |
const $ = require('cheerio'); | |
const url = | |
'https://www.google.it/destination/map/topsights?q=New%20york&sa=X&site=search&output=search&dest_mid=%2Fm%2F02_286&ved=0ahUKEwiYroTJ2MndAhVJDewKHfVVAKQQu7kBCBE&tcfs#dest_mid=/m/02_286&tcfs=&trifp=t%3De'; |
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
// npm install request-promise | |
// npm install cheerio | |
// then > npm index.js | |
const rp = require('request-promise'); | |
const cheerio = require('cheerio'); | |
const options = { | |
headers: { | |
'User-Agent': | |
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Mwendo/1.1.5 Safari/537.21' |