mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-24 09:50:23 +00:00
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@45 e7d03fd6-7b0d-0410-9947-9c21f3af8025
30 lines
836 B
Python
30 lines
836 B
Python
from UrlData import UrlData
|
|
from HttpUrlData import HttpUrlData
|
|
_supportHttps=1
|
|
try: import httpslib
|
|
except: _supportHttps=0
|
|
|
|
class HttpsUrlData(HttpUrlData):
|
|
"""Url link with https scheme"""
|
|
|
|
def __init__(self,
|
|
urlName,
|
|
recursionLevel,
|
|
parentName = None,
|
|
baseRef = None,
|
|
line = 0):
|
|
HttpUrlData.__init__(self, urlName, recursionLevel,
|
|
parentName, baseRef, line)
|
|
|
|
def _getHTTPObject(self, host):
|
|
return httpslib.HTTPS(host)
|
|
|
|
def check(self, config):
|
|
if _supportHttps:
|
|
HttpUrlData.check(self, config)
|
|
else:
|
|
self.setWarning("HTTPS url ignored")
|
|
self.logMe(config)
|
|
|
|
def __str__(self):
|
|
return "HTTPS link\n"+UrlData.__str__(self)
|