Just installed BeautifulSoup Python 3.3.0

后端 未结 3 906
轻奢々
轻奢々 2020-12-21 10:03

Does anyone know how to fix it. I am using Mac OS 10.8.2

>>> from bs4 import BeautifulSoup
Traceback (most recent call last):
  File \"         


        
3条回答
  •  感情败类
    2020-12-21 10:23

    In Python 3 print is a function; it should be:

    print(soup.prettify())
    

    Install bs4 correctly or use a newer version if it is a bug. beautifulsoup4==4.1.3 works fine on Python 3.3.

提交回复
热议问题