更新文件: webdav_simulator.amd64, webdav_simulator.exe, get115list.py, run.sh, get115list.exe 等7个文件
This commit is contained in:
BIN
get115list.exe
Normal file
BIN
get115list.exe
Normal file
Binary file not shown.
@ -5,16 +5,23 @@ import argparse
|
|||||||
from p115 import P115Client, P115FileSystem
|
from p115 import P115Client, P115FileSystem
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
|
import os
|
||||||
|
|
||||||
count=0
|
count=0
|
||||||
|
|
||||||
def walk_dir(fs,f):
|
def walk_dir(fs,f,replaceroot):
|
||||||
dirlist=list()
|
dirlist=list()
|
||||||
file_list = fs.listdir_attr()
|
file_list = fs.listdir_attr()
|
||||||
for file_obj in file_list:
|
for file_obj in file_list:
|
||||||
if not file_obj.is_directory:
|
if not file_obj.is_directory:
|
||||||
print(file_obj.path+"\t"+str(file_obj.size))
|
path = file_obj.path
|
||||||
f.write(file_obj.path+"\t"+str(file_obj.size)+"\n")
|
paths = path.split("/")
|
||||||
|
if replaceroot!="":
|
||||||
|
if len(paths)>=3:
|
||||||
|
path=os.path.join("/",replaceroot,*paths[2:])
|
||||||
|
|
||||||
|
print(path+"\t"+str(file_obj.size))
|
||||||
|
f.write(path+"\t"+str(file_obj.size)+"\n")
|
||||||
f.flush()
|
f.flush()
|
||||||
else:
|
else:
|
||||||
dirlist.append(file_obj.path)
|
dirlist.append(file_obj.path)
|
||||||
@ -24,7 +31,7 @@ def walk_dir(fs,f):
|
|||||||
count=count+1
|
count=count+1
|
||||||
if count%4==0:
|
if count%4==0:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
walk_dir(fs,f)
|
walk_dir(fs,f,replaceroot)
|
||||||
return
|
return
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -32,6 +39,7 @@ def main():
|
|||||||
parser.add_argument('--cookie', type=str, required=True, help='115Cookie')
|
parser.add_argument('--cookie', type=str, required=True, help='115Cookie')
|
||||||
parser.add_argument('--url', type=str, required=True, help='115ShareUrl')
|
parser.add_argument('--url', type=str, required=True, help='115ShareUrl')
|
||||||
parser.add_argument('--output', type=str, required=True, help='outputfile')
|
parser.add_argument('--output', type=str, required=True, help='outputfile')
|
||||||
|
parser.add_argument('--replaceroot', type=str, default="", required=False, help='替换根目录名称')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
cookie=args.cookie
|
cookie=args.cookie
|
||||||
shareUrl=args.url
|
shareUrl=args.url
|
||||||
@ -45,7 +53,7 @@ def main():
|
|||||||
|
|
||||||
count=0
|
count=0
|
||||||
f=open(args.output, mode="a", encoding="utf-8")
|
f=open(args.output, mode="a", encoding="utf-8")
|
||||||
walk_dir(fs,f)
|
walk_dir(fs,f,args.replaceroot)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
2
run.bat
2
run.bat
@ -1,3 +1,3 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
webdav_simulator.exe --alist_config "http://192.168.1.2:5678/,,#http://192.168.1.3:5678,alist-1234-5678," xy115-2.txt
|
webdav_simulator.exe --alist_config "http://192.168.1.2:5678/,,#http://192.168.1.3:5678,alist-1234-5678," xy115-all.txt
|
||||||
|
2
run.sh
2
run.sh
@ -18,4 +18,4 @@ cd "${progdir}"
|
|||||||
mkdir tmp
|
mkdir tmp
|
||||||
chmod 777 tmp
|
chmod 777 tmp
|
||||||
export TMPDIR=tmp
|
export TMPDIR=tmp
|
||||||
./webdav_simulator.amd64 --alist_config "http://192.168.1.2:5678,,#http://192.168.1.3:5678,alist-1234-5678," xy115-2.txt
|
./webdav_simulator.amd64 --alist_config "http://192.168.1.2:5678,,#http://192.168.1.3:5678,alist-1234-5678," xy115-all.txt
|
||||||
|
Binary file not shown.
Binary file not shown.
484923
xy115-all.txt
Normal file
484923
xy115-all.txt
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user