crawler-3t
v0.0.11
Published
Phâm tích html
Downloads
5
Maintainers
Readme
Crawler 3T
Đây là thư viện dùng để bóc tách dữ liệu html
Installation
npm install crawler-3t
Usage
Class ModelMongoose
- mod_sources
- name_index
- SourcesNews
- Articles
- mod_baogom
- name_index
- mod_acticles
- mod_links
- mod_categories
Class HtmlParser
- GetHtmlDoc
body: html
$: jquery
GetHtmlDoc(url,function(error, body, $));
Class HtmlExtract
- getTitle
var title = getTitle($);
- getDesc
var description = getDesc($);
- getImage
var url_image = getImage($);
Class ReadRss
- getListFeed
getListFeed(url_rss,function(error,list_feed));
- getListFeedByBodyXml
getListFeedByBodyXml(bodyXml,function(error,list_feed));
UploadImage
var UploadImage = require('crawler-3t').UploadImage;
var img_url = 'https://s.aolcdn.com/hss/storage/midas/8935b712fc16c493a66b57c8b5ec7f03/203531071/google-translate-ai-2016-03-11-01.jpg';
UploadImage.Upload_Postimage_Org(img_url, function(data) {
console.log(data);
});