Exceptions

exception mwtp.exceptions.InvalidTitle[source]

Bases: Exception

Umbrella exception for all kinds of exceptions a parser might raise.

exception mwtp.exceptions.TitleContainsHTMLEntity[source]

Bases: InvalidTitle

Raised if the title contains an HTML entity or something that looks like one.

exception mwtp.exceptions.TitleContainsIllegalCharacter[source]

Bases: InvalidTitle

Raised if the title contains illegal characters.

exception mwtp.exceptions.TitleContainsSignatureComponent[source]

Bases: InvalidTitle

Raised if the title contains ~~~.

exception mwtp.exceptions.TitleContainsURLEncodedCharacter[source]

Bases: InvalidTitle

Raised if the title contains a URL-encoded character.

exception mwtp.exceptions.TitleHasRelativePathComponent[source]

Bases: InvalidTitle

Raised if the title contains a relative path component or only consists of either one or two dots.

exception mwtp.exceptions.TitleHasSecondLevelNamespace[source]

Bases: InvalidTitle

Raised if the title is determined to be in the Talk: namespace while also contains a second valid namespace.

exception mwtp.exceptions.TitleIsBlank[source]

Bases: InvalidTitle

Raised if the title contains nothing but whitespaces and/or a leading colon.

exception mwtp.exceptions.TitleIsTooLong[source]

Bases: InvalidTitle

Raised if the title’s length exceed the maximum length of a title.

exception mwtp.exceptions.TitleStartsWithColon[source]

Bases: InvalidTitle

Raised if the page name starts with a colon, or the namespace part starts with more than one colon.