betty.wikipedia module - Betty 0.4.0a4 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.wikipedia module

Fetch information from Wikipedia.

class betty.wikipedia.Image

  Bases: `object`

  An image from Wikimedia Commons.

  __init__(path: Path, media_type: MediaType, title: str, wikimedia_commons_url: str, name: str)
  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

  Bases: `ValueError`

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

class betty.wikipedia.Summary

  Bases: `Localized`

  A Wikipedia page summary.

  __init__(locale: str, name: str, title: str, content: str)
  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.