mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-14 04:17:30 +00:00
Add handler for alternate form of age restriction
This commit is contained in:
parent
c901c5e691
commit
c5bd24f9d4
@ -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}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user