'check the url to make sure that the url hasn\'t been fetched, and add url to urlfilter'

def check_and_add(self, url):

    result = False
    if self.check(url):
        if (self._url_set is not None):
            result = (url not in self._url_set)
            self._url_set.add(url)
        else:
            result = (not self._bloom_filter.add(url))
    return result
