First try to use BeautifulSoup 4, then try BeautifulSoup 3.

BeautifulSoup 4 is potentially faster (and, if the placebo effect isn't
operating here, it does work faster on my 400MHz ARM-based NAS with 128MB of
memory).

To get the most benefit from BeautifulSoup 4, the user should install
python-lxml, which consists of Pythonic bindings to the libxml2 and libxslt
libraries (written in C).