Skip to content

Commit

Permalink
fix: download of shipping info. Fixes #282 (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
faberto authored Mar 29, 2024
1 parent db465af commit 114afb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/kleinanzeigen_bot/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ async def _extract_shipping_info_from_ad_page(self) -> tuple[str, float | None,
"""
ship_type, ship_costs, shipping_options = 'NOT_APPLICABLE', None, None
try:
shipping_text = await self.web_text(By.ID, 'boxedarticle--details--shipping')
shipping_text = await self.web_text(By.CLASS_NAME, 'boxedarticle--details--shipping')
# e.g. '+ Versand ab 5,49 €' OR 'Nur Abholung'
if shipping_text == 'Nur Abholung':
ship_type = 'PICKUP'
Expand All @@ -350,9 +350,9 @@ async def _extract_shipping_info_from_ad_page(self) -> tuple[str, float | None,
"Hermes_Päckchen": "4,50",
"Hermes_S": "4,95",
"DHL_5": "6,99",
"Hermes_M": "5,95",
"DHL_10": "9,49",
"DHL_31,5": "16,49",
"Hermes_M": "6,75",
"DHL_10": "10,49",
"DHL_31,5": "19,99",
"Hermes_L": "10,95",
}
for shipping_option, shipping_price in shipping_option_mapping.items():
Expand Down

0 comments on commit 114afb6

Please sign in to comment.