26 lines
543 B
Python
26 lines
543 B
Python
import os
|
|
import requests
|
|
from flask import Flask, render_template, request, redirect, url_for, session
|
|
from werkzeug.routing import BaseConverter
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
class PhoneConverter(BaseConverter):
|
|
regex = '1[3-9]\d{9}'
|
|
|
|
app.url_map.converters["phone"] = PhoneConverter
|
|
|
|
@app.route("/", methods=["GET", "POST"])
|
|
def index():
|
|
return render_template("index.html")
|
|
|
|
@app.route("/<phone:param>")
|
|
def phone(param):
|
|
return param
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.config.from_pyfile("config.py")
|
|
app.run(host="0.0.0.0") |