[common] add '_extract_jsonld' method (#5272)

This commit is contained in:
Mike Fährmann
2025-01-12 11:07:48 +01:00
parent 88f1ef7c3c
commit 3f48e2f820
4 changed files with 9 additions and 11 deletions

View File

@@ -587,6 +587,10 @@ class Extractor():
return True
return False
def _extract_jsonld(self, page):
return util.json_loads(text.extr(
page, '<script type="application/ld+json">', "</script>"))
def _prepare_ddosguard_cookies(self):
if not self.cookies.get("__ddg2", domain=self.cookies_domain):
self.cookies.set(