如何通过微信公众号二维码获得原始网页地址
通过对二维码进行解析得到了网址http://weixin.qq.com/r/IDkyKnPEoC7frTdJ92wy,但是直接进入的话会跳转到微信下载界面,如果直接用微信扫一扫则会进入公众号界面。
现在想在python下,对二维码进行解析,直接进入公众号界面。
问问有没有知道如何通过上述网址得到真实网址的方式。
import requests
url = "http://weixin.qq.com/r/IDkyKnPEoC7frTdJ92wy"
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36',
'Referer': 'https://wx.qq.com/',
'Cookie': 'put your cookie here'
}
response = requests.get(url, headers=headers)
# Check if the request was successful
if response.status_code == 200:
print(response.content)
else:
print("Failed to access the page.")