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

fix: medium.com extractor #724

Open naftalibeder opened 1 year ago

naftalibeder commented 1 year ago

This improves the content selector on medium.com to choose the correct article element (of several), and adds a utility function for checking parts of the content not at the beginning of the article.

(On Medium and presumably many other sites, the first few paragraphs are sometimes structured separately from the rest of the article, making a test of only the first few extracted words potentially generate a false positive.)