blogparser
v0.0.1
Published
blog parser
Readme
BLOGPARSER MODULE
Introduction
This Module is global Blog Parser Module.
if you are offer BLOG URL, Module will parse BLOG and serve {title, Content} Object.
This Parser support NAVER, TISTORY, DAUM, MEDIUM, BLOGGER, WORDPRESS BLOG and support JS Promise Pattern only.(25/02/2019)
HOW TO USE(except common parser)
ModuleName.parse(URL, blogType, Options)
function parameters it is:
URLparameter must need correct URL.blogTypeparameter is Optional. but if URL hasn't blog brand name(ex. wordpress), you need serve suitable blog type. and also Most IDE (at least VSCODE) support BLOGTYPE variable.Optionsparameter is useCustomParseFunction Only.
for Example)
const parser = require('./parser'); //Module Import
parser.parse(URL, parser.BLOGTYPE).then(
//TODO
)
OR
let a = parser.parse(URL, parser.BLOGTYPE);
a.then(
//TODO
)HOW TO USE(common parser)
commonParser is made for sites that parser is not working.
parse method is same the other parser but options parameter is need to working.
options parameter have title, contents, remove properties and all property have attribute–value pairs named value, type.
example)
const tagoption = {
title: {
value: tagName,
type: tagtype,
},
content: {
value: tagName,
type: tagtype,
},
remove: [{
value: tagName,
type: tagtype,
}],
};
This parameter is:
valueproperty is what you want parse ID or classNametypeproperty is unique HTML attribute name(id, class, custom)removeproperty is what you want remove attribute
EvenyThing Ask & Bug Report & Support Module : [GITHUB]
Thank You for using Module!
