swissvotes.external_resources.posters

Module Contents

Classes

Posters

MfgPosters

SaPosters

class swissvotes.external_resources.posters.Posters[source]
yea_attribute: str[source]
nay_attribute: str[source]
yea_img_attribute: str[source]
nay_img_attribute: str[source]
headers: dict[str, str][source]
abstract meta_data_url(url: str) str[source]
parse_xml(response: requests.Response) str[source]
_fetch(bfs_number: decimal.Decimal, poster_urls: str | None, image_urls: dict[str, Any]) tuple[dict[str, str], int, int, int, set[decimal.Decimal]][source]
fetch(session: sqlalchemy.orm.Session) tuple[int, int, int, set[decimal.Decimal]][source]

Returns a dictionary with changed image urls as compared to the image_urls dictionary and if changed and how many added/updated.

class swissvotes.external_resources.posters.MfgPosters(api_key: str)[source]

Bases: Posters

meta_data_url(url: str) str[source]
class swissvotes.external_resources.posters.SaPosters[source]

Bases: Posters

meta_data_url(url: str) str[source]