Код: Выделить всё
import re
import json
import requests
link = 'https://www.livabl.com/abbotsford-bc/jem1'
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36',
'Referer': 'https://www.livabl.com/',
}
def get_floor_plan_images(link,headers):
res = requests.get(link,headers=headers)
print(res.status_code)
match = re.search(r"\{\\\"images\\\":(.*?]),",res.text)
if match:
image_links = match.group(1)
return image_links
images = get_floor_plan_images(link,headers)
print(images)
Подробнее здесь: https://stackoverflow.com/questions/792 ... he-request
Мобильная версия