All Questions
32 questions
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 ...
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&...
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" ...
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
...
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/...
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, ...
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'...
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\...
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!
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:
...
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 ...
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
...
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 ...
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=...
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-...