cata_log_hub.providers.netto module
- class cata_log_hub.providers.netto.Netto[source]
Bases:
ProviderProvider class for Netto catalog.
- uid: str = 'netto-de'
A unique identifier for this provider class. Must not be changed after definition.
- name: str = 'Netto'
The name of this catalog provider.
- description: str = 'Netto Angebote'
The user-facing description for this provider
- region
alias of
Germany
- url: str = 'https://www.netto-online.de/ueber-netto/Online-Prospekte.chtm'
The url of this catalog provider
- first_page_number: int = 0
The number of the first page in the providers api
- schedule: str = '0 4 * * 1-6'
The crontab schedule for fetching this provider
- _get_catalog_data()[source]
Get and store the data for this providers catalog. Can be passed if no data beside the pagenumber is required to fetch pages from the provider.
- Return type:
- _get_page(page_number)[source]
Get one page from the provider.
- Parameters:
page_number (
PageNumber) – The number of the page in the numbering of the provider.- Return type:
- Returns:
The downloaded page in bytes.
- _get_valid_since()[source]
Get the datetime since which this providers catalog is valid.
- Return type:
- _get_valid_until()[source]
Get the datetime until which this providers catalog is valid.
- Return type:
- class cata_log_hub.providers.netto.NettoPreview[source]
-
Provider class for Netto preview catalog for next week.
- uid: str = 'netto-de-preview'
A unique identifier for this provider class. Must not be changed after definition.
- name: str = 'Netto-Vorschau'
The name of this catalog provider.
- description: str = 'Netto Angebote nächste Woche'
The user-facing description for this provider
- schedule: str = '0 4 * * *'
The crontab schedule for fetching this provider
- _get_preview_timedelta()[source]
Get the dynamic timedelta between the relevant datetime and the relevant datetime of the preview.
- Return type:
- Returns:
The preview timedelta.