From 64a06e0c873b4f6429e130c66056a39d72c5c575 Mon Sep 17 00:00:00 2001 From: Roland Angerer Date: Wed, 19 Jun 2013 11:31:31 +0200 Subject: added cleanup option for nodes fetched via xpath --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index ed7365b..7c529ab 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,8 @@ A configuration looks like this: }, "blog.beetlebum.de": { "type": "xpath", - "xpath": "div[@class='entry-content']" + "xpath": "div[@class='entry-content']", + "cleanup": [ "header", "footer" ], } } @@ -62,6 +63,8 @@ The *array key* is part of the URL of the article links(!). You'll notice the `g The **xpath** value is the actual Xpath-element to fetch from the linked page. Omit the leading `//` - they will get prepended automatically. +If **type** was set to `xpath' there is an additional option **cleanup** available. Its an array of Xpath-elements (relative to the fetched node) to remove from the fetched node. Omit the leading `//` - they will get prepended automatically. + **force_charset** allows to override automatic charset detection. If it is omitted, the charset will be parsed from the HTTP headers or loadHTML() will decide on its own. -- cgit v1.3.1 From 9c8da97a1ab8eca80c8b579816e4d287cff6f840 Mon Sep 17 00:00:00 2001 From: Roland Angerer Date: Wed, 19 Jun 2013 16:47:02 +0200 Subject: bugfix: corrected README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 7c529ab..de1a410 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ The *array key* is part of the URL of the article links(!). You'll notice the `g The **xpath** value is the actual Xpath-element to fetch from the linked page. Omit the leading `//` - they will get prepended automatically. -If **type** was set to `xpath' there is an additional option **cleanup** available. Its an array of Xpath-elements (relative to the fetched node) to remove from the fetched node. Omit the leading `//` - they will get prepended automatically. +If **type** was set to `xpath` there is an additional option **cleanup** available. Its an array of Xpath-elements (relative to the fetched node) to remove from the fetched node. Omit the leading `//` - they will get prepended automatically. **force_charset** allows to override automatic charset detection. If it is omitted, the charset will be parsed from the HTTP headers or loadHTML() will decide on its own. -- cgit v1.3.1