Giter VIP home page Giter VIP logo

Comments (3)

sdfordham avatar sdfordham commented on June 18, 2024

This property type bug is caused by

RESIDENTIAL_RENT = "residential-for-rent"

it should be "residential-to-rent".

I'm not sure about the issue with the bed count... I compared the payload generated with daft._make_payload() with the payload generated on the webpage and they are identical. There must be further logic in the front-end that does another filter. It may be necessary to add extra code for this.

from daftlistings.

sdfordham avatar sdfordham commented on June 18, 2024

Issue with price/bedroom caused by this

payload["range"] = self._ranges

"range" should be "ranges".

from daftlistings.

sdfordham avatar sdfordham commented on June 18, 2024

@EricNeville This is all fixed now.

from daftlistings.daft import Daft
from daftlistings.enums import SearchType, PropertyType
from daftlistings.location import Location

daft = Daft()
daft.set_search_type(SearchType.RESIDENTIAL_RENT)
daft.set_property_type(PropertyType.APARTMENT)
daft.set_location(Location.GRAND_CANAL_DOCK_DUBLIN)
daft.set_location(Location.IFSC_DUBLIN)
daft.set_min_beds(2)
daft.set_max_beds(2)
daft.set_min_price(1500)
daft.set_max_price(3000)

listings = daft.search()

prices = [l.abbreviated_price for l in listings]
prices = [int(p.strip('€').replace(',', '')) for p in prices]
prices = any([p > 3000 or p < 1500 for p in prices])
print('Any prices out of range:', prices)

beds = any(['2' not in l.bedrooms for l in listings])
print('Any without 2 beds:', beds)

Output:

Got 122 results.
Any prices out of range: False
Any without 2 beds: False

Until the pull request is approved you should use this branch.

from daftlistings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.