from flask import Flask, render_template, request
from scrape import scrape_page


app = Flask(__name__) 


@app.route('/')
def home():
	return render_template('home.html')


@app.route('/search', methods=['POST'])
def search():
	query = str(request.form['query'])
	print query, type(query)
	data = scrape_page(query)
	return render_template('result.html', data=data)


if __name__ == '__main__':
	app.run(host="0.0.0.0", port=7777, debug=True)
@@ -311,16 +311,28 @@
 (query)%0A
+%09print data%0A
 %09return 
@@ -378,79 +378,4 @@
 a)%0A%0A
-%0Aif __name__ == '__main__':%0A%09app.run(host=%220.0.0.0%22, port=7777, debug=True)

Remove boilerplate