juliomalegria / python-craigslist

Simple Craigslist wrapper
MIT No Attribution
389 stars 117 forks source link

Add min bedroom/bathroom flags to CraigslistHousing #44

Closed vpontis closed 7 years ago

vpontis commented 7 years ago

This code allows the following example to work.

cl_h = CraigslistHousing(site='sfbay', area='sfc', category='apa',
                         filters={'min_price': 6000, 'min_bedrooms': 5, 'min_bathrooms': 2})

for result in cl_h.get_results(sort_by='newest', geotagged=True):
    print(result)
juliomalegria commented 7 years ago

Thanks Victor! Would you mind adding 'max_bedrooms' and 'max_bathrooms' as well? Also removing the (apparently now deprecated) 'bedrooms' and 'bathrooms' (a couple of lines under your changes).

Thanks for contributing!

vpontis commented 7 years ago

Yep, I'll do that soon!

Question: do you have a script that you use to package up python-craigslist for pip?

It might also be nice to have a tag/branch for each version. I wanted to add these changes to 1.0.3 but it was a little confusing at first since there is no tag/branch for the version.

juliomalegria commented 7 years ago

This was done in 0794bad.

juliomalegria commented 7 years ago

I've been wanting to add tags or branches for the different versions, but I still haven't done. I'll look into it. I think it's a great idea 👍

vpontis commented 7 years ago

Thanks for getting this done @juliomalegria!

vpontis commented 7 years ago

I have some other ideas for ways of automating things on Craigslist... So I might be back and contributing to this repo again soon :)