Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion camply/providers/usedirect/usedirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class UseDirectProvider(BaseProvider, ABC):

booking_path_params: bool = True
booking_path: str = "Web/Default.aspx"
booking_path_hash: bool = True

@property
@abstractmethod
Expand Down Expand Up @@ -449,7 +450,10 @@ def _get_available_campsite(
recreation_area = self.usedirect_rec_areas[facility.recreation_area_id]
booking_url = f"{self.campground_url}/{self.booking_path}"
if self.booking_path_params is True:
booking_url = f"{booking_url}#!park/{recreation_area.recreation_area_id}/{facility_id}"
if self.booking_path_hash:
booking_url = f"{booking_url}#!park/{recreation_area.recreation_area_id}/{facility_id}"
else:
booking_url = f"{booking_url}/{recreation_area.recreation_area_id}/{facility_id}"
if unit.UnitCategoryId is None:
unit.UnitCategoryId = -1
if unit.UnitTypeGroupId is None:
Expand Down
2 changes: 2 additions & 0 deletions camply/providers/usedirect/variations.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class ReserveCalifornia(UseDirectProvider):
campground_url = "https://www.reservecalifornia.com"
state_code = "CA"
rdr_path = ""
booking_path = "park"
booking_path_hash = False


class FloridaStateParks(UseDirectProvider):
Expand Down