def load_nd_models(cache_db, app_version): """ 初始化并返回网盘类应用需要的 model :param cache_db: 中间数据库的地址 :param app_version: 应用的版本 :return: """ model_nd_col = model_nd.NetDisk(cache_db, app_version) model_im_col = model_nd_col.im return model_nd_col, model_im_col
def __init__(self, node, extract_deleted, extract_source): self.cache = ds.OpenCachePath('baidunetdisk') if not os.path.exists(self.cache): os.mkdir(self.cache) self.hash = unity_c37r.md5(node.PathWithMountPoint) self.nd = model_nd.NetDisk(self.cache + '/{}'.format(self.hash), BDY_APP_VERSION) self.need_parse = self.nd.need_parse if not self.need_parse: return self.node = node self.extract_deleted = extract_deleted self.extract_source = extract_source self.account_folders = list()
def __init__(self, root, extract_deleted, extract_source): self.root = root self.extract_deleted = extract_deleted self.extract_source = extract_source self.cache_db = self.__get_cache_db() self.has_data = self.__copy_db_file() self.model_nd_col = model_nd.NetDisk(self.cache_db) self.model_im_col = self.model_nd_col.im self.account_col = self.__fetch_account_col() self.cloud_p2p_col = None self.file_list_col = None self.c_recover_helper = None self.f_recover_helper = None self.using_account = None
def __load_nd_models(cache_db, app_version): model_nd_col = model_nd.NetDisk(cache_db, app_version) model_im_col = model_nd_col.im return model_nd_col, model_im_col
def __init__(self, node, extract_deleted, extract_source, app_name='YunkanBaiduPan'): super(YunkanBaiduPanParser, self).__init__(node, extract_deleted, extract_source, app_name) self.app_version = BAIDUPANVERSION self.account_id = self._get_owner_phone(node) self.model_nd = model_nd.NetDisk(self.cache_db, self.app_version) self.debug = DEBUG