Данные загружаются через AJAX с другого URL:
import re
import requests
import json
url = 'https://www.zillow.com/lender-profile/zackdisinger/'
screen_name = [i for i in url.split('/') if i][-1]
r = requests.get(url).text
url_json = 'https://mortgageapi.zillow.com/getRegisteredLender?partnerId=' + re.search(r'"partnerId":"(.*?)"', r).group(1)
payload = {"fields":["aboutMe","address","cellPhone","contactLenderFormDisclaimer","companyName","employerMemberFDIC","employerScreenName","equalHousingLogo","faxPhone","hideCellPhone","imageId","individualName","languagesSpoken","memberFDIC","nationallyRegistered","nmlsId","nmlsType","officePhone","rating","screenName","stateLicenses","stateSponsorships","title","totalReviews","website"],"lenderRef":{"screenName":screen_name}}
data = requests.post(url_json, json=payload).json()
print(json.dumps(data, indent=4))
print()
print('Is nationally registered =', data['lender']['nationallyRegistered'])
Отпечатки:
{
"lender": {
"aboutMe": "From day one I provide the utmost relational-based experience to make you feel comfortable with your home financing decisions.\n\nEmpowerment and integrity is key to successfully making a home loan a smooth process from start to finish. Acquiring a mortgage in today's market takes product knowledge and underwriting know how. Every client has their own story, their own future. I am here to match today's mortgages to clients dreams of home-ownership.\n",
"address": {
"address": "10412 Allisonville Rd Suite 50",
"city": "Fishers",
"stateAbbreviation": "IN",
"zipCode": "46038"
},
"companyName": "Bank of England Mortgage",
"employerMemberFDIC": true,
"employerScreenName": "BoEMortgage",
"equalHousingLogo": "EqualHousingLender",
"faxPhone": {
"areaCode": "317",
"number": "3754",
"prefix": "536"
},
"id": "ZU101hnzx7ntuyx_8z2sb",
"imageId": "2910837992a9cc44d31c26bd7532d2dd",
"individualName": {
"firstName": "Zachary",
"lastName": "Disinger"
},
"languagesSpoken": [],
"nationallyRegistered": true,
"nmlsId": 1053091,
"nmlsType": "Individual",
"officePhone": {
"areaCode": "317",
"number": "0416",
"prefix": "252"
},
"rating": 5.0,
"screenName": "zackdisinger",
"stateLicenses": {},
"stateSponsorships": {},
"title": "Mortgage Banker",
"totalReviews": 120,
"website": "http://boeindy.com"
}
}
Is nationally registered = True