Skip to content

Instantly share code, notes, and snippets.

@themebon
Last active June 20, 2019 18:57
Show Gist options
  • Select an option

  • Save themebon/470c68596d8b1ab560a28755d64e1e54 to your computer and use it in GitHub Desktop.

Select an option

Save themebon/470c68596d8b1ab560a28755d64e1e54 to your computer and use it in GitHub Desktop.
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