@@ -56,7 +56,7 @@ class Webshot extends CallableInstance {
}
logger.warn('unable to find MIME type of fetched media, failing this fetch');
throw Error();
- })(/\/.*\.(.+?)\?/.exec(url)[1]));
+ })(/\/.+\.(?:.*?(?<=[?&])stp=dst-(jpg)|(.+?)\?)/.exec(url).filter(g => g)[1]));
onready();
webshot(mediaItems, callback, webshotDelay) {
@@ -62,7 +62,7 @@ class Webshot extends CallableInstance<[MediaItem[], (...args) => void, number],
- })(/\/.*\.(.+?)\?/.exec(url)[1])
+ })(/\/.+\.(?:.*?(?<=[?&])stp=dst-(jpg)|(.+?)\?)/.exec(url).filter(g => g)[1])
);
public webshot(