class Test:

    def __init__(self):
        self.urls = ['http://www.example.com', 'http://www.google.com',
            'http://www.yahoo.com', 'http://www.stackoverflow.com/',
            'http://www.reddit.com/']

def exception(self, request, exception):
    print('Problem: {}: {}'.format(request.url, exception))
Python requests with multithreading