I know that requests module in python help to follow redirections, But if Target use Refresh Meta Tag
for Redirect user to another page requests module can't diagnose this attempt ...
For Example https://demo.tractmanager.com/ Redirect us to another page and requests module just can diagnose port of this page https://demo.tractmanager.com:443/
I want fix this problem with Regular Expressions Module (re) But I think that isn't good choice for solve it!
what's your suggestion and prefer?
For example I coded like that
fopen2 = open("clean url.txt", "r")
splurl = fopen2.read().split('
')
for i in splurl:
getthis = requests.get(i)
sop = BeautifulSoup(getthis.text, 'html.parser')
if "http-equiv="refresh"" in sop:
print('yes')
else:
print(getthis.url)
Thanks :)
question from:
https://stackoverflow.com/questions/66051274/how-i-can-follow-the-redirections-by-refresh-meta-tag-with-python3 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…