Skip to content

Instantly share code, notes, and snippets.

View thisfiore's full-sized avatar

Frenk Fiore thisfiore

View GitHub Profile
@thisfiore
thisfiore / pupp.js
Last active December 29, 2018 10:48
Scraping with Puppeteer
// 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';
@thisfiore
thisfiore / index.js
Last active December 29, 2018 10:47
Scraping Google Images
// 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'