GitXplorerGitXplorer
m

x-ray-crawler

public
44 stars
21 forks
15 issues

Commits

List of commits on branch master.
Verified
95f55530f318bb4b64926ec249e45b16071ef79a

Merge pull request #18 from matthewmueller/dependabot/npm_and_yarn/y18n-3.2.2

IIlshidur committed 4 years ago
Verified
e7f87f947b79d94dd4f87e44d9c0d37cd8979e7a

Bump y18n from 3.2.1 to 3.2.2

ddependabot[bot] committed 4 years ago
Verified
f11bbd4f618635bbdbbd7bd8cb6193406c989005

Merge pull request #16 from matthewmueller/dependabot/npm_and_yarn/lodash-4.17.20

IIlshidur committed 4 years ago
Verified
79f62eb5da883bb7586d82b4f143c71081e995d3

Bump lodash from 4.17.11 to 4.17.20

ddependabot[bot] committed 4 years ago
Verified
65ed426c2746c1f342f94261e0b45ce2f0ad5be9

Merge pull request #13 from joaobarbosa/remove-duplicated-driver-fn

IIlshidur committed 4 years ago
Unverified
2841e762dd632e41defe93366055f86accbcd735

remove duplicated driver fn

committed 5 years ago

README

The README file for this repository.

x-ray Crawler

Friendly web crawler for x-ray.

Features

  • Extensible drivers
  • Request and response hooks
  • Rate limiting
  • Delayed requests
  • Concurrency support
  • Request timeout
  • Total request limiting

Example

function http(ctx, fn) {
  superagent.get(ctx.url, fn)
}

var crawl = Crawler(http)
  .throttle(3, '1s')
  .delay('1s', '10s')
  .concurrency(2)
  .limit(20)

crawl('http://lapwinglabs.com', function(err, ctx) {
  if (err) throw err
  console.log('status code: %s', ctx.status)
  console.log('status body: %s', ctx.body)
})

Installation

npm install x-ray-crawler

API

Coming Soon.

Test

Note: Work in progress

npm test

License

(The MIT License)

Copyright (c) 2015 Matthew Mueller matt@lapwinglabs.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.