Python Forum
Need to Verify URLs; getting SSLError
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to Verify URLs; getting SSLError
#1
Hi Team,

I am trying to verify URLs using urllib3 library.
For secure URLs, using 'https://'. I am getting a ststus code of 403.

when the URL is 'http://google.com'

>>> import urllib3
>>> http = urllib3.PoolManager()
>>> r = http.request('GET', 'http://google.com')
>>> r.status
403
when the URL is 'https://google.com'
>>> import urllib3
>>> http = urllib3.PoolManager()
>>> r = http.request('GET', 'https://google.com')
Error:
raise MaxRetryError(_pool, url, error or ResponseError(cause)) MaxRetryError: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),))
Could you please guide in this.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  BeautifulSoup not parsing other URLs giddyhead 0 1,169 Feb-23-2022, 05:35 PM
Last Post: giddyhead
  Need logic on how to scrap 100K URLs goodmind 2 2,569 Jun-29-2020, 09:53 AM
Last Post: goodmind
  Scrape multiple urls LXML santdoyle 1 3,514 Oct-26-2019, 09:53 PM
Last Post: snippsat
  Scrap text out of td table from URLS Gochix2020 4 5,578 Aug-03-2019, 02:56 AM
Last Post: Larz60+
  Regex URLs Django 2.1 sterion66 0 2,721 Nov-04-2018, 10:22 AM
Last Post: sterion66
  Scraping external URLs from pages Apook 5 4,148 Jul-18-2018, 06:42 PM
Last Post: nilamo
  hi new at python , trying to get urls from website dviry 6 4,634 Feb-24-2018, 07:34 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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