Skip to content

Commit 49d81f5

Browse files
committed
修复微博
1 parent 813c3df commit 49d81f5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Task/weibo.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Surge 4.0 :
1616
weibo.js = type=cron,cronexp=35 5 0 * * *,script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js,script-update-interval=0
1717
1818
# 获取微博 Cookie.
19-
weibo.js = type=http-request,pattern=https:\/\/api\.weibo\.cn\/\d/user/show/.+(gsid=),script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
19+
weibo.js = type=http-request,pattern=https:\/\/api\.weibo\.cn\/\d\/user\/show\/,script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
2020
# 微博钱包签到Cookie
2121
weibo.js = type=http-request,pattern=https:\/\/pay\.sc\.weibo\.com\/aj\/mobile\/home\/welfare\/signin\/do\?,script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
2222
@@ -26,7 +26,7 @@ Loon 2.1.0+
2626
# 本地脚本
2727
cron "04 00 * * *" script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js, enabled=true, tag=新浪微博
2828
29-
http-request https:\/\/api\.weibo\.cn\/\d/user/show/.+(gsid=) script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
29+
http-request https:\/\/api\.weibo\.cn\/\d\/user\/show\/ script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
3030
3131
http-request https:\/\/pay\.sc\.weibo\.com\/aj\/mobile\/home\/welfare\/signin\/do\? script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
3232
@@ -37,7 +37,7 @@ QX 1.0.6+ :
3737
0 9 * * * https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
3838
3939
[rewrite_local]
40-
https:\/\/api\.weibo\.cn\/\d/user/show/.+(gsid=) url script-request-header https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
40+
https:\/\/api\.weibo\.cn\/\d\/user\/show\/ url script-request-header https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
4141
4242
# 钱包签到Cookie
4343
https:\/\/pay\.sc\.weibo\.com\/aj\/mobile\/home\/welfare\/signin\/do\? url script-request-header https://raw.githubusercontent.com/Sunert/Scripts/master/Task/weibo.js
@@ -120,7 +120,7 @@ if ($.isNode()) {
120120

121121

122122
function GetCookie() {
123-
if ($request && $request.method != 'OPTIONS' && $request.url.match(/\d/user/show/.+(gsid=)/)) {
123+
if ($request && $request.method != 'OPTIONS' && $request.url.indexOf("gsid=")>-1) {
124124
const signurlVal = $request.url
125125
const token = signurlVal.match(/(gsid=[_a-zA-Z0-9-]+).+(&s=\w+)/)
126126
$.log(`token:${token}`)

0 commit comments

Comments
 (0)