fc_view.py 2.17 KB
# -*- coding: utf-8 -*-
"""
@Time : 2021/7/30 9:55
@Auth : wlm
@File :fc_view.py
@IDE :PyCharm
"""
# -*- coding: utf-8 -*-
from commons import common as com
from commons.MySession import my

class fc_view():
    url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/view.html?pagetype=2&id=40"

    header = {
        "Host":"test.jmsf.diligrp.com:8385",
        "Connection":"keep-alive",
        "Upgrade-Insecure-Requests":"1",
        "User-Agent":"Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
        "Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
        "Accept-Language":"zh-CN,zh;q=0.9",
        "Referer":"http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
        "Accept-Encoding":"gzip,deflate","Cookie":
        "UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5;UAP_firmId=9;UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4NzI1NzEsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIn0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4NzQzNzEsImlhdCI6MTYyNzg3MjU3MSwianRpIjoiNjM4MGNkOGEtNzU4MS00YjM2LTg4N2ItYzNhMGI0NzcwODA0In0.O6iQ0ccKQmgVybnf_nYhbcIGBO2eZmuOwOnBscl2scDIAN-XyRy4J57DmzQ45PQxhzg6bkIpgoYazN3ZVQ8xyTaanuAQCYi_rDJWqyKNJn_AHZWws9Gv-HuAPr1icsAZ6heME3nay-10u0zorbupmE9n_yIqH4LUEJZixqlHqCY"
    }

    def __init__(self):
        self.url=fc_view.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") )
        self.header=fc_view.header

fc = fc_view()
re=my.get(url=fc.url,headers=fc.header)
print(re.text)