Skip to content

POST请求 的网站链接 没有关键字可以替换 怎么办? #157

@RenCaiErYi

Description

@RenCaiErYi

有很多网站比如这个
https://69shuba.cx/
要是可以的话可以告诉我方法吗?

之后脚本可否支持这种模式
{{getSearchUrl(java.put("key",key))}}

https://69shuba.cx/modules/article/search.php,
{
"charset": "gbk",
"method": "POST",
"body": "searchkey={{key}}&searchtype=all"
}

// 主逻辑:根据关键词类型生成不同URL

if(key.match(/#/)) {
result = 'https://69shu.biz/b/' + encodeURI(key.match(/^(?:#|#)(.)/)[1]) + '.html';
}
else if(key.match(/@/)) {
result = 'https://69shu.biz/booklist/tag/' + encodeURI(key.match(/^@(.
)/)[1]) + '/';
}
else {
result = 'https://69shu.biz/modules/article/search.php,{
"charset": "gbk",
"method": "POST",
"body": "searchkey=' + key + '&submit=Search"
}';
}
result

// 变量注释:生成动态User-Agent
"variableComment": "
let date = 'Mobile ' + Date.now();
result = JSON.stringify({
'User-Agent': String(date)
});
"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions