@@ -29,7 +29,8 @@ public class DefaultYoutubeLinkRouter implements YoutubeLinkRouter {
29
29
new Extractor (Pattern .compile ("^" + PROTOCOL_REGEX + DOMAIN_REGEX + "/.*" ), this ::routeFromMainDomain ),
30
30
new Extractor (Pattern .compile ("^" + PROTOCOL_REGEX + SHORT_DOMAIN_REGEX + "/.*" ), this ::routeFromShortDomain ),
31
31
new Extractor (Pattern .compile ("^" + PROTOCOL_REGEX + DOMAIN_REGEX + "/embed/.*" ), this ::routeFromEmbed ),
32
- new Extractor (Pattern .compile ("^" + PROTOCOL_REGEX + DOMAIN_REGEX + "/shorts/.*" ), this ::routeFromShorts )
32
+ new Extractor (Pattern .compile ("^" + PROTOCOL_REGEX + DOMAIN_REGEX + "/shorts/.*" ), this ::routeFromShorts ),
33
+ new Extractor (Pattern .compile ("^" + PROTOCOL_REGEX + DOMAIN_REGEX + "/live/.*" ), this ::routeFromLive )
33
34
};
34
35
35
36
@ Override
@@ -118,6 +119,11 @@ protected <T> T routeFromShorts(Routes<T> routes, String url) {
118
119
return routeFromUrlWithVideoId (routes , urlInfo .path .substring (8 ), urlInfo );
119
120
}
120
121
122
+ protected <T > T routeFromLive (Routes <T > routes , String url ) {
123
+ UrlInfo urlInfo = getUrlInfo (url , true );
124
+ return routeFromUrlWithVideoId (routes , urlInfo .path .substring (6 ), urlInfo );
125
+ }
126
+
121
127
private static UrlInfo getUrlInfo (String url , boolean retryValidPart ) {
122
128
try {
123
129
if (!url .startsWith ("http://" ) && !url .startsWith ("https://" )) {
0 commit comments