prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [Bug]:  Basingstoke and Deane is broken since the 8th of Feb
  ### I Have A Problem With:
  
  A specific source
  
  ### What's Your Problem
  
  The service no longer downloads the waste updates. I tried 1.46 and the master.
  
  ### Source (if relevant)
  
  _No response_
  
  ### Logs
  
  ```Shell
  Logger: waste_collection_schedule.source_shell
  Source: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:136
  integration: waste_collection_schedule (documentation)
  First occurred: 11:26:41 (1 occurrences)
  Last logged: 11:26:41
  
  fetch failed for source Basingstoke and Deane Borough Council: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 134, in fetch entries = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py", line 65, in fetch date=datetime.strptime(date_str, "%A, %d %B %Y").date(), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/_strptime.py", line 554, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/_strptime.py", line 333, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data 'none / unknown' does not match format '%A, %d %B %Y'
  ```
  
  
  ### Relevant Configuration
  
  ```YAML
  waste_collection_schedule:
    sources:
      - name: basingstoke_gov_uk
        args:
          uprn: "1000809XXXX"
        customize:
          - type: Garden
            show: True
          - type: Waste
            show: True
          - type: Recycling
            show: True
          - type: Glass
            show: True
  ```
  
  
  ### Checklist Source Error
  
  - [X] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
  - [X] Checked that the website of your service provider is still working
  - [X] Tested my attributes on the service provider website (if possible)
  - [X] I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on "Redownload" and choose master as version)
  
  ### Checklist Sensor Error
  
  - [X] Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)
  
  ### Required
  
  - [X] I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
  - [X] I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py`
  Content:
  ```
  1 from datetime import datetime
  2 
  3 import requests
  4 import urllib3
  5 from bs4 import BeautifulSoup
  6 from waste_collection_schedule import Collection  # type: ignore[attr-defined]
  7 
  8 # With verify=True the POST fails due to a SSLCertVerificationError.
  9 # Using verify=False works, but is not ideal. The following links may provide a better way of dealing with this:
  10 # https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  11 # https://urllib3.readthedocs.io/en/1.26.x/user-guide.html#ssl
  12 # These two lines areused to suppress the InsecureRequestWarning when using verify=False
  13 urllib3.disable_warnings()
  14 
  15 TITLE = "Basingstoke and Deane Borough Council"
  16 DESCRIPTION = "Source for basingstoke.gov.uk services for Basingstoke and Deane Borough Council, UK."
  17 URL = "https://basingstoke.gov.uk"
  18 TEST_CASES = {
  19     "Test_001": {"uprn": "100060234732"},
  20     "Test_002": {"uprn": "100060218986"},
  21     "Test_003": {"uprn": 100060235836},
  22     "Test_004": {"uprn": 100060224194},
  23 }
  24 HEADERS = {
  25     "user-agent": "Mozilla/5.0",
  26 }
  27 ICON_MAP = {
  28     "WASTE": "mdi:trash-can",
  29     "RECYCLING": "mdi:recycle",
  30     "GARDEN": "mdi:leaf",
  31     "GLASS": "mdi:glass-fragile",
  32 }
  33 
  34 
  35 class Source:
  36     def __init__(self, uprn):
  37         self._uprn = str(uprn)
  38 
  39     def fetch(self):
  40         REQUEST_COOKIES = {
  41             "cookie_control_popup": "N",
  42             "WhenAreMyBinsCollected": self._uprn,
  43         }
  44         r = requests.get(
  45             "https://www.basingstoke.gov.uk/bincollections",
  46             headers=HEADERS,
  47             cookies=REQUEST_COOKIES,
  48             verify=False,
  49         )
  50         r.raise_for_status()
  51 
  52         soup = BeautifulSoup(r.text, "html.parser")
  53 
  54         services = soup.findAll("div", {"class": "service"})
  55 
  56         entries = []
  57 
  58         for service in services:
  59             waste_type = service.find("h2").text.split(" ")[0]
  60             schedule_dates = service.findAll("li")
  61             for schedule in schedule_dates:
  62                 date_str = schedule.text.split("(")[0].strip()
  63                 entries.append(
  64                     Collection(
  65                         date=datetime.strptime(date_str, "%A, %d %B %Y").date(),
  66                         t=waste_type,
  67                         icon=ICON_MAP.get(waste_type.upper()),
  68                     )
  69                 )
  70 
  71         return entries
  72
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py
  --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py
  +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py
  @@ -1,3 +1,4 @@
  +import logging
   from datetime import datetime
   
   import requests
  @@ -30,6 +31,7 @@
       "GARDEN": "mdi:leaf",
       "GLASS": "mdi:glass-fragile",
   }
  +LOGGER = logging.getLogger(__name__)
   
   
   class Source:
  @@ -60,9 +62,17 @@
               schedule_dates = service.findAll("li")
               for schedule in schedule_dates:
                   date_str = schedule.text.split("(")[0].strip()
  +                try:
  +                    date = datetime.strptime(date_str, "%A, %d %B %Y").date()
  +                except ValueError as e:
  +                    LOGGER.warning(
  +                        f"Failed to parse date '{date_str}' for wastetype {waste_type}: {e}"
  +                    )
  +                    continue
  +
                   entries.append(
                       Collection(
  -                        date=datetime.strptime(date_str, "%A, %d %B %Y").date(),
  +                        date=date,
                           t=waste_type,
                           icon=ICON_MAP.get(waste_type.upper()),
                       )
  
verification_info: {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py\n@@ -1,3 +1,4 @@\n+import logging\n from datetime import datetime\n \n import requests\n@@ -30,6 +31,7 @@\n     \"GARDEN\": \"mdi:leaf\",\n     \"GLASS\": \"mdi:glass-fragile\",\n }\n+LOGGER = logging.getLogger(__name__)\n \n \n class Source:\n@@ -60,9 +62,17 @@\n             schedule_dates = service.findAll(\"li\")\n             for schedule in schedule_dates:\n                 date_str = schedule.text.split(\"(\")[0].strip()\n+                try:\n+                    date = datetime.strptime(date_str, \"%A, %d %B %Y\").date()\n+                except ValueError as e:\n+                    LOGGER.warning(\n+                        f\"Failed to parse date '{date_str}' for wastetype {waste_type}: {e}\"\n+                    )\n+                    continue\n+\n                 entries.append(\n                     Collection(\n-                        date=datetime.strptime(date_str, \"%A, %d %B %Y\").date(),\n+                        date=date,\n                         t=waste_type,\n                         icon=ICON_MAP.get(waste_type.upper()),\n                     )\n", "issue": "[Bug]:  Basingstoke and Deane is broken since the 8th of Feb\n### I Have A Problem With:\n\nA specific source\n\n### What's Your Problem\n\nThe service no longer downloads the waste updates. I tried 1.46 and the master.\n\n### Source (if relevant)\n\n_No response_\n\n### Logs\n\n```Shell\nLogger: waste_collection_schedule.source_shell\r\nSource: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:136\r\nintegration: waste_collection_schedule (documentation)\r\nFirst occurred: 11:26:41 (1 occurrences)\r\nLast logged: 11:26:41\r\n\r\nfetch failed for source Basingstoke and Deane Borough Council: Traceback (most recent call last): File \"/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py\", line 134, in fetch entries = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File \"/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py\", line 65, in fetch date=datetime.strptime(date_str, \"%A, %d %B %Y\").date(), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"/usr/local/lib/python3.12/_strptime.py\", line 554, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"/usr/local/lib/python3.12/_strptime.py\", line 333, in _strptime raise ValueError(\"time data %r does not match format %r\" % ValueError: time data 'none / unknown' does not match format '%A, %d %B %Y'\n```\n\n\n### Relevant Configuration\n\n```YAML\nwaste_collection_schedule:\r\n  sources:\r\n    - name: basingstoke_gov_uk\r\n      args:\r\n        uprn: \"1000809XXXX\"\r\n      customize:\r\n        - type: Garden\r\n          show: True\r\n        - type: Waste\r\n          show: True\r\n        - type: Recycling\r\n          show: True\r\n        - type: Glass\r\n          show: True\n```\n\n\n### Checklist Source Error\n\n- [X] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)\n- [X] Checked that the website of your service provider is still working\n- [X] Tested my attributes on the service provider website (if possible)\n- [X] I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on \"Redownload\" and choose master as version)\n\n### Checklist Sensor Error\n\n- [X] Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)\n\n### Required\n\n- [X] I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.\n- [X] I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.\n", "before_files": [{"content": "from datetime import datetime\n\nimport requests\nimport urllib3\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\n\n# With verify=True the POST fails due to a SSLCertVerificationError.\n# Using verify=False works, but is not ideal. The following links may provide a better way of dealing with this:\n# https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n# https://urllib3.readthedocs.io/en/1.26.x/user-guide.html#ssl\n# These two lines areused to suppress the InsecureRequestWarning when using verify=False\nurllib3.disable_warnings()\n\nTITLE = \"Basingstoke and Deane Borough Council\"\nDESCRIPTION = \"Source for basingstoke.gov.uk services for Basingstoke and Deane Borough Council, UK.\"\nURL = \"https://basingstoke.gov.uk\"\nTEST_CASES = {\n    \"Test_001\": {\"uprn\": \"100060234732\"},\n    \"Test_002\": {\"uprn\": \"100060218986\"},\n    \"Test_003\": {\"uprn\": 100060235836},\n    \"Test_004\": {\"uprn\": 100060224194},\n}\nHEADERS = {\n    \"user-agent\": \"Mozilla/5.0\",\n}\nICON_MAP = {\n    \"WASTE\": \"mdi:trash-can\",\n    \"RECYCLING\": \"mdi:recycle\",\n    \"GARDEN\": \"mdi:leaf\",\n    \"GLASS\": \"mdi:glass-fragile\",\n}\n\n\nclass Source:\n    def __init__(self, uprn):\n        self._uprn = str(uprn)\n\n    def fetch(self):\n        REQUEST_COOKIES = {\n            \"cookie_control_popup\": \"N\",\n            \"WhenAreMyBinsCollected\": self._uprn,\n        }\n        r = requests.get(\n            \"https://www.basingstoke.gov.uk/bincollections\",\n            headers=HEADERS,\n            cookies=REQUEST_COOKIES,\n            verify=False,\n        )\n        r.raise_for_status()\n\n        soup = BeautifulSoup(r.text, \"html.parser\")\n\n        services = soup.findAll(\"div\", {\"class\": \"service\"})\n\n        entries = []\n\n        for service in services:\n            waste_type = service.find(\"h2\").text.split(\" \")[0]\n            schedule_dates = service.findAll(\"li\")\n            for schedule in schedule_dates:\n                date_str = schedule.text.split(\"(\")[0].strip()\n                entries.append(\n                    Collection(\n                        date=datetime.strptime(date_str, \"%A, %d %B %Y\").date(),\n                        t=waste_type,\n                        icon=ICON_MAP.get(waste_type.upper()),\n                    )\n                )\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py"}], "after_files": [{"content": "import logging\nfrom datetime import datetime\n\nimport requests\nimport urllib3\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\n\n# With verify=True the POST fails due to a SSLCertVerificationError.\n# Using verify=False works, but is not ideal. The following links may provide a better way of dealing with this:\n# https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n# https://urllib3.readthedocs.io/en/1.26.x/user-guide.html#ssl\n# These two lines areused to suppress the InsecureRequestWarning when using verify=False\nurllib3.disable_warnings()\n\nTITLE = \"Basingstoke and Deane Borough Council\"\nDESCRIPTION = \"Source for basingstoke.gov.uk services for Basingstoke and Deane Borough Council, UK.\"\nURL = \"https://basingstoke.gov.uk\"\nTEST_CASES = {\n    \"Test_001\": {\"uprn\": \"100060234732\"},\n    \"Test_002\": {\"uprn\": \"100060218986\"},\n    \"Test_003\": {\"uprn\": 100060235836},\n    \"Test_004\": {\"uprn\": 100060224194},\n}\nHEADERS = {\n    \"user-agent\": \"Mozilla/5.0\",\n}\nICON_MAP = {\n    \"WASTE\": \"mdi:trash-can\",\n    \"RECYCLING\": \"mdi:recycle\",\n    \"GARDEN\": \"mdi:leaf\",\n    \"GLASS\": \"mdi:glass-fragile\",\n}\nLOGGER = logging.getLogger(__name__)\n\n\nclass Source:\n    def __init__(self, uprn):\n        self._uprn = str(uprn)\n\n    def fetch(self):\n        REQUEST_COOKIES = {\n            \"cookie_control_popup\": \"N\",\n            \"WhenAreMyBinsCollected\": self._uprn,\n        }\n        r = requests.get(\n            \"https://www.basingstoke.gov.uk/bincollections\",\n            headers=HEADERS,\n            cookies=REQUEST_COOKIES,\n            verify=False,\n        )\n        r.raise_for_status()\n\n        soup = BeautifulSoup(r.text, \"html.parser\")\n\n        services = soup.findAll(\"div\", {\"class\": \"service\"})\n\n        entries = []\n\n        for service in services:\n            waste_type = service.find(\"h2\").text.split(\" \")[0]\n            schedule_dates = service.findAll(\"li\")\n            for schedule in schedule_dates:\n                date_str = schedule.text.split(\"(\")[0].strip()\n                try:\n                    date = datetime.strptime(date_str, \"%A, %d %B %Y\").date()\n                except ValueError as e:\n                    LOGGER.warning(\n                        f\"Failed to parse date '{date_str}' for wastetype {waste_type}: {e}\"\n                    )\n                    continue\n\n                entries.append(\n                    Collection(\n                        date=date,\n                        t=waste_type,\n                        icon=ICON_MAP.get(waste_type.upper()),\n                    )\n                )\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/basingstoke_gov_uk.py"}]}