I am using Python 2.7 + BeautifulSoup 4.3.2.
I am trying to use Python and BeautifulSoup to pick up information on a webpage. Because the webpage is in the company w
The best way to open a local file with BeautifulSoup is to pass it an open file handler directly. http://www.crummy.com/software/BeautifulSoup/bs4/doc/#making-the-soup
from bs4 import BeautifulSoup
soup = BeautifulSoup(open("C:\\example.html"), "html.parser")
for city in soup.find_all('span', {'class' : 'city-sh'}):
print(city)