rachitt96 / pyRealtor

Python package to extract and analyze Canadian real estate data from REALTOR.CA
https://pypi.org/project/pyRealtor/
MIT License
2 stars 0 forks source link

Realtor-specific search #1

Open ZenenTreadwell opened 2 months ago

ZenenTreadwell commented 2 months ago

Hey, cool project! Is there any way that I can use it to search for active listings with a specific agent?

rachitt96 commented 1 month ago

Hi Zenen! Thanks for your feedback.

I have recently added the feature of searching / filtering the listings with Name of Realtor / Brokerage Name (Realtor's Office). To use this new feature, you will need to upgrade the version of pyRealtor with following command (and make sure that the version is >= 0.1.6):

pip install --upgrade pyRealtor

Once the version is upgraded, you can run following code snippet.

# search for listings with specific Brokerage Name / Office Name
import pyRealtor
house_obj = pyRealtor.HousesFacade()

house_obj.search_save_houses(
     'Barrhaven', 
     report_file_name = 'unreserved_barrhaven_all_litings.xlsx', 
     use_proxy=True, 
     realtor_brokerage_filter='Unreserved'
)
# search for listings with specific Realtor's Name
import pyRealtor
house_obj = pyRealtor.HousesFacade()

house_obj.search_save_houses(
     'Barrhaven', 
     report_file_name = 'chris_barrhaven_all_litings.xlsx', 
     use_proxy=True, 
     realtor_name_filter='Chris'
)

For realtor specific search, the library follows following steps internally:

I hope that this answers your question. In case you have a better approach to solve this issue, then please feel free to suggest.