diff --git a/uk_bin_collection/uk_bin_collection/councils/BroxtoweBoroughCouncil.py b/uk_bin_collection/uk_bin_collection/councils/BroxtoweBoroughCouncil.py index 166f7c0246..2487d9cbc0 100644 --- a/uk_bin_collection/uk_bin_collection/councils/BroxtoweBoroughCouncil.py +++ b/uk_bin_collection/uk_bin_collection/councils/BroxtoweBoroughCouncil.py @@ -78,14 +78,15 @@ def parse_data(self, page: str, **kwargs) -> dict: bin_type = cells[0].get_text(strip=True) # Skip header row if bin_type and cells[3] and bin_type != "Bin Type": - collection_date = datetime.strptime( - cells[3].get_text(strip=True), "%A, %d %B %Y" - ) - dict_data = { - "type": bin_type, - "collectionDate": collection_date.strftime(date_format), - } - data["bins"].append(dict_data) + if len(cells[3].get_text(strip=True)) > 0: + collection_date = datetime.strptime( + cells[3].get_text(strip=True), "%A, %d %B %Y" + ) + dict_data = { + "type": bin_type, + "collectionDate": collection_date.strftime(date_format), + } + data["bins"].append(dict_data) data["bins"].sort( key=lambda x: datetime.strptime(