I am trying to use a CSS selector on a specific tag on the webpage's source. This is what I have right now:
from bs4 import BeautifulSoup
import requests
import pprint
r2 = requests.get("http://spot311.calgary.ca/reports/15-00462387")
soup = BeautifulSoup(r2.text, 'html.parser')
pprint(soup.select("blockquote"))
On the page source, there is only one tag called "blockquote", but I am getting the error:
pprint(soup.select("blockquote"))
TypeError: 'module' object is not callable
I googled around and turned up some people having issues where they only wrote
import BeautifulSoup
instead of
from BeautifulSoup import BeautifulSoup
But I already have
from bs4 import BeautifulSoup
which is correct for my python distribution, I know because I have another program that uses this import and it works just fine.
Am I just not using the selector right?