I am working on a project for myself to find the best house matching my criterion. I put a python code together to download data from zillow by scraping it using Selenium (Chrome). This will help me to load data in Excel and run some analysis - my usage is personal, time& location limited and legal. Here is a brief description and my question:
Desc:
Zillow displays some price charts like 1. I need the data on this curve. It is fetched by a GraphQL script like the following (I obtained by inspecting network activity of the website using Firefox dev tools):
await fetch("https://www.zillow.com/graphql/?zpid=53084803&timePeriod=TEN_YEARS&metricType=LOCAL_HOME_VALUES&forecast=true&operationName=HomeValueChartDataQuery", {
"credentials": "include",
"headers": {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:84.0) Gecko/20100101 Firefox/84.0",
"Accept": "*/*",
"Accept-Language": "en-US,en;q=0.5",
"content-type": "text/plain"
},
"referrer": "https://www.zillow.com/homedetails/7317-Vineyard-Dr-Plano-TX-75025/53084803_zpid/",
"body": "{"query":"query HomeValueChartDataQuery($zpid: ID!, $metricType: HomeValueChartMetricType, $timePeriod: HomeValueChartTimePeriod) {\n property(zpid: $zpid) {\n homeValueChartData(metricType: $metricType, timePeriod: $timePeriod) {\n points {\n x\n y\n }\n name\n }\n }\n}\n","operationName":"HomeValueChartDataQuery","variables":{"zpid":53084803,"timePeriod":"TEN_YEARS","metricType":"LOCAL_HOME_VALUES","forecast":true},"clientVersion":"home-details/6.0.11.0.0.hotfix-01-25-21.373d699"}",
"method": "POST",
"mode": "cors"
});
question from:
https://stackoverflow.com/questions/65907479/fetching-price-chart-data-from-zillow 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…