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: Book’s title. Return type: str
- 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: (title, url), both as strings. Return type: tuple
- 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: Subtitle or None if subtitle wasn’t found. Return type: str/None
Parse authors of the book.
Parameters: html_chunk (obj) – HTMLElement containing slice of the page with details. Returns: List of structures.Author objects. Blank if no author found. Return type: list
- 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: Details as string with currency or None if not found. Return type: str/None
- 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: (format, pages, isbn), all as string. Return type: tuple
- 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: Price as string with currency or None if not found. Return type: str/None
- 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: structures.Publication instance with book details. Return type: obj
- harvester.scrappers.grada_cz.get_publications()[source]¶
Get list of publication offered by grada.cz.
Returns: List of Publication objects. Return type: list