A web scraper for Daft.ie
Project description
A web scraper for daft.ie. Tested on Python 2.7 and Python 3.5.2
Install
pip install daftlistings
Developing Locally
git clone https://github.com/AnthonyBloomer/daftlistings.git cd daftlistings virtualenv env source env/bin/activate pip install -r requirements.txt
Examples
Get the current properties for rent in Dublin that are between €1000 and €1500 per month.
from daftlistings import Daft
d = Daft()
listings = d.get_listings(
county='Dublin City',
area='Dublin 15',
listing_type='apartments',
min_price=1000,
max_price=1500,
sale_type='rent'
)
for listing in listings:
print(listing.get_formalised_address())
print(listing.get_daft_link())
Get the current sale agreed prices for properties in Dublin.
listings = d.get_listings(
county='Dublin City',
area='Dublin 15',
listing_type='properties',
sale_agreed=True,
min_price=200000,
max_price=250000
)
for listing in listings:
print(listing.get_formalised_address())
print(listing.get_daft_link())
Full example:
from daftlistings import Daft
d = Daft()
offset = 0
pages = True
while pages:
listings = d.get_listings(
county='Dublin City',
area='Dublin 15',
offset=offset,
listing_type='properties'
)
if not listings:
pages = False
for listing in listings:
print(listing.get_agent_url())
print(listing.get_price())
print(listing.get_formalised_address())
print(listing.get_daft_link())
print(' ')
offset += 10
Full Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
daftlistings-0.8.1.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for daftlistings-0.8.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fec289b89fff531b256cb22600056e3d2de1b2c971519e69c5486153c163230 |
|
MD5 | 71bcea29816964a8c2dd48acec24b7a5 |
|
BLAKE2b-256 | add0bce1ad3233b5d8fcf057f4041f1e534ae42e511dead7f8f72e09091a04d3 |