From c5d8b5788b2ade0de3d89c12ac93b5f662a626bf Mon Sep 17 00:00:00 2001 From: Cadence Fish Date: Mon, 3 Feb 2020 02:45:03 +1300 Subject: [PATCH] Fix reel fallback --- src/lib/collectors.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/collectors.js b/src/lib/collectors.js index 39323cf..c791313 100644 --- a/src/lib/collectors.js +++ b/src/lib/collectors.js @@ -23,7 +23,10 @@ async function fetchUser(username) { return fetchUserFromHTML(username).catch(error => { if (error === constants.symbols.INSTAGRAM_DEMANDS_LOGIN || error === constants.symbols.RATE_LIMITED) { const userID = db.prepare("SELECT user_id FROM Users WHERE username = ?").pluck().get(username) - if (userID) return fetchUserFromCombined(userID, username) + if (userID) { + requestCache.cache.delete("user/"+username) + return fetchUserFromCombined(userID, username) + } } throw error })