0

So I use python to check the list of sites using proxy list

there is a little problem that is difficult for me to solve

The purpose of this program is to check sites that have been blocked by the government

this my source

r = requests.get(web, proxies={"http": proxy,"https": proxy},headers=uagent, timeout=60,allow_redirects=True)

and if I get a site that is blocked by the internet provider, i will get PRINT

if 'images/kominfo.gif' in r.text or 'images/palapamedia.png' in r.text or 'http://trustpositif.kominfo.go.id' in r.text:
     print({proxy} + {web} + 'BLOCKED')

then here is a little problem with the redirect showing 200 OK HERE IMAGE

but if I try to browse from MOZILLA with PROXY the site will be redirected to a internet provider site's like this so how can I get print if site is 301 redirected to biznetnetworks.com/safesurf?

like

print(web +"redirect to biznetworks") Video link here

  • Does this answer your question? [When I use python requests to check a site, if the site redirects me to another page, will I know?](https://stackoverflow.com/questions/13482777/when-i-use-python-requests-to-check-a-site-if-the-site-redirects-me-to-another) – buran Apr 13 '22 at 12:43
  • Also [Python Requests library redirect new url](https://stackoverflow.com/q/20475552/4046632) – buran Apr 13 '22 at 12:44

0 Answers0