Example #1
0
    def GET(self, movieid):
        nocache()
        doc = search.do_query('id', movieid)[0]

        #recoms = search.do_query('indicators', movieid)
        recoms = [search.do_query('id', movieid)[0] for movieid in doc.bets]
        
        if hasattr(session, 'liked'):
            youlike = search.do_query('indicators', session.liked)
        else:
            youlike = []
        return render.movie(doc, recoms, youlike)
Example #2
0
    def GET(self, movieid):
        nocache()
        doc = search.do_query('id', movieid)[0]

        #recoms = search.do_query('indicators', movieid)
        recoms = [search.do_query('id', movieid)[0] for movieid in doc.bets]

        if hasattr(session, 'liked'):
            youlike = search.do_query('indicators', session.liked)
        else:
            youlike = []
        return render.movie(doc, recoms, youlike)
Example #3
0
 def get(self, search_type, query):
     if not query:
         raise tornado.web.HTTPError(400)
     try:
         boxes = search.do_query(search_type, query)
         self.write(json.dumps(boxes))
     except search.LiberSearchException, e:
         raise tornado.web.HTTPError(400)
Example #4
0
 def search(self, expr, *args, **kwargs):
     return search.do_query(expr, self.search_operators, *args, **kwargs)
Example #5
0
 def GET(self):
     nocache()
     ids = getattr(session, 'liked', []).split()
     return render.showlikes(
         [search.do_query('id', movieid)[0] for movieid in ids])
Example #6
0
 def GET(self):
     nocache()
     query = web.input().get('query')
     return render.search(search.do_query('title', query))
Example #7
0
 def GET(self):
     nocache()
     ids = getattr(session, 'liked', []).split()
     return render.showlikes([search.do_query('id', movieid)[0]
                              for movieid in ids])
Example #8
0
 def GET(self):
     nocache()
     query = web.input().get('query')
     return render.search(search.do_query('title', query))
Example #9
0
File: UI.py Project: ksdex/Crawling
 def searching():
     self.result = search.do_query(search_item.text(), self.index,
                                   self.url_path)
     slm = QStringListModel()
     slm.setStringList(self.result)
     search_result.setModel(slm)