紧接着level2,进入level3。突然发现这样挺好玩的,一边解谜一边直播blog,带感啊~上图:
根据level2的经验,直接看html代码,发现果然还是这样:
还是tornado搞起:
import tornado.httpclient def small(a): if a>='a' and a<='z': return True else: return False def big(a): if a>='A' and a<='Z': return True else: return False cli=tornado.httpclient.HTTPClient() data=cli.fetch('http://www.pythonchallenge.com/pc/def/equality.html') new=data.body.decode('utf8') pos=new.find('<!--') new=new[pos+4:] for i in range(len(new)): if big(new[i]) and big(new[i+1]) and big(new[i+2]) and small(new[i+3])\ and big(new[i+4]) and big(new[i+5]) and big(new[i+6])\ and small(new[i+7]): if small(new[i-1]): print(new[i+3])
l i n k e d l i s t
转载请注明:转自 http://blog.csdn.net/littlethunder/article/details/8936748