如何获取百度网盘的目录生成树以及url?

如何获取百度网盘的目录生成树以及url,如
/root/aa/b/aaa.exe
然后aaa.exe用二进制打开里面就是url链接

你是要获取百度网盘的目录树 还是什么?

https://www.zhihu.com/question/308103349/answer/730668628 参考这个

__title__ = ''
__author__ = 'jungle'
__mtime__ = '2019-01-18'
"""
#!/usr/bin/env python3

# -*- coding:utf-8 -*-


from tkinter import *

from tkinter.filedialog import askopenfilename

from tkinter.filedialog import asksaveasfilename

from tkinter.ttk import *

import sqlite3


def select_db_file():
    db_file = askopenfilename(title="请选择BaiduYunCacheFileV0.db文件", filetypes=[('db', '*.db')])

    db.set(db_file)


def select_save_file():
    save_file = asksaveasfilename(filetypes=[('文件', '*.txt')])

    f.set(save_file + ".txt")


def write_file(file_dict, f, item, gap=""):
    if item == "/":

        f.write("━" + "/" + "\n")

        for i in file_dict["/"]:

            f.write("┣" + "━" + i + "\n")

            i = item + i + "/"

            if i in file_dict:
                write_file(file_dict, f, i, gap="┣━")

    else:

        gap = "┃  " + gap

        for i in file_dict[item]:

            f.write(gap + i + "\n")

            i = item + i + "/"

            if i in file_dict:
                write_file(file_dict, f, i, gap)


def create_baiduyun_filelist():
    file_dict = {}

    conn = sqlite3.connect(db.get())

    cursor = conn.cursor()

    cursor.execute("select * from cache_file")

    while True:

        value = cursor.fetchone()

        if not value:
            break

        path = value[2]

        name = value[3]

        size = value[4]

        isdir = value[6]

        if path not in file_dict:

            file_dict[path] = []

            file_dict[path].append(name)

        else:

            file_dict[path].append(name)

    with open(f.get(), "w", encoding='utf-8') as fp:

        write_file(file_dict, fp, "/")


root = Tk()

root.title('百度云文件列表生成工具')

db_select = Button(root, text=' 选择DB文件 ', command=select_db_file)

db_select.grid(row=1, column=1, sticky=W, padx=(2, 0), pady=(2, 0))

db = StringVar()

db_path = Entry(root, width=80, textvariable=db)

db_path['state'] = 'readonly'

db_path.grid(row=1, column=2, padx=3, pady=3, sticky=W + E)

save_path = Button(root, text='选择保存地址', command=select_save_file)

save_path.grid(row=2, column=1, sticky=W, padx=(2, 0), pady=(2, 0))

f = StringVar()

file_path = Entry(root, width=80, textvariable=f)

file_path['state'] = 'readonly'

file_path.grid(row=2, column=2, padx=3, pady=3, sticky=W + E)

create_btn = Button(root, text='生成文件列表', command=create_baiduyun_filelist)

create_btn.grid(row=3, column=1, columnspan=2, pady=(0, 2))

root.columnconfigure(2, weight=1)

root.mainloop()

我这边有java代码,可以获取到所有的网盘目录,需要的话私信我吧!
img