grada.cz scrapper

This module is used to download metadata from grada.cz.

harvester.scrappers.grada_cz._parse_alt_title(html_chunk)[source]

Parse title from alternative location if not found where it should be.

Parameters:html_chunk (obj) – HTMLElement containing slice of the page with details.
Returns:str – Book’s title.
harvester.scrappers.grada_cz._parse_title_url(html_chunk)[source]

Parse title/name of the book and URL of the book.

Parameters:html_chunk (obj) – HTMLElement containing slice of the page with details.
Returns:tuple – (title, url), both as strings.
harvester.scrappers.grada_cz._parse_subtitle(html_chunk)[source]

Parse subtitle of the book.

Parameters:html_chunk (obj) – HTMLElement containing slice of the page with details.
Returns:str/None – Subtitle or None if subtitle wasn’t found.
harvester.scrappers.grada_cz._parse_authors(html_chunk)[source]

Parse authors of the book.

Parameters:html_chunk (obj) – HTMLElement containing slice of the page with details.
Returns:list – List of structures.Author objects. Blank if no author found.
harvester.scrappers.grada_cz._parse_description(html_chunk)[source]

Parse description of the book.

Parameters:html_chunk (obj) – HTMLElement containing slice of the page with details.
Returns:str/None – Details as string with currency or None if not found.
harvester.scrappers.grada_cz._parse_format_pages_isbn(html_chunk)[source]

Parse format, number of pages and ISBN.

Parameters:html_chunk (obj) – HTMLElement containing slice of the page with details.
Returns:tuple – (format, pages, isbn), all as string.
harvester.scrappers.grada_cz._parse_price(html_chunk)[source]

Parse price of the book.

Parameters:html_chunk (obj) – HTMLElement containing slice of the page with details.
Returns:str/None – Price as string with currency or None if not found.
harvester.scrappers.grada_cz._process_book(html_chunk)[source]

Parse available informations about book from the book details page.

Parameters:html_chunk (obj) – HTMLElement containing slice of the page with details.
Returns:objstructures.Publication instance with book details.
harvester.scrappers.grada_cz.get_publications()[source]

Get list of publication offered by grada.cz.

Returns:list – List of Publication objects.
harvester.scrappers.grada_cz.self_test()[source]

Perform basic selftest.

Returns:True – When everything is ok.
Raises:AssertionError – When there is some problem.

Previous topic

cpress.cz scrapper

Next topic

zonerpress_cz scrapper

This Page