import requests
import time
from requests import ConnectionError as rConnectionError
import logging


class Connect:

    @classmethod
    def request(cls, url, max_repeat=1):
        res = None
        for i in range(max_repeat):
            try:
                res = requests.get(url)
                break
            except rConnectionError as e:
                if i == 3:
                    logging.info('fail! {0}'.format(url))
                    return None
                time.sleep(5)
        return res.text

08dd54f9fdca9fc5a4ec1c64e30304f26b3fa117
<mask token>

<mask token>


class Connect:
    <mask token>

<mask token>


class Connect:

    @classmethod
    def request(cls, url, max_repeat=1):
        res = None
        for i in range(max_repeat):
            try:
                res = requests.get(url)
                break
            except rConnectionError as e:
                if i == 3:
                    logging.info('fail! {0}'.format(url))
                    return None
                time.sleep(5)
        return res.text

import requests
import time
from requests import ConnectionError as rConnectionError
import logging


class Connect:

    @classmethod
    def request(cls, url, max_repeat=1):
        res = None
        for i in range(max_repeat):
            try:
                res = requests.get(url)
                break
            except rConnectionError as e:
                if i == 3:
                    logging.info('fail! {0}'.format(url))
                    return None
                time.sleep(5)
        return res.text
