bodhiprice / meta-scraper

A utility for grabbing the meta tags from a web page.
https://www.npmjs.com/package/meta-scraper
6 stars 5 forks source link

extract description two step #4

Closed stevemoncada closed 7 years ago

stevemoncada commented 7 years ago

the filter function for descriptions assumed that the metaArray would contain at least one description, which is not always the case. pull description in two steps to guard against sites missing descriptions in meta elements.

example: http://hosted.ap.org/dynamic/stories/A/APFN_US_TRUMP_IMMIGRATION_AROL-?SITE=AP