pyc6

import zipfile,re

open_zip=zipfile.ZipFile('channel.zip','r')#在网页源代码里看到zip,打开网址下载channel.zip并放在代码文件母录下。
next_id='90052.txt'
count=1

while True:
    data=open_zip.read(next_id)
    data=str(data,encoding='utf-8')
    data_id=''.join(re.findall('[0-9]*',data))
    next_id=str(data_id)+'.txt'
    count+=1

    print(count,'next is:',next_id)

在最后一个文件中看到Collect the comments.故应收集comments。

import zipfile,re

open_zip=zipfile.ZipFile('channel.zip','r')
next_id='90052.txt'

count=1
comments=[]
str1=''

while True:
    data=open_zip.read(next_id)

    comments.append(open_zip.getinfo(next_id).comment)
    data=str(data,encoding='utf-8')
    if data[-1].isdigit():

        data_id=''.join(re.findall('[0-9]*',data))

        next_id=str(data_id)+'.txt'

        count+=1

        print(count,'next is:',next_id)

        for list in comments:
            str1+=str(list,encoding='utf-8')
    else:
        print(data)
        break


print(str1)

得到hockey字样
网址输入得到 it’s in the air. look at the letters.
再看hockey的组成字母oxygen.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值