Open
Description
# -*- coding: utf-8 -*-
"""
file: demo.py
create: 2025/4/17 17:55
author: s0ing
summary:
"""
import re
import requests
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"Accept-Language": "zh-CN,zh;q=0.9",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Pragma": "no-cache",
"Referer": "https://jytyj.shangqiu.gov.cn",
"Sec-Fetch-Dest": "document",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-User": "?1",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
"sec-ch-ua": "\"Google Chrome\";v=\"135\", \"Not-A.Brand\";v=\"8\", \"Chromium\";v=\"135\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\""
}
url = "https://jytyj.shangqiu.gov.cn"
response = requests.get(url, headers=headers)
TWAF_AR = re.findall('TWAF_AR=(.*?);', response.text)[0]
print(TWAF_AR)
cookies = {
"Power::SiteUniqueVisitorKey": "/49/",
"TWAF_AR": TWAF_AR
}
url = "https://jytyj.shangqiu.gov.cn/zwgk/fdzdgknr/zfcg31sqsjytyj/zbgg31sqsjytyj"
response = requests.get(url, headers=headers, cookies=cookies)
print(response.text)
Metadata
Metadata
Assignees
Labels
No labels