malformed start tag error - Python, BeautifulSoup, and Sipie - Ubuntu 10.04

前端 未结 5 1922
再見小時候
再見小時候 2021-02-14 23:31

I just installed python, mplayer, beautifulsoup and sipie to run Sirius on my Ubuntu 10.04 machine. I followed some docs that seem straightforward, but am encountering some iss

5条回答
  •  春和景丽
    2021-02-15 00:25

    Newer versions of BeautifulSoup uses HTMLParser rather than SGMLParser (due to SGMLParser being removed from the Python 3.0 standard library). As a result, BeautifulSoup can no longer process many malformed HTML documents correctly, which is what I believe you are encountering here.

    A solution to your problem is likely to be to uninstall BeautifulSoup, and install an older version (which will still work with Python 2.6 on Ubuntu 10.04LTS):

    sudo apt-get remove python-beautifulsoup
    sudo easy_install -U "BeautifulSoup==3.0.7a"
    

    Just be aware that this temporary solution will no longer work with Python 3.0 (which may become the default in future versions of Ubuntu).

提交回复
热议问题