Skip to content

Commit

Permalink
fix: Universal Link
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Oct 18, 2024
1 parent 19d89fb commit 0216bfa
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions modules/DualSubs.YouTube.srmodule
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ DualSubs.YouTube.Player.response.json = type=http-response, pattern=^https?:\/\/
DualSubs.YouTube.Player.request.proto = type=http-request, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$, requires-body=1, binary-body-mode=1, script-path=https://raw.githubusercontent.com/DualSubs/YouTube/main/archive/js/v1.3/YouTube.request.js, argument=
DualSubs.YouTube.Player.response.proto = type=http-response, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$, requires-body=1, binary-body-mode=1, script-path=https://raw.githubusercontent.com/DualSubs/YouTube/main/archive/js/v1.3/YouTube.response.js, argument=
DualSubs.YouTube.TimedText.request = type=http-request, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext(\?.+)?$, requires-body=0, script-path=https://raw.githubusercontent.com/DualSubs/YouTube/main/archive/js/v1.3/YouTube.request.js, argument=
DualSubs.YouTube.Composite.TimedText.response = type=http-response, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External), requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Composite.Subtitles.response.js, argument=
DualSubs.YouTube.Translate.TimedText.response = type=http-response, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate, requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, argument=
DualSubs.YouTube.Composite.TimedText.response = type=http-response, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External), requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js, argument=
DualSubs.YouTube.Translate.TimedText.response = type=http-response, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument=

# YouTube Music
DualSubs.YouTubeMusic.Browse.request.json = type=http-request, pattern=^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$, requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/YouTube/main/archive/js/v1.3/YouTube.request.js, argument=
DualSubs.YouTube.Browse.request.proto = type=http-request, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$, requires-body=1, binary-body-mode=1, script-path=https://raw.githubusercontent.com/DualSubs/YouTube/main/archive/js/v1.3/YouTube.request.js, argument=
DualSubs.YouTubeMusic.Translate.Lyrics.response.json = type=http-response, pattern=^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate, requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, argument=
DualSubs.YouTubeMusic.Translate.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate, requires-body=1, binary-body-mode=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, argument=
DualSubs.YouTubeMusic.Translate.Lyrics.response.json = type=http-response, pattern=^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument=
DualSubs.YouTubeMusic.Translate.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument=

[MITM]
hostname = %APPEND% www.youtube.com, m.youtube.com, tv.youtube.com, music.youtube.com, youtubei.googleapis.com, -redirector*.googlevideo.com, *.googlevideo.com
8 changes: 4 additions & 4 deletions template/egern.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ scriptings:
- http_response:
name: 'DualSubs.YouTube.Composite.TimedText.response'
match: ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External)
script_url: https://raw.githubusercontent.com/DualSubs/Universal/main/js/Composite.Subtitles.response.js
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
- http_response:
name: 'DualSubs.YouTube.Translate.TimedText.response'
match: ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate
script_url: https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
Expand All @@ -96,14 +96,14 @@ scriptings:
- http_response:
name: 'DualSubs.YouTubeMusic.Translate.Lyrics.response.json'
match: ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate
script_url: https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
- http_response:
name: 'DualSubs.YouTubeMusic.Translate.Lyrics.response.proto'
match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate
script_url: https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
Expand Down
8 changes: 4 additions & 4 deletions template/loon.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ http-request ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, tag=DualSubs.YouTube.Player.response.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/get_watch(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, tag=DualSubs.YouTube.GetWatch.response.proto, argument={{{scriptParams}}}
http-request ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext(\?.+)?$ script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.YouTube.TimedText.request, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External) requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Composite.Subtitles.response.js, tag=DualSubs.YouTube.Composite.TimedText.response, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, tag=DualSubs.YouTube.Translate.TimedText.response, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External) requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js, tag=DualSubs.YouTube.Composite.TimedText.response, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=DualSubs.YouTube.Translate.TimedText.response, argument={{{scriptParams}}}

