remixpacks.club无法访问解决方案(基于Python的base64磁力链接地址解析)
最近 remixpacks.club无法访问了 但仍可以获取到下载链接
获取链接:
download.csdn.net/download/weixin_53403301/87485464
而每个歌曲都有对应的vol号 那么只需要下载vol号所对应的合辑即可下载到歌曲
合辑里面 压缩包名称对应的就是歌曲id 而链接如下(base64格式):
bWFnbmV0Oj94dD11cm46YnRpaDo0NWE4MDVkYmQ3OGI4ZGVjNzk2YTBhMTI3YzRiNGQyNDY2ZGRiYjlh
bWFnbmV0Oj94dD11cm46YnRpaDpkM2IwNjg1NTNjMzQyMzQ2Njk0MDhlZmQwMWMwMDlhNTJhZGJmYzA2
bWFnbmV0Oj94dD11cm46YnRpaDoxMWUxNDI2ZmFmYjVjMzk4ZjU5ZGY2NDliNzFiYmRhNTc2MDc5Mzdi
bWFnbmV0Oj94dD11cm46YnRpaDpkYzlmYTc5OTlmYTVkNTczNmVkN2U4YTg2NzM1YmY5ZjI0YmFiMTg3
bWFnbmV0Oj94dD11cm46YnRpaDo3MjkyMTUwOWZhMTk4ZWJkNDBmODk3NGRiNDMxZTRiZmQ2YzM4N2Y0
bWFnbmV0Oj94dD11cm46YnRpaDo3ZmJmZmNmNjdlMjZmMGMyMjE2MzExOWVmODk2ZjJhNzg3OGYzZWE3
bWFnbmV0Oj94dD11cm46YnRpaDphNGFmYTUxMTYzYmU4OTRmZDkzZjljZWIxODYwODc2NzM5MjQ2ZmVj
bWFnbmV0Oj94dD11cm46YnRpaDoxNGNiOTU5ZmVlYmNhMjEzMTM1ZDIyYWMxZGYzYmU0NDEyYWZkOGU5
bWFnbmV0Oj94dD11cm46YnRpaDpiYWZjOTIwMzdlMjQxMTVmMzM4ZTA1NGUwYzM4MzBhZjBhYzVmYWU0
bWFnbmV0Oj94dD11cm46YnRpaDpmYTUwZDcwM2ViNzdjNjUzY2M3N2FmMWE0MGE2ZWVmNzNjNGExZGQw
bWFnbmV0Oj94dD11cm46YnRpaDoyNDI3MzBmNTE5OTFhZDc2NTkxYjk2M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3MGU2YTgyMmNmMzdhMDIzMTlmZTI3ZGI4Mjc1
bWFnbmV0Oj94dD11cm46YnRpaDo5NDhlNzI4NWMwMzY0NzFhYWI5NjdkM2I1YzM2YzQ4ZDI1ODhkNTg3
bWFnbmV0Oj94dD11cm46YnRpaDo3MGRmODVhNGE5NzA3N2I4ZmRlMWZlZTkwN2ZkMWRkYTZiMDYxNzAz
import base64
import xlsxwriter
f = open("./test.txt", 'r', encoding="utf-8")
li=[]
li= f.readlines()
f.close()
lis=[]
for i in li:
i=str(i.split("\n")[0])
i=base64.b64decode(i)
i=str(i)
i=i.split("'")[1]
lis.append(i)
print(lis)
用上诉代码解码后:
['magnet:?xt=urn:btih:45a805dbd78b8dec796a0a127c4b4d2466ddbb9a', 'magnet:?xt=urn:btih:d3b068553c34234669408efd01c009a52adbfc06', 'magnet:?xt=urn:btih:11e1426fafb5c398f59df649b71bbda57607937b', 'magnet:?xt=urn:btih:dc9fa7999fa5d5736ed7e8a86735bf9f24bab187', 'magnet:?xt=urn:btih:72921509fa198ebd40f8974db431e4bfd6c387f4', 'magnet:?xt=urn:btih:7fbffcf67e26f0c22163119ef896f2a7878f3ea7', 'magnet:?xt=urn:btih:a4afa51163be894fd93f9ceb1860876739246fec', 'magnet:?xt=urn:btih:14cb959feebca213135d22ac1df3be4412afd8e9', 'magnet:?xt=urn:btih:bafc92037e24115f338e054e0c3830af0ac5fae4', 'magnet:?xt=urn:btih:fa50d703eb77c653cc77af1a40a6eef73c4a1dd0', 'magnet:?xt=urn:btih:242730f51991ad76591b96184fb2bd95b6b89bec', 'magnet:?xt=urn:btih:35fdd379641208dc6131f645a80766e776d30c87', 'magnet:?xt=urn:btih:72f4e13f58a91c829d9296865076d97862c10994', 'magnet:?xt=urn:btih:23f130a2504294201050954fc2c34c5ba9fe8946', 'magnet:?xt=urn:btih:d293a4c7348dfdef4baa81cd058f2ecea02f4111', 'magnet:?xt=urn:btih:5b91a37d1d402250679f71f59091ee000e8f593d', 'magnet:?xt=urn:btih:301bcfc7cc18c3aaeb59e5f5b41bc1f7755048c1', 'magnet:?xt=urn:btih:3e90a867aeb88a79445ef9510b0f9219bd693906', 'magnet:?xt=urn:btih:2ddd373d1ea9495e6c6bdeb940e0a1278e8fc33a', 'magnet:?xt=urn:btih:83d661d09935299cab1bd8ff5d883bc06779cb2d', 'magnet:?xt=urn:btih:737bad19bb81c592d4d31699fe07b93594b144c1', 'magnet:?xt=urn:btih:04f8e928a97b49e28dc597f756fe823504956682', 'magnet:?xt=urn:btih:a12fd9f4b6449cd67b0b44c8ee149bcbac275116', 'magnet:?xt=urn:btih:aea857a631c870e6a822cf37a02319fe27db8275', 'magnet:?xt=urn:btih:948e7285c036471aab967d3b5c36c48d2588d587', 'magnet:?xt=urn:btih:70df85a4a97077b8fde1fee907fd1dda6b061703']
最后利用xlsxwriter库把链接写进去
完整代码:
import base64
import xlsxwriter
f = open("./test.txt", 'r', encoding="utf-8")
li=[]
li= f.readlines()
f.close()
lis=[]
for i in li:
i=str(i.split("\n")[0])
i=base64.b64decode(i)
i=str(i)
i=i.split("'")[1]
lis.append(i)
print(lis)
excel = xlsxwriter.Workbook("rp.xlsx")
sheet = excel.add_worksheet('sheet1')
for i in range(1,351):
sheet.write(i, 0, str(lis[0]))
for i in range(351,786):
sheet.write(i, 0, str(lis[1]))
for i in range(786,1298):
sheet.write(i, 0, str(lis[2]))
for i in range(1298,1815):
sheet.write(i, 0, str(lis[3]))
for i in range(1815,2322):
sheet.write(i, 0, str(lis[4]))
for i in range(2322,3440):
sheet.write(i, 0, str(lis[5]))
for i in range(3440,4086):
sheet.write(i, 0, str(lis[6]))
for i in range(4086,4926):
sheet.write(i, 0, str(lis[7]))
for i in range(4926,5907):
sheet.write(i, 0, str(lis[8]))
for i in range(5907,6883):
sheet.write(i, 0, str(lis[9]))
for i in range(6883,7778):
sheet.write(i, 0, str(lis[10]))
for i in range(7778,8303):
sheet.write(i, 0, str(lis[11]))
for i in range(8303,9043):
sheet.write(i, 0, str(lis[12]))
for i in range(9043,10412):
sheet.write(i, 0, str(lis[13]))
for i in range(10412,11048):
sheet.write(i, 0, str(lis[14]))
for i in range(11048,12445):
sheet.write(i, 0, str(lis[15]))
for i in range(12445,12993):
sheet.write(i, 0, str(lis[16]))
for i in range(12993,13465):
sheet.write(i, 0, str(lis[17]))
for i in range(13465,14012):
sheet.write(i, 0, str(lis[18]))
for i in range(14012,14400):
sheet.write(i, 0, str(lis[19]))
for i in range(14400,15164):
sheet.write(i, 0, str(lis[20]))
for i in range(15164,15821):
sheet.write(i, 0, str(lis[21]))
for i in range(15821,16916):
sheet.write(i, 0, str(lis[22]))
for i in range(16916,17213):
sheet.write(i, 0, str(lis[23]))
for i in range(17213,17432):
sheet.write(i, 0, str(lis[24]))
for i in range(17432,17648):
sheet.write(i, 0, str(lis[25]))
excel.close()
依赖包及其对应的版本号
PyQt5 5.10.1
PyQt5-Qt5 5.15.2
PyQt5-sip 12.9.0
pyinstaller 4.5.1
pyinstaller-hooks-contrib 2021.3
Pyinstaller -F setup.py 打包exe
Pyinstaller -F -w setup.py 不带控制台的打包
Pyinstaller -F -i xx.ico setup.py 打包指定exe图标打包
打包exe参数说明:
-F:打包后只生成单个exe格式文件;
-D:默认选项,创建一个目录,包含exe文件以及大量依赖文件;
-c:默认选项,使用控制台(就是类似cmd的黑框);
-w:不使用控制台;
-p:添加搜索路径,让其找到对应的库;
-i:改变生成程序的icon图标。
如果要打包资源文件
则需要对代码中的路径进行转换处理
另外要注意的是 如果要打包资源文件 则py程序里面的路径要从./xxx/yy换成xxx/yy 并且进行路径转换
但如果不打包资源文件的话 最好路径还是用作./xxx/yy 并且不进行路径转换
def get_resource_path(relative_path):
if hasattr(sys, '_MEIPASS'):
return os.path.join(sys._MEIPASS, relative_path)
return os.path.join(os.path.abspath("."), relative_path)
而后再spec文件中的datas部分加入目录
如:
a = Analysis(['cxk.py'],
pathex=['D:\\Python Test\\cxk'],
binaries=[],
datas=[('root','root')],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
而后直接Pyinstaller -F setup.spec即可
如果打包的文件过大则更改spec文件中的excludes 把不需要的库写进去(但是已经在环境中安装了的)就行