summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/deviantart.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2022-08-29 02:17:16 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2022-08-29 02:17:16 -0400
commita768930761f7f20587ae40a8cacca0e55c85290a (patch)
tree5a4163db912b93fc45f717e5e43fd5be3e66f16c /gallery_dl/extractor/deviantart.py
parentae2a0f5622beaa6f402526f8a7b939419283a090 (diff)
New upstream version 1.23.0.upstream/1.23.0
Diffstat (limited to 'gallery_dl/extractor/deviantart.py')
-rw-r--r--gallery_dl/extractor/deviantart.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py
index 39ae484..60f644d 100644
--- a/gallery_dl/extractor/deviantart.py
+++ b/gallery_dl/extractor/deviantart.py
@@ -1128,11 +1128,18 @@ class DeviantartOAuthAPI():
self._folders((deviation,))
return deviation
- def deviation_content(self, deviation_id, public=False):
+ def deviation_content(self, deviation_id, public=True):
"""Get extended content of a single Deviation"""
endpoint = "/deviation/content"
params = {"deviationid": deviation_id}
- return self._call(endpoint, params=params, public=public)
+ content = self._call(endpoint, params=params, public=public)
+ if public and content["html"].startswith(
+ ' <span class=\"username-with-symbol'):
+ if self.refresh_token_key:
+ content = self._call(endpoint, params=params, public=False)
+ else:
+ self.log.warning("Private Journal")
+ return content
def deviation_download(self, deviation_id, public=True):
"""Get the original file download (if allowed)"""