repl.it
@pieromqwerty/

Swim Updates

Python

No description

fork
loading
Files
  • main.py
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from flask import request, Flask
app = Flask(__name__)

def findNumber(phone, carrier):
    if carrier == 'AT&T':
        email = phone + '@txt.att.net'
    if carrier == 'Boost':
        email = phone + '@myboostmobile.com'
    if carrier == 'Cricket':
        email = phone + '@mms.cricketwireless.net'
    if carrier == 'MetroPCS':
        email = phone + '@mymetropcs.com'
    if carrier == 'Sprint(PCS)':
        email = phone + '@messaging.sprintpcs.com'
    if carrier == 'T-Mobile':
        email = phone + '@tmomail.net'
    if carrier == 'Verizon':
        email = phone + '@vtext.com'
    if carrier == 'Virgin':
        email = phone + '@vmobl.com'
    if carrier == 'Xfinity':
        email = phone + '@vtext.com'
    return email


@app.route('/register', methods=['POST'])
def register_for_updates():
    if not request.json or not 'name' or not 'phone' or not 'carrier' or not 'events' in request.json:
        abort(400)
    

    name = request.name
    phone = request.phone
    carrier = request.carrier
    text = 'yeet'
    print('yeet')
    
print(findNumber('6783582271', 'Sprint(PCS)'))

#if __name__ == "__main__":
#    app.run()