def get_books_test(): link = 'http://lib.ru/STRUGACKIE/' soup = download_soup(link) all_tags = Retriever.get_accept_books(soup,link) # for link, tag in all_tags: # print link, tag.encode('utf8') #print "'%s' -- %s" % ( link, '1')#tag.decode('utf8') ) assert len(all_tags) == 99 pass
def get_dirs_test(): soup = download_soup('http://lib.ru/') all_tags = Retriever.get_accept_dirs(soup) for link,tag in all_tags: print link,tag.encode('utf8') # print keys = [tag[0] for tag in all_tags] keys.sort() #print len(keys) assert len(keys) == 64