Added ebay provider recognition

This commit is contained in:
Nicolai Ort 2021-08-14 15:47:03 +02:00
parent 1624e666e8
commit 12c6d7e3da
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
1 changed files with 9 additions and 0 deletions

View File

@ -293,6 +293,15 @@ function checkKnownProviders(target) {
target
}
}
const ebayID = target.match(/(?:[ebay]*(?:[\/]|[itm=])|^)([0-9]{9,12})/);
if (ebayID) {
const shortcode = `e/${ebayID[1]}`
return {
url: `${config.getBaseUrl()}/${shortcode}`,
shortcode,
target
}
}
return null;
}