New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crawler

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crawler - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

61

package.json
{
"name": "crawler",
"version": "2.0.0",
"description": "Crawler is a ready-to-use web spider that works with proxies, asynchrony, rate limit, configurable request pools, jQuery, and seamless HTTP/2 support.",
"version": "2.0.1",
"description": "Crawler is a ready-to-use web spider that works with proxies, asynchrony, rate limit, configurable request pools, jQuery, and HTTP/2 support.",
"repository": {

@@ -12,3 +12,4 @@ "type": "git",

"build": "tsc",
"test": "mocha"
"test": "ava",
"cover": "c8 ava"
},

@@ -28,9 +29,9 @@ "engines": {

"http",
"https",
"http2",
"got",
"https",
"http2",
"got",
"request",
"url",
"network",
"gzip"
"url",
"network",
"gzip"
],

@@ -40,3 +41,3 @@ "license": "MIT",

"cheerio": "1.0.0-rc.12",
"got": "^14.4.0",
"got": "^14.4.1",
"hpagent": "^1.2.0",

@@ -46,27 +47,39 @@ "http2-wrapper": "^2.2.1",

"seenreq": "^3.0.0",
"tslog": "^4.9.2"
"sinon": "^18.0.0",
"tslog": "^4.9.3"
},
"devDependencies": {
"@eslint/js": "^9.4.0",
"@eslint/js": "^9.5.0",
"@types/got": "^9.6.12",
"@types/node": "^20.14.2",
"chai": "^5.1.1",
"@types/node": "^20.14.7",
"ava": "^6.1.3",
"c8": "^10.1.2",
"eslint": "~9.4.0",
"globals": "^15.3.0",
"mocha": "^10.4.0",
"mocha-testdata": "^1.2.0",
"globals": "^15.6.0",
"nock": "^13.5.4",
"sinon": "^17.0.1",
"tough-cookie": "^4.1.4",
"tsx": "^4.11.2",
"typescript": "^5.4.5",
"tsx": "^4.15.7",
"typescript": "^5.5.2",
"typescript-eslint": "8.0.0-alpha.27"
},
"mocha": {
"ava": {
"files": [
"test/**/*.js"
"test/*.js",
"!test/*test.js"
],
"timeout": 15000,
"exit": true
"timeout": "20s",
"extensions": {
"js": true
},
"failFast": true,
"verbose": true
},
"c8": {
"reporter": [
"lcov",
"html",
"text"
],
"clean": true
}
}

@@ -7,6 +7,7 @@ <p align="center">

#
------
[![npm package](https://nodei.co/npm/crawler.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/crawler/v/2.0.0-beta.5)
[![npm package](https://nodei.co/npm/crawler.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/crawler/v/2.0.0)
[![CircleCI](https://circleci.com/gh/bda-research/node-crawler/tree/master.svg?style=svg)](https://circleci.com/gh/bda-research/node-crawler/tree/master)
[![NPM download][download-image]][download-url]

@@ -36,4 +37,6 @@ [![Package Quality][quality-image]][quality-url]

Requires Node.js 18 or above
**IMPORTANT:** If you are using a Linux OS, we currently recommend sticking with Node.js version 18 for the time being, rather than opting for higher versions (even if some dependencies suggest 20 or later). Our unit tests have encountered stability issues on Linux with higher versions of Node.js, which may be caused by more profound underlying reasons. However, at present, we do not have the resources to address these issues.
Requires Node.js 18 or above.
**IMPORTANT:** If you are using a Linux OS, we currently recommend sticking with **Node.js version 18** for the time being, rather than opting for higher versions (even if some dependencies suggest 20 or later). Our unit tests have encountered stability issues on Linux with higher versions of Node.js, which may be caused by more profound underlying reasons. However, at present, we do not have the resources to address these issues.
```sh

@@ -47,29 +50,2 @@ $ npm install crawler

### Direct request
Support both Promise and callback
```js
import Crawler from "crawler";
const crawler = new Crawler();
// When using directly "send", the preRequest won't be called and the "Event:request" won't be triggered
const response = await crawler.send("https://github.com/");
console.log(response.options);
// console.log(response.body);
crawler.send({
url: "https://github.com/",
// When calling `send`, `callback` must be defined explicitly, with two arguments `error` and `response`
callback: (error, response) => {
if (error) {
console.error(error);
} else {
console.log("Hello World!");
}
},
});
```
### Execute asynchronously via custom options

@@ -233,4 +209,31 @@

### Direct request
Support both Promise and callback
```js
import Crawler from "crawler";
const crawler = new Crawler();
// When using directly "send", the preRequest won't be called and the "Event:request" won't be triggered
const response = await crawler.send("https://github.com/");
console.log(response.options);
// console.log(response.body);
crawler.send({
url: "https://github.com/",
// When calling `send`, `callback` must be defined explicitly, with two arguments `error` and `response`
callback: (error, response) => {
if (error) {
console.error(error);
} else {
console.log("Hello World!");
}
},
});
```
###
# Table

@@ -237,0 +240,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc