This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using BeautifulSoup to find all the meta tags | |
# Find out if it's a plone site | |
meta_tags = soup.findAll('meta') | |
for tag in meta_tags: | |
if tag.get('name') == 'generator': | |
generator = tag.get('content').lower() | |
# found is just a list of plone sites the spider has already found | |
if (generator.startswith('plone') and domain not in found) \ | |
or ('plone' in generator and domain not in found): |
NewerOlder