fix: remove temporary workaround for #368

This commit is contained in:
sebthom
2025-01-10 16:21:44 +01:00
parent ca876e628b
commit 677c48628d

View File

@@ -826,11 +826,8 @@ class KleinanzeigenBot(WebScrapingMixin):
LOG.debug("Attribute field '%s' could not be found.", special_attribute_key)
raise TimeoutError(f"Failed to set special attribute [{special_attribute_key}] (not found)") from ex
# workaround for https://github.com/Second-Hand-Friends/kleinanzeigen-bot/issues/368
elem_id = getattr(special_attr_elem.attrs, 'id')
elem_id = ''.join(['\\' + c if c in '!"#$%&\'()*+,./:;<=>?@[\\]^`{|}~' else c for c in elem_id])
try:
elem_id = getattr(special_attr_elem.attrs, 'id')
if special_attr_elem.local_name == 'select':
LOG.debug("Attribute field '%s' seems to be a select...", special_attribute_key)
await self.web_select(By.ID, elem_id, special_attribute_value)