mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
FIX Save person name as contact:name to ad yaml instead of city name
This commit is contained in:
committed by
Sebastian Thomschke
parent
9d5c6efe9c
commit
faa71ac03f
@@ -130,7 +130,12 @@ class AdExtractor:
|
||||
address_halves = address_text.split(' - ')
|
||||
address_left_parts = address_halves[0].split(' ') # zip code and region/city
|
||||
contact['zipcode'] = address_left_parts[0]
|
||||
contact['name'] = address_halves[1]
|
||||
|
||||
contact_person_element = self.driver.find_element(By.CSS_SELECTOR, '#viewad-contact')
|
||||
name_element = contact_person_element.find_element(By.CLASS_NAME, 'iconlist-text')
|
||||
name = name_element.find_element(By.TAG_NAME, 'a').text
|
||||
contact['name'] = name
|
||||
|
||||
if 'street' not in contact:
|
||||
contact['street'] = None
|
||||
try: # phone number is unusual for non-professional sellers today
|
||||
|
||||
Reference in New Issue
Block a user