From 897988dafe92f484545f3980fea9acb2db7032a1 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Mon, 20 Sep 2021 11:07:53 +0200 Subject: [PATCH] update name regex torrent9 --- scraper/scrapers/torrent9/torrent9v2_api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scraper/scrapers/torrent9/torrent9v2_api.js b/scraper/scrapers/torrent9/torrent9v2_api.js index ceb7050..d94ac03 100644 --- a/scraper/scrapers/torrent9/torrent9v2_api.js +++ b/scraper/scrapers/torrent9/torrent9v2_api.js @@ -118,7 +118,8 @@ function getName(details) { return nameElement.contents().filter((_, elem) => elem.type === 'text').text() } const description = nameElement.parent().text(); - const nameMatch = description.match(/(?:[A-Z]+|[0-9]+)[^A-Z ]*\.([\w-]+\.){3,}\w+(?:-\w+)?(?=[A-Z])/); + const nameMatch = description.match( + /(?:[A-Z]+[^A-Z0-9]*|[A-Z0-9-]+(?:[a-z]+\d+)?)\.([\w-]+\.){3,}\w+(?:-\w+)?(?=[A-Z])/); return nameMatch && nameMatch[0]; }