pythonchallenge level 5

来源:互联网 发布:tensorflow 二次开发 编辑:程序博客网 时间:2024/06/05 20:11

这一题开始就不是特别直观了。

1,http://www.pythonchallenge.com/pc/def/channel.html,url没发现有什么特殊的。。。

2,图片是一个牛仔裤,还是不拉链的啊,牛仔裤,链子算提示的话:也只能有zip了

3,看源码,源码也有个zip哦


zip,非做网站的,对于zip也仅知道是压缩包而已,但去哪里找压缩包呢?

又没给地址下:point出现了,,,把html改为zip试试看,有料哦。。。下了个channel。zip


解压看readme。txt,好程序员都先看readme,哈哈。。。

是不是很类似前面的那个遍历url的题,现在是遍历文件哦,遍历代码如下:

index = "90052"    while True:        data = open("./channel/" + index +".txt", "r").read()        m = re.findall("\d+",data)        print data        index = m[0]

得出一个提示:Collect the comments.

comments,什么comments呢?第一个想到的也是压缩包了吧,查看api,zipinfo真的有comment哦,这里有s哦,

f = zipfile.ZipFile("channel.zip","r")    print set("".join([info.comment for info in f.infolist()]))    f.close()    raw_input("stop")

得到结果:set([' ', '\n', 'E', 'G', '*', 'O', 'N', 'Y', 'X'])

拼出一个单词:oxygen,缺氧了吧,就是下一题的答案了

原创粉丝点击