API Reference¶
Scrapers¶
-
pogam.scrapers.seloger(transaction, post_codes, property_types=['apartment', 'house'], min_price=None, max_price=None, min_size=None, max_size=None, min_rooms=None, max_rooms=None, min_beds=None, max_beds=None, num_results=100, max_duplicates=25, timeout=5)¶ Scrape all listing matching search criteria.
- Parameters
transaction (
str) – one of {‘rent’, ‘buy’}post_codes (
Union[str,Iterable[str]]) – list of post codes.property_types (
Union[str,Iterable[str]]) – subest of {‘apartment’, ‘house’, ‘parking’, ‘land’, ‘store’, ‘business’, ‘office’, ‘loft’, ‘apartment_building’, ‘other_building’, ‘castle’, ‘mansion’, ‘program’}.min_size (
Optional[float]) – minimum property size, in square meters.max_size (
Optional[float]) – maximum property size, in square meters.num_results (
int) – keep scraping until we add this many result to the database.max_duplicates (
int) – keep scraping until we see this many consecutive listings that are already in our database.timeout (
int) – maximum amount of time, in seconds, to wait for a page to load.
- Return type
- Returns
a dictionary of “added”, “seen” and “failed” listings.
Database Models¶
-
class
pogam.models.Property(**kwargs)¶ A real estate property.
-
id¶ primary key
-
type_¶ type of property (Apartment, House, Parking, etc.)
-
size¶ property size, in square meters.
-
floor¶ floor number, starting at 0 for the ground floor.
-
floors¶ number of floors, e.g. for houses or duplex.
-
rooms¶ number of rooms.
-
bedrooms¶ number of bedrooms.
-
bathrooms¶ number of bathrooms.
-
balconies¶ number of balconies.
-
heating¶ type of heating system (gas, electric, etc.)
-
kitchen¶ type of kitchen (separated, opened, etc.)
-
dpe_consumption¶ French “Diagnostique de Performance Energétique” rating of energy efficiency.
-
dpe_emissions¶ French “Diagnostique de Performance Energétique” rating of greenhouse gas emissions.
-
postal_code¶ postal or ZIP code.
-
city¶ the property’s city.
-
neighborhood¶ he property’s neighborhood, within the city.
-
latitude¶ property’s latitude.
-
longitude¶ property’s longitude.
-
north_east_lat¶ latitude of the north-east corner of a property-boundig box.
-
north_east_long¶ longitude of the north-east corner of a property-boundig box.
-
south_west_lat¶ latitude of the south-west corner of a property-boundig box.
-
south_east_long¶ longitude of the south-east corner of a property-boundig box.
-
static
create(data)¶ Create a new Property.
-
to_dict()¶ Convert the property object to a dictionary.
-
-
class
pogam.models.Listing(**kwargs)¶ The listing for a real estate property.
-
id¶ primary key
-
property¶ reference property.
-
source¶ source of the scrape.
-
url¶ url of the source listing.
-
transaction¶ type of transaction (buy, rent).
-
description¶ full text description in the listing.
-
price¶ listing’s price.
-
currency¶ listing’s currency.
-
external_listing_id¶ source’s listing id
-
classmethod
create(**data)¶ Create a new listing.
-
-
class
pogam.models.Source(**kwargs)¶
-
class
pogam.models.PropertyType(**kwargs)¶
-
class
pogam.models.TransactionType(**kwargs)¶
-
class
pogam.models.Heating(**kwargs)¶
-
class
pogam.models.Kitchen(**kwargs)¶
-
class
pogam.models.City(**kwargs)¶
-
class
pogam.models.Neighborhood(**kwargs)¶