juliomalegria / python-craigslist

Simple Craigslist wrapper
MIT No Attribution
387 stars 165 forks source link

min/max mileage filter not working #101

Closed Quresh95 closed 3 years ago

Quresh95 commented 3 years ago

The filter, min_mileage & max_mileage, under the CTA (cars & trucks) category in CraigslistForSale is not working.

irahorecka commented 3 years ago

Likewise for this issue (referencing issue #100)

juliomalegria commented 3 years ago

Hi @Quresh95. Can you explain me what issue you're having with the filters? The correct names for the filters are min_miles and max_miles. That might be the issue.

I did a quick test and it seems to be working correctly for me:

>>> from craigslist import CraigslistForSale
>>> cl_fs = CraigslistForSale(site='sfbay', category='cta', filters={'min_miles': 400000, 'max_miles': 450000})
>>> len(list(cl_fs.get_results()))
18

From the website:

Screen Shot 2020-12-19 at 11 34 06 PM

Please feel free to re-open if the problem remains.

Quresh95 commented 3 years ago

Agreed, I actually had the correct names in my code, min_miles & max_miles. They didn't seem to be working earlier but worked fine just now. I must've had something else wrong with my code which I seem to have since resolved. Thank you!