|
|
@@ -91,7 +91,7 @@ matchers = [ |
|
|
|
# (pattern, paramSearch, function(match: list[str]) -> output str or None); returning None stops further processing of a line |
|
|
|
# If paramSearch is True, a corresponding pattern with [/:?=&] replaced by their percent encodings is generated; the reverse replacement is done again automatically before calling the function. |
|
|
|
[noisePattern, False, lambda m: None], |
|
|
|
[channelPattern, True, lambda m: 'https://www.youtube.com/' + m[0].split('/', 3)[-1].rstrip('/')], |
|
|
|
[channelPattern, True, lambda m: 'https://www.youtube.com/' + m[0].split('/', 2)[-1].rstrip('/')], |
|
|
|
[videoPattern, True, lambda m: f'https://www.youtube.com/watch?v={m[0][-11:]}'], |
|
|
|
[r'/www\.youtube\.com/(?:playlist|embed(?:/videoseries|/\+lastest|/playlist)?/?)\?(?:.*&)?list=UU([0-9A-Za-z_-]+)', True, lambda m: f'https://www.youtube.com/channel/UC{m[1]}'], |
|
|
|
[r'/www\.youtube\.com/(?:playlist|embed(?:/videoseries|/\+lastest|/playlist)?/?)\?(?:.*&)?list=((PL|FL|RD|OL)[0-9A-Za-z_-]+)', True, lambda m: f'https://www.youtube.com/playlist?list={m[1]}'], |
|
|
|