mirror of
https://github.com/Bunsly/HomeHarvest.git
synced 2026-03-04 19:44:29 -08:00
- rewrote & optimized flow
- new_construction data point - renamed "agent" & "broker" to "agent_name" & "broker_name" - added builder & office data - added entity uuids
This commit is contained in:
161
homeharvest/core/scrapers/realtor/queries.py
Normal file
161
homeharvest/core/scrapers/realtor/queries.py
Normal file
@@ -0,0 +1,161 @@
|
||||
_SEARCH_HOMES_DATA_BASE = """{
|
||||
pending_date
|
||||
listing_id
|
||||
property_id
|
||||
list_date
|
||||
status
|
||||
last_sold_price
|
||||
last_sold_date
|
||||
list_price
|
||||
list_price_max
|
||||
list_price_min
|
||||
price_per_sqft
|
||||
flags {
|
||||
is_contingent
|
||||
is_pending
|
||||
is_new_construction
|
||||
}
|
||||
description {
|
||||
type
|
||||
sqft
|
||||
beds
|
||||
baths_full
|
||||
baths_half
|
||||
lot_sqft
|
||||
year_built
|
||||
garage
|
||||
type
|
||||
name
|
||||
stories
|
||||
text
|
||||
}
|
||||
source {
|
||||
id
|
||||
listing_id
|
||||
}
|
||||
hoa {
|
||||
fee
|
||||
}
|
||||
location {
|
||||
address {
|
||||
street_direction
|
||||
street_number
|
||||
street_name
|
||||
street_suffix
|
||||
line
|
||||
unit
|
||||
city
|
||||
state_code
|
||||
postal_code
|
||||
coordinate {
|
||||
lon
|
||||
lat
|
||||
}
|
||||
}
|
||||
county {
|
||||
name
|
||||
fips_code
|
||||
}
|
||||
neighborhoods {
|
||||
name
|
||||
}
|
||||
}
|
||||
tax_record {
|
||||
public_record_id
|
||||
}
|
||||
primary_photo {
|
||||
href
|
||||
}
|
||||
photos {
|
||||
href
|
||||
}
|
||||
advertisers {
|
||||
email
|
||||
broker {
|
||||
name
|
||||
fulfillment_id
|
||||
}
|
||||
type
|
||||
name
|
||||
fulfillment_id
|
||||
builder {
|
||||
name
|
||||
fulfillment_id
|
||||
}
|
||||
phones {
|
||||
ext
|
||||
primary
|
||||
type
|
||||
number
|
||||
}
|
||||
office {
|
||||
name
|
||||
email
|
||||
fulfillment_id
|
||||
href
|
||||
phones {
|
||||
number
|
||||
type
|
||||
primary
|
||||
ext
|
||||
}
|
||||
mls_set
|
||||
}
|
||||
corporation {
|
||||
specialties
|
||||
name
|
||||
bio
|
||||
href
|
||||
fulfillment_id
|
||||
}
|
||||
mls_set
|
||||
rental_corporation {
|
||||
fulfillment_id
|
||||
}
|
||||
rental_management {
|
||||
name
|
||||
fulfillment_id
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
HOMES_DATA = """%s
|
||||
nearbySchools: nearby_schools(radius: 5.0, limit_per_level: 3) {
|
||||
__typename schools { district { __typename id name } }
|
||||
}
|
||||
taxHistory: tax_history { __typename tax year assessment { __typename building land total } }
|
||||
estimates {
|
||||
__typename
|
||||
currentValues: current_values {
|
||||
__typename
|
||||
source { __typename type name }
|
||||
estimate
|
||||
estimateHigh: estimate_high
|
||||
estimateLow: estimate_low
|
||||
date
|
||||
isBestHomeValue: isbest_homevalue
|
||||
}
|
||||
}
|
||||
}""" % _SEARCH_HOMES_DATA_BASE
|
||||
|
||||
SEARCH_HOMES_DATA = """%s
|
||||
current_estimates {
|
||||
__typename
|
||||
source {
|
||||
__typename
|
||||
type
|
||||
name
|
||||
}
|
||||
estimate
|
||||
estimateHigh: estimate_high
|
||||
estimateLow: estimate_low
|
||||
date
|
||||
isBestHomeValue: isbest_homevalue
|
||||
}
|
||||
}""" % _SEARCH_HOMES_DATA_BASE
|
||||
|
||||
GENERAL_RESULTS_QUERY = """{
|
||||
count
|
||||
total
|
||||
results %s
|
||||
}""" % SEARCH_HOMES_DATA
|
||||
Reference in New Issue
Block a user