I noticed a really annoying bug: BeautifulSoup4 (package: bs4
) often finds less tags than the previous version (package: BeautifulSoup
).
Here's a reproductible instance of that issue:
import requests
import bs4
import BeautifulSoup
r = requests.get('http://wordpress.org/download/release-archive/')
s4 = bs4.BeautifulSoup(r.text)
s3 = BeautifulSoup.BeautifulSoup(r.text)
print 'With BeautifulSoup 4 : {}'.format(len(s4.findAll('a')))
print 'With BeautifulSoup 3 : {}'.format(len(s3.findAll('a')))
Output:
With BeautifulSoup 4 : 557
With BeautifulSoup 3 : 1701
The difference is not minor as you can see.
Here are the exact versions of the modules in case someone is wondering:
In [20]: bs4.__version__
Out[20]: '4.2.1'
In [21]: BeautifulSoup.__version__
Out[21]: '3.2.1'