How does the Evernote Web Clipper plugin or Announce plugin get only the corresponding article / message / part of the page content? Here is a screenshot from the evernote plugin:

No matter which website you visit, which is completely different from other layouts, they can always get you an article / article / content on a page.
Each website has different layouts, some of them have a sidebar, some not, different tags for the main / article / part of the content, some use <article>
or <section>
for other HTML5 <h1> > <p>
, some use <h2> > <p>
and others are not used at all. Thus, there are various combinations of tags, as well as site layouts.
Can someone suggest a solution for getting the main article article / post / content via Javascript or PHP?
source share