Skip to content

Instantly share code, notes, and snippets.

@krmaxwell
Created September 20, 2012 15:25
Show Gist options
  • Save krmaxwell/3756577 to your computer and use it in GitHub Desktop.
Save krmaxwell/3756577 to your computer and use it in GitHub Desktop.
Meta tags and BeautifulSoup
from bs4 import BeautifulSoup
soup = BeautifulSoup(response)
metatags = soup.find_all('meta',attrs={'name':'generator'})
for tag in metatags:
print tag
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta content="WordPress 3.4.2" name="generator"/>
@Mkurbanov
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment