Closed mnowicky closed 3 years ago
In base.py
, get_filters
has a conditional that checks for whether filters
value (e.g. 'clean') is an iterable; if it's not, it'll force the value into a list to make it an iterable. In your case, 'clean' (i.e. a str) is an iterable, so when the function tries to check the elements in the iterable to an accepted list of filter parameters, rather than pulling 'clean' from ['clean'], it pulls 'c' 'l' 'e' 'a' 'n' from 'clean'.
For now, a workaround is to encapsulate 'clean' in a list - i.e. filters={'auto_title_status': ['clean']}
Thank you!
Hello, thanks for the great module! I did find what I believe to be a bug however.
It has to do with the "CraigslistForSale" sub-class. Specifically, the category "cto".
When issuing:
CraigslistForSale.show_filters(category='cto')
we see that "auto_title_status" is a valid filter, with the options being listed as "clean", "salvage", "rebuilt", "parts only", "lien", and "missing".
However, when trying to use this filter, it appears as though it's only accepting each character individually. For instance:
If I set "auto_tite_status" to 'clean", I get returned:
This happens no matter what I set this filter to.
I need to confirm, but this might affect all of the catgory specific filters that start with "auto_".
The specific call I'm making is:
clfs = CraigslistForSale(site=monterey, category=cto, filters={'auto_title_status': 'clean'})
Thank you!