UniNews
University news from Greek and international universities in one place
Loading...
Searching...
No Matches
uninews.fetchers.html Namespace Reference

Classes

class  HtmlFetcher
 

Functions

Tag|None select_first (Tag item, str selector)
 
tuple[str,...] split_selectors (str selector)
 

Detailed Description

Generic scraper for list pages, driven by CSS selectors from JSON.

Function Documentation

◆ select_first()

Tag | None uninews.fetchers.html.select_first ( Tag  item,
str  selector 
)
Try each comma-separated selector in order; return the first match.

◆ split_selectors()

tuple[str, ...] uninews.fetchers.html.split_selectors ( str  selector)
Split "a, b" into ("a", "b"), ignoring commas inside (), [] or quotes.