mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 18:41:50 +01:00
fix: save location #296
This commit is contained in:
@@ -392,10 +392,10 @@ class AdExtractor(WebScrapingMixin):
|
|||||||
contact['street'] = street
|
contact['street'] = street
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
LOG.info('No street given in the contact.')
|
LOG.info('No street given in the contact.')
|
||||||
# construct remaining address
|
|
||||||
address_halves = address_text.split(' - ')
|
(zipcode, location) = address_text.split(" ", 1)
|
||||||
address_left_parts = address_halves[0].split(' ') # zip code and region/city
|
contact['zipcode'] = zipcode # e.g. 19372
|
||||||
contact['zipcode'] = address_left_parts[0]
|
contact['location'] = location # e.g. Mecklenburg-Vorpommern - Steinbeck
|
||||||
|
|
||||||
contact_person_element:Element = await self.web_find(By.ID, 'viewad-contact')
|
contact_person_element:Element = await self.web_find(By.ID, 'viewad-contact')
|
||||||
name_element = await self.web_find(By.CLASS_NAME, 'iconlist-text', parent = contact_person_element)
|
name_element = await self.web_find(By.CLASS_NAME, 'iconlist-text', parent = contact_person_element)
|
||||||
|
|||||||
Reference in New Issue
Block a user