postlight / parser

📜 Extract meaningful content from the chaos of a web page
https://reader.postlight.com
Apache License 2.0
5.42k stars 445 forks source link

Way to get text and html using single network call #741

Open mahetakaushik opened 1 year ago

mahetakaushik commented 1 year ago

Expected Behavior

Mercury.parse(url, { contentType: 'text\html' }).then(result => console.log(result) );

Output:-

{... ,contant: {text:"this is sample text",html:"<body>this is sample text</body>"}

Current Behavior

Mercury.parse(url, { contentType: 'text' }).then(result => console.log(result) );

Output:-

{... ,contant: "this is sample text"} will only give text as content value.

Detailed Description

Is there any way in which I can pass both text and html as contentType at a same time with only single network call?