- bug fixes
parent
8a5683fe79
commit
e378feeefe
|
@ -25,6 +25,7 @@ class SiteName(Enum):
|
|||
|
||||
class SearchPropertyType(Enum):
|
||||
SINGLE_FAMILY = "single_family"
|
||||
APARTMENT = "apartment"
|
||||
CONDOS = "condos"
|
||||
CONDO_TOWNHOME_ROWHOME_COOP = "condo_townhome_rowhome_coop"
|
||||
CONDO_TOWNHOME = "condo_townhome"
|
||||
|
|
|
@ -257,7 +257,7 @@ class RealtorScraper(Scraper):
|
|||
sort_param = (
|
||||
"sort: [{ field: sold_date, direction: desc }]"
|
||||
if self.listing_type == ListingType.SOLD
|
||||
else "sort: [{ field: list_date, direction: desc }]"
|
||||
else "" #: "sort: [{ field: list_date, direction: desc }]" #: prioritize normal fractal sort from realtor
|
||||
)
|
||||
|
||||
pending_or_contingent_param = (
|
||||
|
@ -305,20 +305,15 @@ class RealtorScraper(Scraper):
|
|||
)
|
||||
elif search_type == "area": #: general search, came from a general location
|
||||
query = """query Home_search(
|
||||
$city: String,
|
||||
$county: [String],
|
||||
$state_code: String,
|
||||
$postal_code: String
|
||||
$location: String!,
|
||||
$offset: Int,
|
||||
) {
|
||||
home_search(
|
||||
query: {
|
||||
%s
|
||||
city: $city
|
||||
county: $county
|
||||
postal_code: $postal_code
|
||||
state_code: $state_code
|
||||
search_location: {location: $location}
|
||||
status: %s
|
||||
unique: true
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
|
@ -444,10 +439,7 @@ class RealtorScraper(Scraper):
|
|||
|
||||
else: #: general search, location
|
||||
search_variables |= {
|
||||
"city": location_info.get("city"),
|
||||
"county": location_info.get("county"),
|
||||
"state_code": location_info.get("state_code"),
|
||||
"postal_code": location_info.get("postal_code"),
|
||||
"location": self.location,
|
||||
}
|
||||
|
||||
if self.foreclosure:
|
||||
|
|
|
@ -220,19 +220,19 @@ HOMES_DATA = """%s
|
|||
}""" % _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
|
||||
}
|
||||
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 = """{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "homeharvest"
|
||||
version = "0.4.6"
|
||||
version = "0.4.7"
|
||||
description = "Real estate scraping library"
|
||||
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
|
||||
homepage = "https://github.com/Bunsly/HomeHarvest"
|
||||
|
|
Loading…
Reference in New Issue