mobile_scraper library

Flutter Scrapper - A lightweight HTML scraper designed specifically for Flutter mobile (Android/iOS) apps.

This library provides a simple way to fetch and parse text content from public websites without requiring a backend or heavy dependencies. It works 100% on-device and is optimized for mobile platforms only.

Classes

CacheConfig
Cache configuration options
CacheEntry
Represents a cached entry
CacheManager
Simple in-memory and persistent cache manager for scraped content
CacheStats
Cache statistics
ContentFormatter
Content formatter that provides clean, formatted text from HTML
MobileScraper
A lightweight HTML scraper designed specifically for Flutter mobile apps. Works only on Android and iOS platforms.
OpenGraphData
Open Graph metadata
RegexBasedRequest
Data model for regex-based scraping parameters
RetryConfig
Configuration for retry behavior
ScraperConfig
Configuration options for the MobileScraper
ScrapeRequest
Data model representing a web scraping request
ScrapeResult
Data model representing the result of a web scraping operation
ScraperViewModel
ViewModel for managing web scraping operations and UI state
SmartContent
Represents extracted content from a webpage
SmartExtractor
Smart content extractor that uses multiple fallback strategies
TagBasedRequest
Data model for tag-based scraping parameters

Enums

ContentFormat
Content formatting options
ScrapeRequestType
Enum for scrape request types
ScrapeType
Enum representing different types of scraping operations

Exceptions / Errors

ContentTooLargeException
Exception thrown when content is too large
InvalidParameterException
Exception thrown when invalid parameters are provided
NetworkException
Exception thrown when there's a network-related error
ParseException
Exception thrown when parsing fails
ScraperException
Base exception class for all scraper-related errors
ScraperNotInitializedException
Exception thrown when the scraper is not properly initialized
TimeoutException
Exception thrown when a timeout occurs
UnsupportedPlatformException
Exception thrown when trying to use the scraper on an unsupported platform