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

cheerio-httpcli

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheerio-httpcli - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 0.3.8 (2015-11-21)
* 0.3.7の修正がNode.js 0.10系だと不十分だったので再度修正
# 0.3.7 (2015-11-15)

@@ -2,0 +6,0 @@

2

lib/client.js

@@ -305,3 +305,3 @@ /*eslint key-spacing:0, no-undefined:0*/

};
if (Object.keys(param || {}).length > 0) {
if ((typeof param === 'object' && Object.keys(param).length > 0) || (param || '').length > 0) {
options.param[(method === 'GET') ? 'qs' : 'form'] = param;

@@ -308,0 +308,0 @@ }

{
"name": "cheerio-httpcli",
"version": "0.3.7",
"version": "0.3.8",
"description": "http client module with cheerio & iconv(-lite) & promise",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -245,2 +245,22 @@ # cheerio-httpcli - Node.js用WEBスクレイピングモジュール

### maxDataSize
`fetch()`などで受信するデータの限界量を数値(バイト数)で指定します。この値を超えるサイズを受信した段階でエラーが発生します。ユーザーから入力されたURLを解析する用途などにおいて、不用意に大きいデータを読み込んでしまい回線を占有する可能性がある場合に指定しておいた方が良いでしょう。
デフォルトは`null`(制限なし)です。
```js
var client = require('cheerio-httpcli');
// 受信料制限を1MBに指定
client.maxDataSize = 1024 * 1024;
// 1MB以上ののHTMLを指定
client.fetch('http://big.large.huge/data.html', function (err, $, res, body) {
console.log(err.message); // => 'data size limit over'
});
```
なお、maxDataSizeを超えた場合は途中まで受信したデータは破棄されます。
### debug

@@ -247,0 +267,0 @@

/*eslint-env mocha*/
/*eslint no-invalid-this:0, no-undefined:0*/
/*eslint no-invalid-this:0*/
var assert = require('power-assert');

@@ -95,3 +95,3 @@ var helper = require('./_helper');

url: url,
encoding: undefined
encoding: null
});

@@ -108,3 +108,3 @@ assert($('title').text() === '1');

url: url,
encoding: undefined
encoding: null
});

@@ -111,0 +111,0 @@ assert($('title').text() !== '1');

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