Skip to content

Instantly share code, notes, and snippets.

@krmaxwell
Created September 20, 2012 15:25

Revisions

  1. Kyle Maxwell revised this gist Sep 20, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion parsing.py
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,6 @@

    soup = BeautifulSoup(response)

    metatags = soup.find_all('meta', name='generator')
    metatags = soup.find_all('meta',attrs={'name':'generator'})
    for tag in metatags:
    print tag
  2. Kyle Maxwell created this gist Sep 20, 2012.
    7 changes: 7 additions & 0 deletions parsing.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    from bs4 import BeautifulSoup

    soup = BeautifulSoup(response)

    metatags = soup.find_all('meta', name='generator')
    for tag in metatags:
    print tag
    2 changes: 2 additions & 0 deletions tags
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <meta content="WordPress 3.4.2" name="generator"/>