Esempio n. 1
0
def pro():
    data = request.get_json()
    print(data)
    add_to_cart = data['first']
    xml_path = data['xmlPath2']
    text_input = data['second']
    continue_checkout = data['third']
    isPro = True
    product_url = data['productPage']
    home = data['home']
    run_check(product_url, add_to_cart, continue_checkout, home, xml_path,
              text_input, isPro)
    return jsonify({'data': data})
Esempio n. 2
0
def shopify():
    data = request.get_json()
    print(data)
    print("current_user", current_user.id)
    product_url = data['product_url']
    cart = data['cartText']
    check = data['checkoutText']
    home = data['homepage']
    email = data['formEmail']
    first_name = data['firstName']
    second_name = data['secondName']
    address = data['address']
    city = data['city']
    post_code = data['post_code']
    # ,home,email,first_name,second_name,address,city,post_code
    run_check(product_url, cart, check, home)
    return jsonify({'data': data})
Esempio n. 3
0
def check_enroll():
    dept, courseNum = 'BME','150'
    section_type = 'Dis'
    course_codes = '13610,13612,13613'

    checker = Checker(dept,courseNum,section_type,course_codes)
    enroller = Enroller(3,headless=True)

    run_login_config(enroller)
    enrolled = False
    while not enrolled:
        course_codes = run_check(checker)
        course = Course(checker.get_name(), course_codes['Lec'], course_codes[checker.get_section_type()])
        enrolled = run_enrollment(enroller,course)
        if enrolled:
            enroller.email_notif_enroller("*****@*****.**")
Esempio n. 4
0
def check():

    checker = Checker('COMPSCI','122A','Dis')

    run_check(check)
Esempio n. 5
0
#!/usr/bin/env python3

import time
import os
from modules.custom_sockets_api import ClientSocket
import check as b_script

notification_host = os.environ.get("NOTIFICATION_HOST")
userClient = ClientSocket(notification_host, 56235)
print("client user initiated")

userClient.custom_send("User_connect")
time.sleep(1)
while True:
    try:
        recved = userClient._sock.recv(1024)
        print(recved)
        if recved == b"":
            userClient.close_socket()
            break
        else:
            b_script.run_check()
            pass
    except KeyboardInterrupt:
        print("caught KeyboardInterrupt, exiting")
        userClient.close_socket()
        break