cata_log_hub.providers.aldi_nord module
- class cata_log_hub.providers.aldi_nord.AldiNord[source]
Bases:
ProviderProvider class for AldiNord catalog.
- uid: str = 'aldi-nord-de'
A unique identifier for this provider class. Must not be changed after definition.
- name: str = 'Aldi-Nord'
The name of this catalog provider.
- description: str = 'Aldi-Nord Angebote'
The user-facing description for this provider
- region
alias of
Germany
- url: str = 'https://www.aldi-nord.de/prospekte/'
The url of this catalog provider
- first_page_number: int = 1
The number of the first page in the providers api
- schedule: str = '0 4 * * *'
The crontab schedule for fetching this provider
- page_url_format = 'https://ipaper.ipapercms.dk/aldi-nord/aldi-aktuell/{valid_since:%Y}/{valid_since:%Y}cw{week_number:02}mopromotionaldi-angebote-ab-montag-{valid_since:%d}-{valid_since:%m}/Image.ashx?PageNumber={page_number}&ImageType=Normal'
- _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.aldi_nord.AldiNordPreview[source]
-
Provider class for AldiNord preview catalog for next week.
- uid: str = 'aldi-nord-de-preview'
A unique identifier for this provider class. Must not be changed after definition.
- name: str = 'Aldi-Nord-Vorschau'
The name of this catalog provider.
- description: str = 'Aldi-Nord 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.