aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/subscribestar.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/subscribestar.py')
-rw-r--r--gallery_dl/extractor/subscribestar.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/gallery_dl/extractor/subscribestar.py b/gallery_dl/extractor/subscribestar.py
index 753f266..83836e5 100644
--- a/gallery_dl/extractor/subscribestar.py
+++ b/gallery_dl/extractor/subscribestar.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2020 Mike Fährmann
+# Copyright 2020-2021 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -13,7 +13,6 @@ from .. import text, exception
from ..cache import cache
import json
-
BASE_PATTERN = r"(?:https?://)?(?:www\.)?subscribestar\.(com|adult)"
@@ -45,8 +44,8 @@ class SubscribestarExtractor(Extractor):
yield Message.Directory, data
for item in media:
item.update(data)
- url = item["url"]
- yield Message.Url, url, text.nameext_from_url(url, item)
+ text.nameext_from_url(item.get("name") or item["url"], item)
+ yield Message.Url, item["url"], item
def posts(self):
"""Yield HTML content of all relevant posts"""
@@ -105,6 +104,8 @@ class SubscribestarExtractor(Extractor):
media.append({
"id" : text.parse_int(text.extract(
att, 'data-upload-id="', '"')[0]),
+ "name": text.unescape(text.extract(
+ att, 'doc_preview-title">', '<')[0] or ""),
"url" : text.extract(att, 'href="', '"')[0],
"type": "attachment",
})