adding musthave and lastXdays

This commit is contained in:
Kadir 2024-03-13 16:21:54 +00:00
parent 36258d877f
commit a9b8d4d630
3 changed files with 9 additions and 18 deletions

View file

@ -16,6 +16,7 @@ params = {
'sortBy': 'distance',
'includeUnavailableProperties': 'false',
'propertyTypes': 'flat',
'mustHave': 'newHome', # added manually later
'dontShow': 'sharedOwnership,retirement',
'minPrice': '150000',
'maxPrice': '500000',

View file

@ -1,17 +0,0 @@
from datetime import datetime, timedelta, timezone
def nextMonday():
"""
I think this function doesnt work when the day is monday itself.
Returns:
_type_: _description_
"""
now = datetime.now(timezone.utc)
days_until_monday = (0 - now.weekday() + 7) % 7
monday = now + timedelta(days=days_until_monday)
monday_9am = monday.replace(hour=9, minute=0, second=0, microsecond=0, tzinfo=timezone.utc)
return monday_9am
if __name__ == '__main__':
print(nextMonday())