[dt] replace 'parse_compat' with compat workaround

This commit is contained in:
Mike Fährmann
2025-10-19 18:26:32 +02:00
parent 6c71b279b6
commit 989136bc59
3 changed files with 16 additions and 33 deletions

View File

@@ -218,7 +218,7 @@ class NewgroundsExtractor(Extractor):
"description": text.unescape(extr(':description" content="', '"')),
"type" : "art",
"_type" : "i",
"date" : dt.parse_compat(extr(
"date" : dt.parse_iso(extr(
'itemprop="datePublished" content="', '"')),
"rating" : extr('class="rated-', '"'),
"url" : full('src="', '"'),
@@ -268,7 +268,7 @@ class NewgroundsExtractor(Extractor):
"description": text.unescape(extr(':description" content="', '"')),
"type" : "audio",
"_type" : "a",
"date" : dt.parse_compat(extr(
"date" : dt.parse_iso(extr(
'itemprop="datePublished" content="', '"')),
"url" : extr('{"url":"', '"').replace("\\/", "/"),
"index" : text.parse_int(index),
@@ -287,7 +287,7 @@ class NewgroundsExtractor(Extractor):
src = src.replace("\\/", "/")
formats = ()
type = extr(',"description":"', '"')
date = dt.parse_compat(extr(
date = dt.parse_iso(extr(
'itemprop="datePublished" content="', '"'))
if type:
type = type.rpartition(" ")[2].lower()