def image_count_scanner(website): """Scan website number of images :param website: website to scan :return ScannerAttribute: """ count = len(website.soup.find_all('img')) bins = [(0, 5), (5, 10), (10, 15), (15, 20), (20, sys.maxsize)] return ScannerAttribute('img_count', count, index_of_interval_bin(bins, count), bins)
def image_count_scanner(website): """Scan website number of images :param website: website to scan :return ScannerAttribute: """ count = len(website.soup.find_all('img')) bins = [(0, 5), (5, 10), (10, 15), (15, 20), (20, sys.maxsize)] return ScannerAttribute('img_count', count, index_of_interval_bin(bins, count), bins)
def internal_links_scanner(website): internal_count, external_count = links_count(website) return ScannerAttribute('internal_links_count', internal_count, index_of_interval_bin(bins(), internal_count), bins())
def internal_links_scanner(website): internal_count, external_count = links_count(website) return ScannerAttribute('internal_links_count', internal_count, index_of_interval_bin(bins(), internal_count), bins())