mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 04:45:27 +00:00
🐛 Fix honey wiki data parse
This commit is contained in:
parent
30ea0b99cb
commit
ac879cc353
@ -208,7 +208,7 @@ class WikiModel(Model):
|
||||
chaos_data = re.findall(r"sortable_data\.push\((.*?)\);\s*sortable_cur_page", response.text)[0]
|
||||
json_data = jsonlib.loads(chaos_data) # 转为 json
|
||||
for data in json_data: # 遍历 json
|
||||
data_name = re.findall(r">(.*)<", data[1])[0] # 获取 Model 的名称
|
||||
data_name = re.findall(r">(.*)<", data[1])[0].replace("\r", "") # 获取 Model 的名称
|
||||
if with_url: # 如果需要返回对应的 url
|
||||
data_url = HONEY_HOST.join(re.findall(r"\"(.*?)\"", data[0])[0])
|
||||
await queue.put((data_name, data_url))
|
||||
|
@ -202,6 +202,9 @@ class WishLogPlugin(Plugin.Conversation):
|
||||
if message.document:
|
||||
await self.import_from_file(user, message)
|
||||
return ConversationHandler.END
|
||||
if not message.text:
|
||||
await message.reply_text("请发送文件或链接")
|
||||
return INPUT_URL
|
||||
authkey = from_url_get_authkey(message.text)
|
||||
reply = await message.reply_text("小派蒙正在从服务器获取数据,请稍后")
|
||||
await message.reply_chat_action(ChatAction.TYPING)
|
||||
|
Loading…
Reference in New Issue
Block a user