From 3bcd940fac30cfea5746c98caceb6320ff652657 Mon Sep 17 00:00:00 2001 From: hoilc Date: Tue, 25 Feb 2020 00:15:52 +0800 Subject: [PATCH] fix: filter out unwanted hosts for 2048 (#4073) --- lib/routes/2048/bbs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/2048/bbs.js b/lib/routes/2048/bbs.js index cebaae724d..fc61a791fe 100644 --- a/lib/routes/2048/bbs.js +++ b/lib/routes/2048/bbs.js @@ -16,7 +16,8 @@ async function getAvailableHosts(ctx) { .map(function() { return $(this).attr('href'); }) - .get(); + .get() + .filter((item) => item.match(/\//g).length < 3); ctx.cache.set(cache_key, JSON.stringify(hosts)); return hosts;