Script:
#!/usr/bin/python3.2 from bs4 import BeautifulSoup as bs content = '<p class="title">hello world</p>' s = bs(content) print(s.find_all(class="title"))
Output:
File "bs.py", line 7 print(s.find_all(class="title")) ^ SyntaxError: invalid syntax
BS Docs:
soup.find_all(id="link2") # [<a class="sister" href="http:
Question: Why is there a syntax error?
user621819
source share