first-web-scraper
first-web-scraper copied to clipboard
soup syntax error
Guys,
Whenever I use beautiful soup I always get this syntax error, I am a very new user of python and I just don't understand this error.
You're using Python 3, and that's a Python 2 program. Use parenthesis: print(soup.prettify())
pip install bs4
`import requests from bs4 import BeautifulSoup
URL = 'https://ww.cityfm.com/ reps = request.get(url) soup = BeautifulSoup(resp.text, 'lxml') print(soup.prettify())