Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/you21979/node-limit-request-promise
https://github.com/you21979/node-limit-request-promise
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/you21979/node-limit-request-promise
- Owner: you21979
- License: mit
- Created: 2014-10-08T04:37:48.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-22T14:11:25.000Z (almost 8 years ago)
- Last Synced: 2024-09-19T07:40:59.169Z (about 2 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-limit-request-promise
==========================
http request for web scrapingnote
----
This library implements based on request-promiseexample
-------```
var LimitRequestPromise = require('limit-request-promise');
var lp = new LimitRequestPromise(1,1); // option = default limit
// register database
lr.setup([
{
host:'http://www.example.com',max:1000,sec:60
}
]);
lp.req('http://www.yahoo.co.jp').then(console.log); // immediately
lp.req('http://www.yahoo.co.jp').then(console.log); // next timing
lp.req({url:'http://www.google.com'}).then(console.log); // immediately
lp.req({url:'http://www.google.com'}).then(console.log); // next timing
```license
-------
MIT