session-scraper

0.0.2 • Public • Published

Session Scraper Build Status

npm info

A super simple web scraper that mimicks a browsing session by saving cookies and refering URL from previous requests.

Install

$ npm install session-scraper

Usage

var Scraper = require('session-scraper');
 
var scraper = new Scraper();
scraper.get('https://github.com/roryf?tab=repositories').then(function($) {
  var repoUrl = $('.repolist li:first-child h3 a').attr('href');
  var name = $('.repolist li:first-child h3 a').text();
  console.log('Fetching readme for ' + name);
  scraper.get('http://github.com' + repoUrl).then(function($) {
    console.log($('.entry-content').text());
  });
});

/session-scraper/

    Package Sidebar

    Install

    npm i session-scraper

    Weekly Downloads

    0

    Version

    0.0.2

    License

    none

    Last publish

    Collaborators

    • roryf