@@ -209,7 +209,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]));
if (this.mode = mode) {
if (onready)
onready();
@@ -248,7 +248,7 @@ class Webshot extends CallableInstance<[LazyMediaItem[], (...args) => void, numb
- })(/\/.*\.(.+?)\?/.exec(url)[1])
+ })(/\/.+\.(?:.*?(?<=[?&])stp=dst-(jpg)|(.+?)\?)/.exec(url).filter(g => g)[1])
);
public webshot(