处理待爬链接,目标网址数据量大的情况下,判断目标网址是否已存在
from bloom_filter import BloomFilter bloom = BloomFilter(max_elements=10000000, error_rate=0.1) # 添加URL bloom.add('https://www.cnblogs.com/6min')
#判断是否在 exists = bloom.__contains__('https://www.cnblogs.com/6min')
2024-03-02 09:36:40
处理待爬链接,目标网址数据量大的情况下,判断目标网址是否已存在
from bloom_filter import BloomFilter bloom = BloomFilter(max_elements=10000000, error_rate=0.1) # 添加URL bloom.add('https://www.cnblogs.com/6min')
#判断是否在 exists = bloom.__contains__('https://www.cnblogs.com/6min')