Skip to content

Commit

Permalink
fix hotel page test url to match new format
Browse files Browse the repository at this point in the history
  • Loading branch information
Granitosaurus committed Jun 27, 2023
1 parent 66713fa commit 02b3983
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions bookingcom-scraper/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ async def run():
bookingcom.BASE_CONFIG["cache"] = True
print("running Booking.com example scrapes and saving results to ./results directory")

# result_search = await bookingcom.scrape_search(
# query="Malta",
# checkin=TODAY,
# checkout=WEEK_FROM_NOW,
# max_pages=2
# )
# output.joinpath("search.json").write_text(json.dumps(result_search, indent=2, ensure_ascii=False))
result_search = await bookingcom.scrape_search(
query="Malta",
checkin=TODAY,
checkout=WEEK_FROM_NOW,
max_pages=2
)
output.joinpath("search.json").write_text(json.dumps(result_search, indent=2, ensure_ascii=False))

bookingcom.BASE_CONFIG["cache"] = False
result_hotel = await bookingcom.scrape_hotel(
"https://www.booking.com/hotel/gb/gardencourthotel.html",
"https://www.booking.com/hotel/gb/gardencourthotel.en-gb.html",
checkin=WEEK_FROM_NOW,
price_n_days=7,
)
Expand Down
2 changes: 1 addition & 1 deletion bookingcom-scraper/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def test_search_scraping():
async def test_hotel_scraping():
bookingcom.BASE_CONFIG["cache"] = False
item = await bookingcom.scrape_hotel(
"https://www.booking.com/hotel/gb/gardencourthotel.html",
"https://www.booking.com/hotel/gb/gardencourthotel.en-gb.html",
checkin=WEEK_FROM_NOW,
price_n_days=7,
)
Expand Down

0 comments on commit 02b3983

Please sign in to comment.