betty.wikipedia package

Submodules

Module contents

Fetch information from Wikipedia.

class betty.wikipedia.Image[source]

Bases: object

An image from Wikimedia Commons.

__init__(path: Path, media_type: MediaType, title: str, wikimedia_commons_url: str, name: str)[source]
property media_type: MediaType

The image’s media type.

property name: str

The image’s file name.

property path: Path

The path to the image on disk.

property title: str

The human-readable image title.

property wikimedia_commons_url: str

The URL to the Wikimedia Commons web page for this image.

exception betty.wikipedia.NotAPageError[source]

Bases: ValueError

Raised when a URL does not point to a Wikipedia page.

class betty.wikipedia.Summary[source]

Bases: Localized

A Wikipedia page summary.

__init__(locale: str, name: str, title: str, content: str)[source]
property content: str

The page’s human-readable summary content.

property name: str

The page’s machine name.

property title: str

The page’s human-readable title.

property url: str

The URL to the web page.