Python Forum
why does my python request cannot work with proxy and cannot get captured by fiddler
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why does my python request cannot work with proxy and cannot get captured by fiddler
#1
why does my python request cannot work with proxy and cannot get captured by fiddler?
import urllib.request

proxy= 'https://94.131.116.141:14599'

# Build ProxyHandler object by given proxy
proxy_support=urllib.request.ProxyHandler({'https':proxy})
# Build opener with ProxyHandler object
opener = urllib.request.build_opener(proxy_support)
# Install opener to request
urllib.request.install_opener(opener)
# Open url
r = urllib.request.urlopen('http://icanhazip.com',timeout = 1000)
print (r.read().decode("utf-8"))
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how can I correct the Bad Request error on my curl request tomtom 8 5,058 Oct-03-2021, 06:32 AM
Last Post: tomtom
  Prevent urllib.request from using my local proxy spacedog 0 2,871 Apr-24-2021, 08:55 PM
Last Post: spacedog
  urllib.request.ProxyHandler works with bad proxy spacedog 0 5,913 Apr-24-2021, 08:02 AM
Last Post: spacedog
  Getting a GET request output text into a variable to work with it. LeoT 2 2,985 Feb-24-2021, 02:05 PM
Last Post: LeoT
  Problem Getting Pip To Work Behind Linux Proxy joedirgy 0 1,733 Feb-06-2021, 07:57 PM
Last Post: joedirgy
  Python Request Errors PythonNoob1998 7 3,902 Jan-07-2021, 05:18 PM
Last Post: buran
  ImportError: cannot import name 'Request' from 'request' abhishek81py 1 3,922 Jun-18-2020, 08:07 AM
Last Post: buran
  get file by proxy and header using urllib.request.urlretrieve randyjack 0 2,254 Mar-12-2020, 09:22 AM
Last Post: randyjack
  pass captured value from input() to where clause metro17 5 3,264 Sep-09-2019, 05:24 AM
Last Post: metro17
  Problems with using request in python 3 Maaniac 3 3,282 Feb-15-2018, 08:58 AM
Last Post: Maaniac

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020