mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Replace lookbehind regexp
This was only supported in latest GJS version
This commit is contained in:
@@ -166,7 +166,11 @@ var YouTubeClient = GObject.registerClass({
|
||||
break;
|
||||
}
|
||||
|
||||
const ytPath = result.data.match(/(?<=jsUrl\":\").*?(?=\")/gs)[0];
|
||||
let ytPath = result.data.match(/jsUrl\":\"(.*?)\.js/g);
|
||||
if(ytPath) {
|
||||
ytPath = (ytPath[0] && ytPath[0].length > 16)
|
||||
? ytPath[0].substring(8) : null;
|
||||
}
|
||||
if(!ytPath) {
|
||||
debug(new Error('could not find YouTube player URI'));
|
||||
break;
|
||||
|
Reference in New Issue
Block a user