mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
Fix: Crash on downloading ads with prices >=1000 Eur (#267)
Co-authored-by: Sebastian Thomschke <sebthom@users.noreply.github.com>
This commit is contained in:
@@ -310,7 +310,8 @@ class AdExtractor(WebScrapingMixin):
|
||||
match price_str.split()[-1]:
|
||||
case '€':
|
||||
price_type = 'FIXED'
|
||||
price = int(price_str.split()[0])
|
||||
# replace('.', '') is to remove the thousands separator before parsing as int
|
||||
price = int(price_str.replace('.', '').split()[0])
|
||||
case 'VB':
|
||||
price_type = 'NEGOTIABLE'
|
||||
if not price_str == "VB": # can be either 'X € VB', or just 'VB'
|
||||
|
||||
Reference in New Issue
Block a user