diff options
| author | 2021-06-22 22:30:36 -0400 | |
|---|---|---|
| committer | 2021-06-22 22:30:36 -0400 | |
| commit | 32de2b06db501c7de81678bce8e3e0c3e63d340c (patch) | |
| tree | fd58a26618a73de0faaf3e9c435a806aed7eced3 /gallery_dl/extractor/subscribestar.py | |
| parent | 8a644b7a06c504263a478d3681eed10b4161b5be (diff) | |
New upstream version 1.18.0.upstream/1.18.0
Diffstat (limited to 'gallery_dl/extractor/subscribestar.py')
| -rw-r--r-- | gallery_dl/extractor/subscribestar.py | 9 |
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", }) |
