Skip to main content

All Questions

Tagged with
0 votes
1 answer
294 views

ConnectionResetError with Python requests and urllib libraries when accessing specific URL

I'm encountering a ConnectionResetError when attempting to access a specific URL using both Python requests and urllib libraries. Despite providing appropriate headers, the connection is being ...
chandandanjo's user avatar
0 votes
0 answers
983 views

urllib.error.URLError: <urlopen error Tunnel connection failed: 403 URLBlocked>

i am trying to scrap weather and pollution data from openweathermap through python, i am using urllib and the URL i try to access is HTTPS, here is my code : api_key = self.dict_config["api_key&...
FrozzenFinger's user avatar
1 vote
2 answers
2k views

Python urllib request always results in Error 400: Bad Request

Thanks for reading. For a small reserach project, I'm trying to gather some data from KBB (www.kbb.com). However, I'm always getting a "urllib.error.HTTPError: HTTP Error 400: Bad Request" ...
dmort's user avatar
  • 301
3 votes
1 answer
5k views

Windows 2019, Python 3.9.7, urllib, certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)

Python scripts on Windows 2019 have started to fail for me, apparently due to botched local truststore and I seem to be unable to make it right. Stacktrace C:\tmp\DEL (master -> origin) λ python ...
Michal Karm Babacek's user avatar
0 votes
1 answer
1k views

How to read image from URL (urllib.error.HTTPError: HTTP Error 403: Forbidden)

I have a code that returns an image (API) : url1 = "https://api.twilio.com/2010-04-01/Accounts/AC9567862a70d7b000488e8ba80bc19787/Messages/MMebd9e089637c2c740608199af762fc19/Media/...
sirimiri's user avatar
  • 539
1 vote
0 answers
21 views

Does PEP 476 affect non-TLS connections?

When making a request with urllib: from urllib.request import urlopen f = urlopen('http://example.com/foo') I observed: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED]. This answer led me to PEP 476, ...
davetapley's user avatar
0 votes
1 answer
471 views

Python urlopen does not work for every website

Hi i have a working code, which opens (with urlopen from urllib.request) perfectly most of the websites I tell him to. But for some reason this doesn't seem to work for some specific websites. I don'...
Jennifer Arles's user avatar
1 vote
0 answers
453 views

Geopy - ImportError: cannot import name 'HTTPSHandler' from 'urllib.request'

When trying to import distance method from geopy.distance I am receiving the below error: from geopy.distance import distance File "C:\Users\cnethi\AppData\Local\Continuum\miniconda3\envs\...
Chandrakanth's user avatar
0 votes
1 answer
23 views

Perform search on given site (Jalopnik) using HTTPS/URLLIB and Python

Just need to know how to use HTTP or urllib (requests) to open Jalopnik, enter a word in its search bar, and 'click' search. Thank you so much!
Skye's user avatar
  • 1
1 vote
0 answers
100 views

Python urllib request not same as clicking in browser

I need some help... I'm trying to get some code to do some virtual clicking for me with urllib, and also using some wireshark but it just won't work. Here is some relevant code... Python Code: ...
FjZ45's user avatar
  • 11
0 votes
1 answer
980 views

urllib.error.URLError unknown url type 'https>

Im using this script to parse a site and download files but it keeps returning the same error. I was under the assumption that urllib.parse.encode and urllib.parse.urljoin but it was unclear how or ...
K2nice's user avatar
  • 87
2 votes
0 answers
271 views

How to make requests to a HTTPS page using urllib and proxies on python3

I am making something where I need to be sending requests with post data to a https page. While trying to make this I got the following error. urllib.error.HTTPError: HTTP Error 500: Domain Not Found ...
Mruusi's user avatar
  • 43
1 vote
2 answers
9k views

Python 3 : HTTP Error 405: Method Not Allowed

I'm getting 'HTTP Error 405: Method Not Allowed' error. My code is import urllib.request import urllib.parse try: url = 'https://www.google.com/search' values = {'q': 'python programming ...
Anudeex Shetty's user avatar
0 votes
1 answer
2k views

python 3.x urllib.request.HTTPSHandler override METHOD GET POST

context = ssl.create_default_context() context.load_cert_chain(certificate, pkey) opener = urllib.request.build_opener(urllib.request.HTTPSHandler(context=context)) response = opener.open(url, data=...
NFN_NLN's user avatar
  • 45
1 vote
1 answer
2k views

extract data from https site into python using urllib (your request cannot be completed error)

I've been attempting to extract the contents of a https website into python using urllib. I've used 4 lines of code. import urllib fhand = urllib.urlopen('https://www.tax.service.gov.uk/view-my-...
Owen's user avatar
  • 169

15 30 50 per page