crawler-html-3t
Advanced tools
Comparing version 1.0.2 to 1.0.3
'use strict' | ||
module.exports = { | ||
Moduls: require('./models/index'), | ||
ModelMongoose: require('./models/index'), | ||
HtmlParser: require('./lib/HtmlParser'), | ||
HtmlExtract: require('./lib/HtmlExtract'), | ||
ReadRss: require('./lib/ReadRss'), | ||
} |
@@ -5,3 +5,3 @@ { | ||
"description": "phan tich html trich xuat du lieu", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"repository": { | ||
@@ -15,3 +15,3 @@ "url": "" | ||
"ReadRss", | ||
"Moduls" | ||
"ModelMongoose" | ||
], | ||
@@ -23,6 +23,6 @@ "maintainers": [{ | ||
"dependencies": { | ||
"dependencies": { | ||
"crawler": "*", | ||
"feed-read": "*" | ||
"feed-read": "*" | ||
}, | ||
@@ -29,0 +29,0 @@ |
@@ -11,9 +11,72 @@ Crawler Html 3T | ||
## Usage | ||
### Class `Models` | ||
### Class `ModelMongoose` | ||
1. **mod_sources** | ||
- name_index | ||
- SourcesNews | ||
- Articles | ||
2. **mod_baogom** | ||
- name_index | ||
- mod_acticles | ||
- mod_links | ||
- mod_categories | ||
### Class `HtmlParser` | ||
1. GetHtmlDoc | ||
- body: html | ||
- $: jquery | ||
```javascript | ||
GetHtmlDoc(url,function(error, body, $)); | ||
``` | ||
### Class `HtmlExtract` | ||
1. getTitle | ||
```javascript | ||
var title = getTitle($); | ||
``` | ||
2. getDesc | ||
```javascript | ||
var description = getDesc($); | ||
``` | ||
3. getImage | ||
```javascript | ||
var url_image = getImage($); | ||
``` | ||
### Class `ReadRss` | ||
1. getListFeed | ||
## Release History | ||
```javascript | ||
* 1.0.0 Initial release | ||
getListFeed(url_rss,function(error,list_feed)); | ||
``` | ||
2. getListFeedByBodyXml | ||
```javascript | ||
getListFeedByBodyXml(bodyXml,function(error,list_feed)); | ||
``` |
11444
82