npm.io
1.0.0 • Published 10 years ago

scraper-request

Licence
ISC
Version
1.0.0
Deps
1
Vulns
1
Weekly
0

scraper-request

only dependency is the request module

scrape class - methods and properties to scrape a single page

var scraper-class = require('scraper-request/src/listingClass.js')

** set url for the page we want to scrape the html body ** var url = 'http://www.google.com'

var location = 'uk'

var googleScrape = new scraper-class(url, location)

make request

googleScrape.makeRequest().then((result) => {

print html response console.log(listingScrape.html)

**print date + time of scrape ** console.log(googlescrape.scrapedate) })

Keywords