/** * 获取收藏 * @return 返回收藏列表 */ fungetSaveDM():ArrayList<Map<String,Any>?>{ val likes:ArrayList<Map<String,Any>?> = ArrayList<Map<String,Any>?>() val likeList = iwhDataOperator.getSHP("likeKey","like","") if(likeList.isNotEmpty()){ //匹配动漫 val l = Regex("@@.*?.html").findAll(likeList) for (i in l){ //获取名 val l_name = Regex("@@.*?>").find(i.value)?.value?.replace(Regex("[@>]"),"").toString() //获取播放链接 val l_id = Regex(">.*?.html").find(i.value)?.value?.replace(">","").toString() //放入MAP val temMap = linkedMapOf<String,Any>().apply { put("itemName",l_name) put("itemId",l_id) } //放入list likes.add(temMap)