mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +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;
|
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) {
|
if(!ytPath) {
|
||||||
debug(new Error('could not find YouTube player URI'));
|
debug(new Error('could not find YouTube player URI'));
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user