from site_health.scraper.models import BaseScraper, ScraperFileCache


class SSLCertScraper(BaseScraper, ScraperFileCache):
    """
    Saves a ssl certificate as string
    """

    def _scrape(self):
        import ssl

        # todo timeouts
        url = (
            self.page.full_url.replace("http://", "")
            .replace("https://", "")
            .split("/")[0]
        )
        cert = ssl.get_server_certificate((url, 443))
        return cert

d4c10110e82210fe6a57634103ef47c0402cc135
<mask token>


class SSLCertScraper(BaseScraper, ScraperFileCache):
    <mask token>
    <mask token>

<mask token>


class SSLCertScraper(BaseScraper, ScraperFileCache):
    <mask token>

    def _scrape(self):
        import ssl
        url = self.page.full_url.replace('http://', '').replace('https://', ''
            ).split('/')[0]
        cert = ssl.get_server_certificate((url, 443))
        return cert

<mask token>


class SSLCertScraper(BaseScraper, ScraperFileCache):
    """
    Saves a ssl certificate as string
    """

    def _scrape(self):
        import ssl
        url = self.page.full_url.replace('http://', '').replace('https://', ''
            ).split('/')[0]
        cert = ssl.get_server_certificate((url, 443))
        return cert

from site_health.scraper.models import BaseScraper, ScraperFileCache


class SSLCertScraper(BaseScraper, ScraperFileCache):
    """
    Saves a ssl certificate as string
    """

    def _scrape(self):
        import ssl
        url = self.page.full_url.replace('http://', '').replace('https://', ''
            ).split('/')[0]
        cert = ssl.get_server_certificate((url, 443))
        return cert

from site_health.scraper.models import BaseScraper, ScraperFileCache


class SSLCertScraper(BaseScraper, ScraperFileCache):
    """
    Saves a ssl certificate as string
    """

    def _scrape(self):
        import ssl

        # todo timeouts
        url = (
            self.page.full_url.replace("http://", "")
            .replace("https://", "")
            .split("/")[0]
        )
        cert = ssl.get_server_certificate((url, 443))
        return cert
