Skip to content

Commit

Permalink
[discord] add support (mikf#6836)
Browse files Browse the repository at this point in the history
* first commit

* add --

* skip video embeds

* fix typo

* removed ambiguity

* add category support

* code tweaks

* more reliable embed extraction

* handle 403 errors (testing done)

* added "parent_id" keyword

* added "parent", "parent_type" keywords

the extractor should be now ready to merge!

* removed unnecessary dict unpacking

* added empty text messages extraction

* added "channel_topic"

* even more metadata extraction

can now extract all embeds images & text, as well as server banners. also code is much better.

* added user avatar and banner

* better pagination

* fix regression

* minor tweaks

* Made requested changes
  • Loading branch information
zWolfrost authored Feb 18, 2025
1 parent fd4de02 commit 95c446f
Show file tree
Hide file tree
Showing 6 changed files with 466 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2210,6 +2210,39 @@ Description
| Leave ``SIZE`` empty to download the regular, small avatar format.

extractor.discord.embeds
------------------------
Type
``list`` of ``strings``
Default
``["image", "gifv", "video"]``
Description
Selects which embed types to download from.

Supported embed types are
``image``, ``gifv``, ``video``, ``rich``, ``article``, ``link``.


extractor.discord.threads
-------------------------
Type
``bool``
Default
``true``
Description
Extract threads from Discord text channels.


extractor.discord.token
-----------------------
Type
``string``
Description
Discord Bot Token for API requests.

You can follow `this guide <https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md#how-to-get-a-user-token>`__ to get a token.


extractor.[E621].metadata
-------------------------
Type
Expand Down
6 changes: 6 additions & 0 deletions docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ Consider all listed sites to potentially be NSFW.
<td>Avatars, Backgrounds, Collections, Deviations, Favorites, Folders, Followed Users, Galleries, Gallery Searches, Journals, Scraps, Search Results, Sta.sh, Status Updates, Tag Searches, User Profiles, Watches</td>
<td><a href="https://github.com/mikf/gallery-dl#oauth">OAuth</a></td>
</tr>
<tr>
<td>Discord</td>
<td>https://discord.com/</td>
<td>Channels, DMs, Servers</td>
<td></td>
</tr>
<tr>
<td>Dynasty Reader</td>
<td>https://dynasty-scans.com/</td>
Expand Down
1 change: 1 addition & 0 deletions gallery_dl/extractor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"danbooru",
"desktopography",
"deviantart",
"discord",
"dynastyscans",
"e621",
"erome",
Expand Down
Loading

0 comments on commit 95c446f

Please sign in to comment.