123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import traceback
- import flask
- import time
- import datetime
- from flask import Blueprint
- from flask_cors import CORS
- from dateutil.relativedelta import relativedelta
- from spiders.hengbang.xubao.hb_xubao import HB_xubao
- from spiders.ansheng.xubao.as_xubao import AS_xubao
- from spiders.pingan.xubao.pa_xubao import PA_xubao
- from spiders.yongcheng.xubao.yc_xubao import YC_xubao
- from spiders.zhongmei.xubao.zm_xubao import ZM_xubao
- xubao=Blueprint('xubao',__name__)
- CORS(xubao, supports_credentials=True)
- @xubao.route('/hb/xubao', methods=['post'])
- def hb_xubao():
- license = flask.request.json.get('license')
- uname = flask.request.json.get('uname')
- pwd = flask.request.json.get('pwd')
- ret = HB_xubao(uname, pwd, license).main()
- return ret, 200, {'Content-Type': 'application/json'}
- @xubao.route('/yc/xubao', methods=['post'])
- def yc_xubao():
- license = flask.request.json.get('license')
- uname = flask.request.json.get('uname')
- pwd = flask.request.json.get('pwd')
- ret = YC_xubao(uname, pwd, license).main()
- return ret, 200, {'Content-Type': 'application/json'}
- @xubao.route('/as/xubao', methods=['post'])
- def as_xubao():
- license = flask.request.json.get('license')
- uname = flask.request.json.get('uname')
- pwd = flask.request.json.get('pwd')
- ret = AS_xubao(uname, pwd, license).main()
- return ret, 200, {'Content-Type': 'application/json'}
- @xubao.route('/pingan/xubao', methods=['post'])
- def pa_xubao():
- vin = flask.request.json.get('vin')
- uname = flask.request.json.get('uname')
- pwd = flask.request.json.get('pwd')
- ret = PA_xubao(uname, pwd, vin).main()
- return ret, 200, {'Content-Type': 'application/json'}
- @xubao.route('/zm/xubao', methods=['post'])
- def zm_xubao():
- license = flask.request.json.get('license')
- uname = flask.request.json.get('uname')
- pwd = flask.request.json.get('pwd')
- ret = ZM_xubao(uname, pwd, license).main()
- return ret, 200, {'Content-Type': 'application/json'}
|