1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-25 09:27:28 +00:00

Add handler for alternate form of age restriction

This commit is contained in:
Cadence Ember 2021-08-05 23:33:19 +12:00
parent c901c5e691
commit c5bd24f9d4
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17

View File

@ -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}
}