from flask import Flask, request, jsonify from werkzeug.debug import DebuggedApplication from webistes.smart_credit.click_refresh_btn import smart_credit_click_refresh_btn from webistes.smart_credit.credit_3b_scrapper import credit_report_3b from webistes.smart_credit.get_refresh_btn_status import smart_credit_refresh_status from webistes.smart_credit.credit_3b_scrapper_new import credit_report_3b_new from webistes.identity_iq.click_refresh_btn import click_refresh_btn from webistes.identity_iq.get_refresh_date import get_refresh_date from webistes.identity_iq.recent_report import recent_report from webistes.identity_iq.user_validation import user_validation app = Flask(__name__) app.config['DEBUG'] = True application = DebuggedApplication(app, True) @app.route('/') def index(): return jsonify({'message': 'Welcome to Scrapper!'}) @app.route('/smart-credit-credit-report-3b', methods=['POST']) def get_credit_report_3b(): data = request.get_json() return credit_report_3b(data['email'], data['password']) @app.route('/smart-credit-credit-refresh-status', methods=['POST']) def get_smart_credit_refresh_status(): data = request.get_json() return smart_credit_refresh_status(data['email'], data['password']) @app.route('/smart-credit-credit-click-refresh-btn', methods=['POST']) def get_smart_credit_click_refresh_btn(): data = request.get_json() return smart_credit_click_refresh_btn(data['email'], data['password']) @app.route('/smart-credit-credit-report-3b-json', methods=['POST']) def get_credit_report_3b_new(): data = request.get_json() return credit_report_3b_new(data['email'], data['password']) @app.route('/identity-iq-credit-report-html', methods=['POST']) def get_identity_iq_credit_report_html(): data = request.get_json() return recent_report(data['email'], data['password'], data['ssn']) @app.route('/identity-iq-report-refresh-date', methods=['POST']) def get_identity_iq_credit_report_refresh_date(): data = request.get_json() return get_refresh_date(data['email'], data['password'], data['ssn']) @app.route('/identity-iq-click-refresh-btn', methods=['POST']) def get_identity_iq_report_click_refresh_btn(): data = request.get_json() return click_refresh_btn(data['email'], data['password'], data['ssn']) @app.route('/identity-iq-user-validation', methods=['POST']) def get_identity_iq_user_validation(): data = request.get_json() return user_validation(data['email'], data['password'], data['ssn']) if __name__ == '__main__': app.run(host='0.0.0.0')