def load_links_and_sites_in_list(self, lItem):
     self.load_links(lItem)
     if u'type' in lItem and lItem[u'type'] == u'category':
         sites_in_list = set([link[u'cfg'] for link in self.links])
         search_links = loadLocal({u'url': u'search.list'})
         search_as_category_links = [link for link in search_links if link[u'cfg'] not in sites_in_list]
         search_phrase = lItem[u'title'].strip(u' ').lower()
         search_as_category_sites = [loadLocal(link, search_phrase) for link in search_as_category_links]
         sites = map(loadLocal, self.links) + search_as_category_sites
         self.links += search_as_category_links
         self.sites = zip(sites, self.links)
     elif u'type' in lItem and lItem[u'type'] == u'search':
         search_phrase = getSearchPhrase()
         self.sites = zip([loadLocal(link, search_phrase) for link in self.links], self.links)
     else:
         self.sites = zip(map(loadLocal, self.links), self.links)
     return None
 def load_site(self, lItem = {u'url': u'sites.list'}):
     if u'type' in lItem and lItem[u'type'] == u'search':
         self.site = loadLocal(lItem, getSearchPhrase())
         return self.site
     self.site = loadLocal(lItem)
     return self.site