Skip to content

Commit 8c665b0

Browse files
committed
feat: 更新请求和响应的匹配模式,以支持新的 Spotify 域名
1 parent c5ffde3 commit 8c665b0

4 files changed

Lines changed: 25 additions & 26 deletions

File tree

template/loon.handlebars

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
[Script]
1717
http-response ^https?:\/\/api\.spotify\.com\/v1\/tracks\? requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js, tag=🍿️ DualSubs.Spotify.Tracks.response.json, argument={{{scriptParams}}}
1818

19-
http-request ^https?:\/\/(gae\d-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.Spotify.Lyrics.request.json, argument={{{scriptParams}}}
20-
http-request ^https?:\/\/(gae\d-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*) requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.Spotify.Lyrics.request.proto, argument={{{scriptParams}}}
19+
http-request ^https?:\/\/(.+-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.Spotify.Lyrics.request.json, argument={{{scriptParams}}}
20+
http-request ^https?:\/\/(.+-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*) requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.Spotify.Lyrics.request.proto, argument={{{scriptParams}}}
2121

22-
http-response ^https?:\/\/(gae\d-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.Spotify.Translate.Lyrics.response.json, argument={{{scriptParams}}}
23-
http-response ^https?:\/\/(gae\d-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.Spotify.Translate.Lyrics.response.proto, argument={{{scriptParams}}}
22+
http-response ^https?:\/\/(.+-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.Spotify.Translate.Lyrics.response.json, argument={{{scriptParams}}}
23+
http-response ^https?:\/\/(.+-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.Spotify.Translate.Lyrics.response.proto, argument={{{scriptParams}}}
2424

25-
http-response ^https?:\/\/(gae\d-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, tag=🍿️ DualSubs.Spotify.External.Lyrics.response.json, argument={{{scriptParams}}}
26-
http-response ^https?:\/\/(gae\d-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, tag=🍿️ DualSubs.Spotify.External.Lyrics.response.proto, argument={{{scriptParams}}}
25+
http-response ^https?:\/\/(.+-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, tag=🍿️ DualSubs.Spotify.External.Lyrics.response.json, argument={{{scriptParams}}}
26+
http-response ^https?:\/\/(.+-spclient|spclient\.wg)\.spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, tag=🍿️ DualSubs.Spotify.External.Lyrics.response.proto, argument={{{scriptParams}}}
2727

2828
[MITM]
29-
hostname = api.spotify.com, spclient.wg.spotify.com, gae?-spclient.spotify.com
29+
hostname = api.spotify.com, spclient.wg.spotify.com, *-spclient.spotify.com

template/quantumultx.handlebars

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
^https?:\/\/api\.spotify\.com\/v1\/tracks\? url script-response-body https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js
1414

1515
# 🍿️ DualSubs.Spotify.Lyrics.request
16-
^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*) url script-request-body https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js
16+
^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*) url script-request-body https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js
1717

1818
# 🍿️ DualSubs.Spotify.Translate.Lyrics.response
19-
^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
19+
^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
2020

2121
# 🍿️ DualSubs.Spotify.External.Lyrics.response
22-
^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)subtype=External url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js
22+
^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)subtype=External url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js
2323

2424
#[mitm]
25-
hostname = api.spotify.com, spclient.wg.spotify.com, gae?-spclient.spotify.com
25+
hostname = api.spotify.com, spclient.wg.spotify.com, *-spclient.spotify.com

template/stash.handlebars

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@ http:
1818
mitm:
1919
- "api.spotify.com"
2020
- "spclient.wg.spotify.com"
21-
- "gae?-spclient.spotify.com"
21+
- "*-spclient.spotify.com"
2222
script:
2323
- match: ^https?:\/\/api\.spotify\.com\/v1\/tracks\?
2424
name: 🍿️ DualSubs.Spotify.response
2525
type: response
2626
require-body: true
2727

28-
- match: ^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json
28+
- match: ^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json
2929
name: 🍿️ DualSubs.Spotify.request
3030
type: request
3131
require-body: true
32-
- match: ^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)
32+
- match: ^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)
3333
name: 🍿️ DualSubs.Spotify.request
3434
type: request
3535
require-body: true
3636
binary-mode: true
3737

38-
- match: ^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate
38+
- match: ^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate
3939
name: 🍿️ DualSubs.Translate.Lyrics.response
4040
type: response
4141
require-body: true
42-
- match: ^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate
42+
- match: ^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate
4343
name: 🍿️ DualSubs.Translate.Lyrics.response
4444
type: response
4545
require-body: true
4646
binary-mode: true
4747

48-
- match: ^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External
48+
- match: ^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External
4949
name: 🍿️ DualSubs.External.Lyrics.response
5050
type: response
5151
require-body: true
52-
- match: ^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External
52+
- match: ^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External
5353
name: 🍿️ DualSubs.External.Lyrics.response
5454
type: response
5555
require-body: true

template/surge.handlebars

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313
[Script]
1414
🍿️ DualSubs.Spotify.Tracks.response.json = type=http-response, pattern=^https?:\/\/api\.spotify\.com\/v1\/tracks\?, requires-body=1, engine=webview, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js, argument={{{scriptParams}}}
1515

16-
🍿️ DualSubs.Spotify.Lyrics.request.json = type=http-request, pattern=^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json, requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
17-
🍿️ DualSubs.Spotify.Lyrics.request.proto = type=http-request, pattern=^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*), requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
16+
🍿️ DualSubs.Spotify.Lyrics.request.json = type=http-request, pattern=^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json, requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
17+
🍿️ DualSubs.Spotify.Lyrics.request.proto = type=http-request, pattern=^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*), requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
1818

19-
🍿️ DualSubs.Spotify.Translate.Lyrics.response.json = type=http-response, pattern=^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}
20-
🍿️ DualSubs.Spotify.Translate.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}
21-
22-
🍿️ DualSubs.Spotify.External.Lyrics.response.json = type=http-response, pattern=^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, argument={{{scriptParams}}}
23-
🍿️ DualSubs.Spotify.External.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/(gae\d-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, argument={{{scriptParams}}}
19+
🍿️ DualSubs.Spotify.Translate.Lyrics.response.json = type=http-response, pattern=^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}
20+
🍿️ DualSubs.Spotify.Translate.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}
21+
🍿️ DualSubs.Spotify.External.Lyrics.response.json = type=http-response, pattern=^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, argument={{{scriptParams}}}
22+
🍿️ DualSubs.Spotify.External.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/(.+-spclient|spclient\.wg).spotify\.com(:443)?\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, argument={{{scriptParams}}}
2423

2524
[MITM]
26-
hostname = %APPEND% api.spotify.com, spclient.wg.spotify.com, gae?-spclient.spotify.com
25+
hostname = %APPEND% api.spotify.com, spclient.wg.spotify.com, *-spclient.spotify.com

0 commit comments

Comments
 (0)