mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-25 01:29:42 +00:00
🎨 Update get cookie help message
This commit is contained in:
parent
09b211d65d
commit
15532234b6
@ -118,6 +118,19 @@ class SetUserCookies(Plugin.Conversation, BasePlugin.Conversation):
|
||||
add_user_command_data.user = user_info
|
||||
add_user_command_data.region = region
|
||||
await message.reply_text(f"请输入{bbs_name}的Cookies!或回复退出取消操作", reply_markup=ReplyKeyboardRemove())
|
||||
if bbs_name == "米游社":
|
||||
help_message = (
|
||||
"<b>关于如何获取Cookies</b>\n"
|
||||
"<b>现在因为网站HttpOnly策略无法通过脚本获取,因此操作只能在PC上运行。</b>\n\n"
|
||||
"PC:\n"
|
||||
f"1、<a href='{bbs_url}'>打开 {bbs_name} 并登录</a>\n"
|
||||
"2、按F12打开开发者工具\n"
|
||||
"3、将开发者工具切换至网络(Network)并🎨 Update help message点击过滤栏中的文档(Document)并刷新页面\n"
|
||||
"4、在请求列表找到 <i>/ys</i> 并点击\n"
|
||||
"5、找到并复制请求标头(Request Headers)中的Cookie\n"
|
||||
"<u>如发现没有请求标头(Request Headers)大概因为缓存的存在需要你点击禁用缓存(Disable Cache)再次刷新页面</u>"
|
||||
)
|
||||
else:
|
||||
javascript = (
|
||||
"javascript:(()=>{_=(n)=>{for(i in(r=document.cookie.split(';'))){var a=r[i].split('=');if(a["
|
||||
"0].trim()==n)return a[1]}};c=_('account_id')||alert('无效的Cookie,请重新登录!');c&&confirm("
|
||||
|
Loading…
Reference in New Issue
Block a user