~cadence/bibliogram

c5bd24f9d4c922c2dd1964cbda509c044360cd24 — Cadence Ember 2 months ago c901c5e
Add handler for alternate form of age restriction
1 files changed, 5 insertions(+), 0 deletions(-)

M src/lib/utils/body.js
M src/lib/utils/body.js => src/lib/utils/body.js +5 -0
@@ 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}
}