Skip to content Skip to sidebar Skip to footer

Python3.6 Beautifulsoup Is Not Working

my codes like below; source_code = requests.get(kale_url_keys) plain_text = source_code.text soup = BeautifulSoup('plain_text ') or r = requests.get(kale_url_keys) html = r.conte

Solution 1:

Do two things:

  • install the latest stablePython 3.6.0
  • update beautifulsoup4 - make sure you update it in the correct Python 3.6.0 environment:

    pip3 install beautifulsoup4 --upgrade

Solution 2:

Try instead of getting using request.urlopen and instead of html.parser lxml I'm on the same version of python as you are, everything working. Seems like you're getting errors from html.parser so using lxml parser should work

pip install lxml

or Here for Linux or other installation methods. Usage: soup = BeautifulSoup(html, "lxml")

Post a Comment for "Python3.6 Beautifulsoup Is Not Working"