from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen("http://www.pythonscraping.com/pages/warandpeace.html")
bsObj = BeautifulSoup(html.read())
nameList = bsObj.findAll("span", {"class": "green"})
print('nameList', nameList)
for name in nameList:
  print(name.get_text())