cheerio-httpcli
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -18,3 +18,3 @@ /*jshint node:true, forin:false */ | ||
var reHead = new RegExp('<head[\\s>]([\\s\\S]*?)<\\/head>', 'i'); | ||
var reCharset = new RegExp('<meta[^>]*[\\s;]+charset\\s*=\\s*["\']?([\\w\\-_]+)["\']', 'i'); | ||
var reCharset = new RegExp('<meta[^>]*[\\s;]+charset\\s*=\\s*["\']?([\\w\\-_]+)["\']?', 'i'); | ||
@@ -21,0 +21,0 @@ /** |
{ | ||
"name": "cheerio-httpcli", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "html client module with cheerio & iconv", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -55,2 +55,6 @@ # cheerio-httpcli - iconvによる文字コード変換とcheerioによるHTMLパースを組み込んだNode.js用HTTPクライアントモジュール | ||
### 0.1.1 (2013-04-11) | ||
* charset=xxxというようにダブル(or シングル)クォーテーションがない場合に文字コードの判定に失敗するケースを修正 | ||
### 0.1.0 (2013-03-18) | ||
@@ -57,0 +61,0 @@ |
@@ -68,3 +68,3 @@ var vows = require('vows'); | ||
'it succeeded in http get, convert to utf-8, parse html': function (topic) { | ||
assert.equal(topic('#contact-link').text(), 'お問い合わせ'); | ||
assert.equal(topic('#box_info').text().trim(), 'お問い合わせ'); | ||
} | ||
@@ -88,2 +88,10 @@ }, | ||
}, | ||
'encoding: euc-jp(html5)': { | ||
topic: function () { | ||
cli.fetch('http://d.hatena.ne.jp/hotkeyword', this.callback); | ||
}, | ||
'it succeeded in http get, convert to utf-8, parse html': function (topic) { | ||
assert.equal(topic('h1').text(), '注目キーワード'); | ||
} | ||
}, | ||
'encoding: iso-2022-jp': { | ||
@@ -90,0 +98,0 @@ topic: function () { |
Sorry, the diff of this file is not supported yet
11544
229
68