Last active
June 20, 2019 18:57
-
-
Save themebon/470c68596d8b1ab560a28755d64e1e54 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, render_template, request | |
| import webbrowser | |
| from threading import Timer | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| title = 'Google Map Place Scraper' | |
| return render_template('index.html', title=title) | |
| def open_browser(): | |
| webbrowser.open_new('http://127.0.0.1:5000/') | |
| if __name__ == '__main__': | |
| Timer(1, open_browser).start(); | |
| app.run(port=5000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment