|
|
@@ -501,7 +501,17 @@ class _BookingClient:
|
|
|
raw = await self._multipart_post(
|
|
|
f'{_BASE}/fresa/extranet/inventory/fetch', self._monthly_referer(), body
|
|
|
)
|
|
|
- return self._parse_calendar_days(raw)
|
|
|
+ result = self._parse_calendar_days(raw)
|
|
|
+ if not result:
|
|
|
+ _log.warning('Booking.com: empty calendar for %d-%02d; retrying', year, month)
|
|
|
+ await asyncio.sleep(1)
|
|
|
+ raw = await self._multipart_post(
|
|
|
+ f'{_BASE}/fresa/extranet/inventory/fetch', self._monthly_referer(), body
|
|
|
+ )
|
|
|
+ result = self._parse_calendar_days(raw)
|
|
|
+ if not result:
|
|
|
+ _log.warning('Booking.com: still empty calendar for %d-%02d after retry', year, month)
|
|
|
+ return result
|
|
|
|
|
|
async def _get_month_calendar(self, month: int, year: int) -> dict[str, DayInfo]:
|
|
|
key = (month, year)
|