# YouTube Music
http-request ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$ requires-body=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.YouTubeMusic.Browse.request.json, argument={{{scriptParams}}}
http-request ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.YouTube.Browse.request.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, tag=DualSubs.YouTubeMusic.Translate.Lyrics.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate requires-body=1, binary-body-mode=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, tag=DualSubs.YouTubeMusic.Translate.Lyrics.response.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=DualSubs.YouTubeMusic.Translate.Lyrics.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)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.YouTubeMusic.Translate.Lyrics.response.proto, argument={{{scriptParams}}}

[MITM]
hostname = www.youtube.com, m.youtube.com, tv.youtube.com, music.youtube.com, youtubei.googleapis.com, -redirector*.googlevideo.com, *.googlevideo.com
8 changes: 4 additions & 4 deletions template/quantumultx.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
# DualSubs.YouTube.TimedText.request
^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext url script-request-header https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
# DualSubs.YouTube.Composite.TimedText.response
^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External) url script-response-body https://raw.githubusercontent.com/DualSubs/Universal/main/js/Composite.Subtitles.response.js
^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External) url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
# DualSubs.YouTube.Translate.TimedText.response
^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate url script-response-body https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js
^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js

# YouTube Music
# DualSubs.YouTubeMusic.Browse.request.json
^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$ url script-request-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
# DualSubs.YouTube.Browse.request.proto
^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$ url script-request-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
# DualSubs.YouTubeMusic.Translate.Lyrics.response.json
^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate url script-response-body https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js
^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
# DualSubs.YouTubeMusic.Translate.Lyrics.response.proto
^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate url script-response-body https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js
^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js

#[MITM]
hostname = www.youtube.com, m.youtube.com, tv.youtube.com, music.youtube.com, youtubei.googleapis.com, -redirector*.googlevideo.com, *.googlevideo.com
4 changes: 2 additions & 2 deletions template/stash.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ script-providers:
url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js
interval: 86400
DualSubs.YouTube.Composite.TimedText.response:
url: https://raw.githubusercontent.com/DualSubs/Universal/main/js/Composite.Subtitles.response.js
url: https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
interval: 86400
DualSubs.YouTube.Translate.TimedText.response:
url: https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js
url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
interval: 86400
8 changes: 4 additions & 4 deletions template/surge.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ DualSubs.YouTube.Player.request.proto = type=http-request, pattern=^https?:\/\/y
DualSubs.YouTube.Player.response.proto = type=http-response, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$, requires-body=1, binary-body-mode=1, engine=webview, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, argument={{{scriptParams}}}
DualSubs.YouTube.GetWatch.response.proto = type=http-response, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/get_watch(\?.+)?$, requires-body=1, binary-body-mode=1, engine=webview, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, argument={{{scriptParams}}}
DualSubs.YouTube.TimedText.request = type=http-request, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext(\?.+)?$, engine=webview, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
DualSubs.YouTube.Composite.TimedText.response = type=http-response, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External), requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Composite.Subtitles.response.js, argument={{{scriptParams}}}
DualSubs.YouTube.Translate.TimedText.response = type=http-response, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate, requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, argument={{{scriptParams}}}
DualSubs.YouTube.Composite.TimedText.response = type=http-response, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External), requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js, argument={{{scriptParams}}}
DualSubs.YouTube.Translate.TimedText.response = type=http-response, pattern=^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}

# YouTube Music
DualSubs.YouTubeMusic.Browse.request.json = type=http-request, pattern=^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$, requires-body=1, engine=webview, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
DualSubs.YouTube.Browse.request.proto = type=http-request, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$, requires-body=1, binary-body-mode=1, engine=webview, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
DualSubs.YouTubeMusic.Translate.Lyrics.response.json = type=http-response, pattern=^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate, requires-body=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, argument={{{scriptParams}}}
DualSubs.YouTubeMusic.Translate.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate, requires-body=1, binary-body-mode=1, script-path=https://raw.githubusercontent.com/DualSubs/Universal/main/js/Translate.response.js, argument={{{scriptParams}}}
DualSubs.YouTubeMusic.Translate.Lyrics.response.json = type=http-response, pattern=^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}
DualSubs.YouTubeMusic.Translate.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)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}}}

[MITM]
hostname = %APPEND% www.youtube.com, m.youtube.com, tv.youtube.com, music.youtube.com, youtubei.googleapis.com, -redirector*.googlevideo.com, *.googlevideo.com

0 comments on commit 0216bfa

Please sign in to comment.