summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/newgrounds.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/newgrounds.py')
-rw-r--r--gallery_dl/extractor/newgrounds.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/gallery_dl/extractor/newgrounds.py b/gallery_dl/extractor/newgrounds.py
index 9e0aaa3..282c389 100644
--- a/gallery_dl/extractor/newgrounds.py
+++ b/gallery_dl/extractor/newgrounds.py
@@ -48,22 +48,20 @@ class NewgroundsExtractor(Extractor):
extr = text.extract_from(self.request(page_url).text)
full = text.extract_from(json.loads(extr('"full_image_text":', '});')))
data = {
+ "title" : text.unescape(extr('"og:title" content="', '"')),
"description": text.unescape(extr(':description" content="', '"')),
- "date" : extr('itemprop="datePublished" content="', '"'),
+ "date" : text.parse_datetime(extr(
+ 'itemprop="datePublished" content="', '"')),
"rating" : extr('class="rated-', '"'),
"favorites" : text.parse_int(extr('id="faves_load">', '<')),
"score" : text.parse_float(extr('id="score_number">', '<')),
+ "tags" : text.split_html(extr(
+ '<dd class="tags momag">', '</dd>')),
"url" : full('src="', '"'),
- "title" : text.unescape(full('alt="', '"')),
"width" : text.parse_int(full('width="', '"')),
"height" : text.parse_int(full('height="', '"')),
}
-
- tags = text.split_html(extr('<dd class="tags momag">', '</dd>'))
- tags.sort()
- data["tags"] = tags
-
- data["date"] = text.parse_datetime(data["date"])
+ data["tags"].sort()
data["index"] = text.parse_int(
data["url"].rpartition("/")[2].partition("_")[0])
return data
@@ -95,7 +93,7 @@ class NewgroundsUserExtractor(NewgroundsExtractor):
test = (
("https://blitzwuff.newgrounds.com/art", {
"url": "24b19c4a135a09889fac7b46a74e427e4308d02b",
- "keyword": "2aab0532a894ff3cf88dd01ce5c60f114011b268",
+ "keyword": "98566e0c8096a8099b8d71962fea7e31c8b098d4",
}),
("https://blitzwuff.newgrounds.com/"),
)
@@ -140,9 +138,9 @@ class NewgroundsVideoExtractor(NewgroundsExtractor):
subcategory = "video"
filename_fmt = "{category}_{index}.{extension}"
pattern = r"(?:https?://)?([^.]+)\.newgrounds\.com/movies/?$"
- test = ("https://twistedgrim.newgrounds.com/movies", {
+ test = ("https://tomfulp.newgrounds.com/movies", {
"pattern": r"ytdl:https?://www\.newgrounds\.com/portal/view/\d+",
- "count": ">= 29",
+ "count": ">= 32",
})
def get_page_urls(self):