Skip to content

Commit

Permalink
[deviantart] also search journals for sta.sh links (#712)
Browse files Browse the repository at this point in the history
when 'extra' is enabled
  • Loading branch information
mikf committed Jun 4, 2020
1 parent 0138e9c commit 41d0316
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,8 @@ extractor.deviantart.extra
=========== =====
Type ``bool``
Default ``false``
Description Download extra Sta.sh resources from description texts.
Description Download extra Sta.sh resources from
description texts and journals.

Note: Enabling this option also enables deviantart.metadata_.
=========== =====
Expand Down
4 changes: 4 additions & 0 deletions gallery_dl/extractor/deviantart.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def items(self):
journal = self.api.deviation_content(deviation["deviationid"])
yield self.commit_journal(deviation, journal)

if self.extra:
deviation["description"] = \
deviation.get("description", "") + journal["html"]

if self.extra:
for match in DeviantartStashExtractor.pattern.finditer(
deviation.get("description", "")):
Expand Down

0 comments on commit 41d0316

Please sign in to comment.