|
|
@@ -261,7 +261,7 @@ class _AirbnbClient(ServiceClientBase):
|
|
|
referer = f'https://www.airbnb.com/multicalendar/{self._listing_id}'
|
|
|
resp = await self._gql('getDLSHostCalendar', _HASHES['getDLSHostCalendar'], variables, referer)
|
|
|
section = (
|
|
|
- resp.get('data', {}).get('presentation', {})
|
|
|
+ (resp.get('data') or {}).get('presentation', {})
|
|
|
.get('hostCalendar', {}).get('sections', {})
|
|
|
.get('calendarGridViewSection')
|
|
|
) or {}
|
|
|
@@ -468,7 +468,7 @@ class _AirbnbClient(ServiceClientBase):
|
|
|
_log.warning('airbnb: StayHostingDetailsQuery timed out for %s — skipping', code)
|
|
|
return {}
|
|
|
det = (
|
|
|
- resp.get('data', {}).get('presentation', {})
|
|
|
+ (resp.get('data') or {}).get('presentation', {})
|
|
|
.get('hostingDetails', {}).get('stayHostingDetails', {})
|
|
|
)
|
|
|
self._details.set(code, det)
|
|
|
@@ -531,7 +531,7 @@ class _AirbnbClient(ServiceClientBase):
|
|
|
},
|
|
|
f'https://www.airbnb.com/messages/{thread_id}',
|
|
|
)
|
|
|
- thread_data = resp.get('data', {}).get('threadData', {})
|
|
|
+ thread_data = (resp.get('data') or {}).get('threadData', {})
|
|
|
participants: dict[str, str] = {}
|
|
|
for edge in thread_data.get('participants', {}).get('edges', []):
|
|
|
node = edge.get('node', {})
|
|
|
@@ -586,7 +586,7 @@ class _AirbnbClient(ServiceClientBase):
|
|
|
f'https://www.airbnb.com/multicalendar/{self._listing_id}',
|
|
|
)
|
|
|
tips = (
|
|
|
- resp.get('data', {}).get('presentation', {})
|
|
|
+ (resp.get('data') or {}).get('presentation', {})
|
|
|
.get('pricingGuidance', {}).get('nightlyPriceTip', {})
|
|
|
.get('nightlyPriceTip', {}).get('discretePriceTips', [])
|
|
|
)
|
|
|
@@ -612,7 +612,7 @@ class _AirbnbClient(ServiceClientBase):
|
|
|
f'https://www.airbnb.com/multicalendar/{self._listing_id}',
|
|
|
)
|
|
|
events = (
|
|
|
- resp.get('data', {}).get('presentation', {})
|
|
|
+ (resp.get('data') or {}).get('presentation', {})
|
|
|
.get('hostCalendarListingEvents', {}).get('events', [])
|
|
|
)
|
|
|
return [
|