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

Namespaces

namespace  __main__
 
namespace  base
 
namespace  html
 
namespace  rss
 

Functions

list[Fetcher] load_fetchers (Path path, bool include_disabled=False)
 

Detailed Description

Fetchers: JSON config in, Article objects out.

    from uninews.config import PUBLISHERS_DIR
    from uninews.fetchers import load_fetchers

    for fetcher in load_fetchers(PUBLISHERS_DIR):
        articles = fetcher.fetch()

Function Documentation

◆ load_fetchers()

list[Fetcher] uninews.fetchers.load_fetchers ( Path  path,
bool   include_disabled = False 
)
Load one JSON file, or every *.json under a directory.

Sources (or whole files) marked "enabled": false are skipped, so a site
that blocks us can be parked without deleting its config.