2

I am getting:

Couldn't find a tree builder with the features you requested: parser.html. Do you need to install a parser library?

when ever I try to parse my page. Please for help for I am still not very good at python.

import requests
from bs4 import BeautifulSoup

response = requests.get("http://stackoverflow.com/questions")
soup = BeautifulSoup(response.text,"parser.html")
questions = soup.select(".question-summary")
Ladoken
  • 113
  • 1
  • 1
  • 8

2 Answers2

2

The parser should be "html.parser" and not "parser.html"

Refer to the beautiful soup documentation for details.

koushikmln
  • 648
  • 6
  • 23
1

Use 'html.parser' instead of 'parser.html'. This may work.

If not, try: "html5lib"

Anthony R
  • 2,739
  • 1
  • 12
  • 11