Class: ReadabilityJs::Extended

Inherits:
Object
  • Object
show all
Defined in:
lib/readability_js/extended.rb

Constant Summary collapse

DEFAULT_SELECTOR_BLACKLIST =
[
  ".Article-Partner",
  ".Article-Partner-Text",
  ".Article-Comments-Button",
  "#isl-5-AdCarousel",
  "#isl-10-ArticleComments",
  "*[data-element-tracking-name]",
  "*[aria-label='Anzeige']",
  "nav[aria-label='breadcrumb']",
  "a-video",
  "a-gift",
  "a-collapse",
  "a-opt-in",
  "[data-area='related_articles']",
  "nav[aria-label='Breadcrumb']",
  ".c-inline-teaser-list",
  "[width='1'][height='1']",
  ".go-alink-list",
  "[data-external-selector='related-articles-entries']",
  ".BigBox",
  ".id-Breadcrumb-item",
  ".id-Story-interactionBar",
  "revenue-reel",
  ".id-StoryElement-factBox",
  ".breadcrumb",
  ".teaser",
  ".group-teaserblock__items",
  ".title__kicker",
  "ws-adtag",
  "[data-for='webelement_bio']",
  "[data-for='webelement_citation']",
  "#articleTeaser",
  ".article-produktteaser-container",
  "[x-data='{}']",
  "#komune",
  ".community",
  ".article-head__topline",
  ".article__audioicon",
  ".auplayer",
]

Class Method Summary collapse

Class Method Details

.after_cleanup(result, html) ⇒ Object



49
50
51
52
# File 'lib/readability_js/extended.rb', line 49

def self.after_cleanup(result, html)
  find_and_add_picture result, html
  clean_up_and_enrich_result result
end

.before_cleanup(html, blacklist_selectors: []) ⇒ Object



45
46
47
# File 'lib/readability_js/extended.rb', line 45

def self.before_cleanup(html, blacklist_selectors: [])
  pre_parser html, blacklist_selectors: blacklist_selectors
end