def check_and_add(self, url):
    "\n        check the url to make sure that the url hasn't been fetched, and add url to urlfilter\n        "
    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
check the url to make sure that the url hasn't been fetched, and add url to urlfilter
def check_and_add(self, url):
    "\n        \n        "
    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