Skip to content

Instantly share code, notes, and snippets.

@aroberts
Created May 14, 2013 19:36
Show Gist options
  • Save aroberts/5578807 to your computer and use it in GitHub Desktop.
Save aroberts/5578807 to your computer and use it in GitHub Desktop.
BeautifulSoup4 bug illustration. HTML fragment taken from github.com
BeautifulSoup(open('fragment.html'), 'html5lib').select('div.secondary strong')
<html>
<head>
</head>
<body>
<div class="definitions">
<div class="inner columns equacols">
<div class="column main">
<h2>
git
<em>
/'&Eacute;&iexcl;&Eacute;&ordf;t/
</em>
</h2>
<p>
Git is an extremely fast, efficient, distributed version control system ideal for the collaborative development of software.
</p>
</div>
<!-- /.column.left -->
<div class="column secondary">
<p>
GitHub is the best way to collaborate with others. Fork, send pull requests and manage all your
<strong>
public
</strong>
and
<strong>
private
</strong>
git repositories.
</p>
</div>
<!-- /.column.right -->
</div>
<!-- /.columns.inner -->
</div>
<!-- /.definitions -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment