- 博客(10)
- 收藏
- 关注
原创 清洗B站
#encoding:utf-8#注意编码格式要为utf-8,否则会编码错误text1 = ‘’’ xxxxx’’’text1 = text1.split(“rank-list-wrap”)[1]#切割,扔掉前面的会对数据清晰造成影响的文字#print(text1)for i in range(0,100):text = text1.split(’’)[i]#分块切割#print(text)rank = text.split(‘data-rank=’)[1].split(’"’)[1].spl
2021-01-07 21:48:18
109
原创 python加密
加密用make trans函数随机生成映射表,经过多次映射,相当于一个多表置换密码,将上一句歌词换成下一句歌词,效果类似于字符加密。运行如下:
2021-01-01 15:00:43
151
原创 python文件生成
生成文件#生成文件def batch_creat_file(path,begin,n=10):#path=生成的文件路径#begin=文件名字#n=生成个数k=0while k<n:file = open(path+begin+str(k)+".py",“w”)file.write(“print(“你好马保国”)”)file.close()k +=1batch_creat_file(“F:/12/”,“马保国”,n=1)def batch_rename_file(path,n
2020-12-31 15:35:04
176
原创 python学习
python反恐精英class Actor:def init(self,name):self.name=nameself.HP=100self.pp=0def install_clip(self,clip,bullet):passclass Gun:def init(self):self.clip=Noneclass Bullet:def init(self):self.damage=40class Clip:def init(self):self.bullet_list=[
2020-12-10 14:53:04
156
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人