jmsfToken.py
974 Bytes
# -*- coding: utf-8 -*-
# @Time : 2021/10/9 13:32
# @Author : Ljq
# @File : jmsfToken.py
# @Software: PyCharm
"""
"""
import json,time,random
import re
from commons.scripts import dealContentType as dct
# from commons.MySession import sessionSy
def get_jmsfDuplicateCommitToken(session=None,host="",**kwargs):
"""进门防重接口"""
url = host + "/pay/index.action"
headers = dct.jsonCode()
params = {"bizType":"30","htmlRequest":"1","cardNo":"888810032426","fundId":"107575","amount":"45","customerName":"******","entranceId":"7471"}
params = dict(params,**kwargs)
res = session.useHeadersRequests(method="get", url=url, params=params,headers=headers)
jmsf_duplicate_commit_token = re.findall('name="token" id="token" value="(.*?)">',res.text)[0]
return jmsf_duplicate_commit_token
# host = "http://test.jmsf.diligrp.com:8385"
# session = sessionSy
# res = get_jmsfDuplicateCommitToken(session=session,host=host)
# print(res)