berhoel.imdb_extract package

Extract series information from the IMDB web page.

class berhoel.imdb_extract.IMDBEntry(season: int, href_text: str, href: str, desc: str)[source]

Bases: object

Handle IMDB episodes information for TV series.

line = 2
TITLE_MATCH = re.compile('S(?P<season>\\d+)\\.E(?P<episode>\\d+) (?P<title>.+)')
__init__(season: int, href_text: str, href: str, desc: str)[source]

Initialize class instance.

list() tuple[source]

Return information list.

__lt__(other: object) bool[source]

Return if instance less than or equal other.

__le__(other: object) bool[source]

Return if instance less than other.

__eq__(other: object) bool[source]

Return if instance is equal other.

__ne__(other: object) bool[source]

Return if instance is not equal other.

__gt__(other: object) bool[source]

Return if instance is greater than other.

__ge__(other: object) bool[source]

Return if instance is greater or equal than other.

class berhoel.imdb_extract.IMDBInfo(args: Namespace)[source]

Bases: object

Process html page from IMDB.

__init__(args: Namespace)[source]

Initialize instance.

__del__() None[source]

Cleuup.

get_url(url: Path | str) str[source]

Return preprocessed URL.

__call__() None[source]

Process data.

process_data() None[source]

Generate the csv file.

get_series() str[source]

Get Series title.

berhoel.imdb_extract.get_parser() ArgumentParser[source]

Create CLI parser.

berhoel.imdb_extract.main() None[source]

Main program.

Submodules

berhoel.imdb_extract.unicodewriter module

Write UTF-8 CSV files.