From c5bd24f9d4c922c2dd1964cbda509c044360cd24 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Thu, 5 Aug 2021 23:33:19 +1200 Subject: [PATCH] Add handler for alternate form of age restriction --- src/lib/utils/body.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/utils/body.js b/src/lib/utils/body.js index 264e949..8ff671c 100644 --- a/src/lib/utils/body.js +++ b/src/lib/utils/body.js @@ -21,6 +21,11 @@ function extractSharedData(text) { parser.restore() const sharedDataString = parser.slice(end - parser.cursor) const sharedData = JSON.parse(sharedDataString) + // check for alternate form of age restrictions + if (sharedData.entry_data && sharedData.entry_data.HttpGatedContentPage) { + // lazy fix; ideally extracting the age should be done here, but for the web ui it doesn't matter + return {status: constants.symbols.extractor_results.AGE_RESTRICTED, value: null} + } return {status: constants.symbols.extractor_results.SUCCESS, value: sharedData} }