def search(self, what, cat='all'):
    cat = cat.lower()
    search_page = ('search' if (cat == 'all') else 'category-search')
    search_url = '{url}/{search_page}/{search_query}/'.format(url=self.url, search_page=search_page, search_query=what)
    if (cat != 'all'):
        search_url += (self.supported_categories[cat] + '/')
    results_list = []
    parser = self.MyHtmlParser(results_list, self.url)
    page = 1
    while (page < 16):
        html = retrieve_url(((search_url + str(page)) + '/'))
        parser.feed(html)
        if (len(results_list) < 1):
            break
        del results_list[:]
        page += 1
    parser.close()
def search(self, what, cat='all'):
    cat = cat.lower()
    search_page = ('search' if (cat == 'all') else 'category-search')
    search_url = '{url}/{search_page}/{search_query}/'.format(url=self.url, search_page=search_page, search_query=what)
    if (cat != 'all'):
        search_url += (self.supported_categories[cat] + '/')
    results_list = []
    parser = self.MyHtmlParser(results_list, self.url)
    page = 1
    while (page < 16):
        html = retrieve_url(((search_url + str(page)) + '/'))
        parser.feed(html)
        if (len(results_list) < 1):
            break
        del results_list[:]
        page += 1
    parser.close()