Skip to content

Instantly share code, notes, and snippets.

View adamcheasley's full-sized avatar
🤓
Hacking

Adam Cheasley adamcheasley

🤓
Hacking
View GitHub Profile
# 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):