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)
ModuleName.parse(URL, blogType, Options)
function parameters it is:
URL
parameter must need correct URL.blogType
parameter 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.Options
parameter is useCustomParse
Function 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
)
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:
value
property is what you want parse ID or classNametype
property is unique HTML attribute name(id, class, custom)remove
property is what you want remove attribute
EvenyThing Ask & Bug Report & Support Module : [GITHUB]
Thank You for using Module!