Вы можете выполнить регулярное выражение, выполнить небольшую очистку строки и затем перейти к json, чтобы затем распечатать каждый продукт в виде словаря, содержащего информацию для каждого списка
import re
import requests
import json
r = requests.get('https://www.seloger.com/list.htm?tri=initial&idtypebien=1,2&pxMax=3000000&div=2238&idtt=2,5&naturebien=1,2,4&LISTING-LISTpg=2', headers = {'User-Agent' : 'Mozilla/5.0'})
p = re.compile('var ava_data =(.*);\r\n\s+ava_data\.logged = logged;', re.DOTALL)
x = p.findall(r.text)[0].strip().replace('\r\n ','').replace('\xa0',' ').replace('\\','\\\\')
x = re.sub(r'\s{2,}|\\r\\n', '', x)
data = json.loads(x)
for product in data['products']:
print(product)
Пример возврата (со страницы 3):
{'idannonce': '142830891', 'idagence': '263765', 'idtiers': '284402', 'typedebien': 'Appartement', 'typedetransaction': ['vente'], 'idtypepublicationsourcecouplage': 'SL', 'position': '0', 'codepostal': '77450', 'ville': 'Esbly', 'departement': 'Seine-et-Marne', 'codeinsee': '770171', 'produitsvisibilite': 'AD:AC:BB:AW', 'affichagetype': [{'name': 'liste', 'value': True}], 'cp': '77450', 'etage': '0', 'idtypechauffage': '0', 'idtypecommerce': '0', 'idtypecuisine': 'séparée équipée', 'naturebien': '1', 'si_balcon': '0', 'nb_chambres': '1', 'nb_pieces': '2', 'si_sdbain': '0', 'si_sdEau': '0', 'nb_photos': '14', 'prix': '139900', 'surface': '44'}
Цена, например:
product['prix']