Skip to content

telegram_news_scraper

TelegramNewsScraper

TelegramNewsScraper(telegram_scraper: IScraper, news_scraper: IScraper = None, text_scraper: IScraper = None, **kwargs: Any)

Bases: MultiScraper

A multi-scraper that processes Telegram message links, news content, and text content.

This scraper uses a dedicated telegram_scraper for Telegram links, a news_scraper for standard news links, and a text_scraper as fallback. If these are not provided, default configurations (NewsScraper, TextScraper) are used.

Parameters:

Name Type Description Default
telegram_scraper IScraper

For processing Telegram links.

required
news_scraper IScraper

Scraper instance for processing news links. Defaults to NewsScraper() if not provided.

None
text_scraper IScraper

Fallback for text-based scraping. Defaults to TextScraper if not provided.

None
**kwargs Any

Additional keyword arguments for MultiScraper.

{}

Raises:

Type Description
ValueError

If telegram_scraper is None.