diff --git a/docs/configuration.rst b/docs/configuration.rst
index 9f05d891..7de85045 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -1268,7 +1268,7 @@ Description
when processing a user profile.
Possible values are
- ``"gallery"``, ``"scraps"``, ``"journal"``, ``"favorite"``.
+ ``"gallery"``, ``"scraps"``, ``"journal"``, ``"favorite"``, ``"status"``.
It is possible to use ``"all"`` instead of listing all values separately.
@@ -1280,11 +1280,12 @@ Type
Default
``"html"``
Description
- Selects the output format of journal entries.
+ Selects the output format for textual content. This includes journals,
+ literature and status updates.
* ``"html"``: HTML with (roughly) the same layout as on DeviantArt.
* ``"text"``: Plain text with image references and HTML tags removed.
- * ``"none"``: Don't download journals.
+ * ``"none"``: Don't download textual content.
extractor.deviantart.mature
diff --git a/docs/supportedsites.md b/docs/supportedsites.md
index 49649558..30792945 100644
--- a/docs/supportedsites.md
+++ b/docs/supportedsites.md
@@ -148,7 +148,7 @@ Consider all sites to be NSFW unless otherwise known.
DeviantArt |
https://www.deviantart.com/ |
- Collections, Deviations, Favorites, Folders, Galleries, Journals, Popular Images, Scraps, Sta.sh, Tag Searches, User Profiles, Watches |
+ Collections, Deviations, Favorites, Folders, Galleries, Journals, Popular Images, Scraps, Sta.sh, Status Updates, Tag Searches, User Profiles, Watches |
OAuth |
diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py
index aeb2d0a1..69f85676 100644
--- a/gallery_dl/extractor/deviantart.py
+++ b/gallery_dl/extractor/deviantart.py
@@ -118,11 +118,18 @@ class DeviantartExtractor(Extractor):
if "flash" in deviation:
yield self.commit(deviation, deviation["flash"])
- if "excerpt" in deviation and self.commit_journal:
- journal = self.api.deviation_content(deviation["deviationid"])
- if self.extra:
- deviation["_journal"] = journal["html"]
- yield self.commit_journal(deviation, journal)
+ if self.commit_journal:
+ if "excerpt" in deviation:
+ journal = self.api.deviation_content(
+ deviation["deviationid"])
+ elif "body" in deviation:
+ journal = {"html": deviation.pop("body")}
+ else:
+ journal = None
+ if journal:
+ if self.extra:
+ deviation["_journal"] = journal["html"]
+ yield self.commit_journal(deviation, journal)
if not self.extra:
continue
@@ -148,12 +155,23 @@ class DeviantartExtractor(Extractor):
def prepare(self, deviation):
"""Adjust the contents of a Deviation-object"""
+ alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"
if "index" not in deviation:
try:
- deviation["index"] = text.parse_int(
- deviation["url"].rpartition("-")[2])
+ if deviation["url"].startswith("https://sta.sh"):
+ filename = deviation["content"]["src"].split("/")[5]
+ deviation["index_base36"] = filename.partition("-")[0][1:]
+ deviation["index"] = \
+ util.bdecode(deviation["index_base36"], alphabet)
+ else:
+ deviation["index"] = text.parse_int(
+ deviation["url"].rpartition("-")[2])
except KeyError:
deviation["index"] = 0
+ deviation["index_base36"] = "0"
+ if "index_base36" not in deviation:
+ deviation["index_base36"] = \
+ util.bencode(deviation["index"], alphabet)
if self.user:
deviation["username"] = self.user
@@ -170,13 +188,11 @@ class DeviantartExtractor(Extractor):
if self.comments:
deviation["comments"] = (
- self.api.comments_deviation(deviation["deviationid"])
+ self.api.comments(deviation["deviationid"], target="deviation")
if deviation["stats"]["comments"] else ()
)
# filename metadata
- alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"
- deviation["index_base36"] = util.bencode(deviation["index"], alphabet)
sub = re.compile(r"\W").sub
deviation["filename"] = "".join((
sub("_", deviation["title"].lower()), "_by_",
@@ -253,9 +269,10 @@ class DeviantartExtractor(Extractor):
html = journal["html"]
if html.startswith("