juliomalegria / python-craigslist

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

Link filter option with its numerical value #98

Closed irahorecka closed 3 years ago

irahorecka commented 3 years ago

Addresses issues #97, #100, #101

irahorecka commented 3 years ago

Previously, filters from utils.get_list_filters returned a list of filters in div class="search-attribute". Numerical values that are tied to these filters (and ultimately concatenated to the query url) were assumed to increment by 1 from 1. This is not always the case, which in turn leads to an invalid filter code concatenated to the query url.

These numerical codes are actually tied to their filters; therefore, this commit links the filter option (e.g. 'silver') with its numerical value (e.g. 8).

juliomalegria commented 3 years ago

Awesome! Thanks again :)