예제 #1
0
 def put(self, name):
     magnet = json.loads(request.data)['magnet']
     if not magnet:
         database.add_task(session['userName'], name)
         datas = requestnode.work(
             'http://cilifanhao.cc/q/' + name + '/1/4/0.html', 10)
         database.save_nodes(datas, name)
     else:
         database.add_task(session['userName'], name, magnet)
예제 #2
0
def search(name):
    datas = requestnode.work('http://cilifanhao.cc/q/' + name + '/1/4/0.html',
                             10)
    database.save_nodes(datas, name)
    return render_template('list.html', datas=datas)
예제 #3
0
def test(name=None):
    return render_template('list.html',
                           datas=requestnode.work(
                               'http://cilifanhao.cc/q/' + name +
                               '/1/4/0.html', 10))