#import requests import urllib import bs4 try: html=urllib.urlopen('http://anyun.org') except HTTPerror as e: print(e) print('xxxx') else: bsobj = bs4.BeautifulSoup(html.read()) #print (html.read()) try: namelist = bsobj.findall("li",{"color":"#ff0000"}) except TypeError as b: print(b) else: print (namelist) #print (bsobj.div.lum111) #print('aa')