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)
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)
def test(name=None): return render_template('list.html', datas=requestnode.work( 'http://cilifanhao.cc/q/' + name + '/1/4/0.html', 10))