Exception: Html2rss::AutoSource::Scraper::NoScraperFound
- Defined in:
- lib/html2rss/auto_source/scraper.rb
Overview
Error raised when no suitable scraper is found.
Constant Summary collapse
- CATEGORY_MESSAGES =
Surface diagnostics shared with NoFeedItemsExtracted (one string home).
{ blocked_surface: 'blocked surface likely (anti-bot or interstitial). ' \ 'Target a direct listing URL, configure BOTASAURUS_SCRAPER_URL, ' \ 'or run from an environment that can complete anti-bot checks.', app_shell: 'app-shell surface detected (client-rendered page with little or no ' \ 'server-rendered article HTML). Configure BOTASAURUS_SCRAPER_URL or target a direct ' \ 'listing/update URL instead of a homepage or shell entrypoint.', unsupported_surface: 'unsupported extraction surface for auto mode. ' \ 'Try a direct listing/changelog/category URL, ' \ 'or use explicit selectors in a feed config.' }.freeze
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
Instance Method Summary collapse
-
#initialize(message = nil, category: :unsupported_surface) ⇒ NoScraperFound
constructor
A new instance of NoScraperFound.
Constructor Details
#initialize(message = nil, category: :unsupported_surface) ⇒ NoScraperFound
Returns a new instance of NoScraperFound.
59 60 61 62 63 |
# File 'lib/html2rss/auto_source/scraper.rb', line 59 def initialize( = nil, category: :unsupported_surface) validate_category!(category) @category = category super( || "No scrapers found: #{CATEGORY_MESSAGES.fetch(@category)}") end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
65 66 67 |
# File 'lib/html2rss/auto_source/scraper.rb', line 65 def category @category end |