Skip to content

Commit

Permalink
[misskey] support 'misskey.design' (#4713)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 25, 2023
1 parent 12a800c commit 1042278
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,12 @@ Consider all sites to be NSFW unless otherwise known.
<td>Favorites, Followed Users, Images from Notes, User Profiles</td>
<td></td>
</tr>
<tr>
<td>Misskey.design</td>
<td>https://misskey.design/</td>
<td>Favorites, Followed Users, Images from Notes, User Profiles</td>
<td></td>
</tr>
<tr>
<td>Lesbian.energy</td>
<td>https://lesbian.energy/</td>
Expand Down
4 changes: 4 additions & 0 deletions gallery_dl/extractor/misskey.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def notes(self):
"root": "https://misskey.io",
"pattern": r"misskey\.io",
},
"misskey.design": {
"root": "https://misskey.design",
"pattern": r"misskey\.design",
},
"lesbian.energy": {
"root": "https://lesbian.energy",
"pattern": r"lesbian\.energy",
Expand Down
53 changes: 53 additions & 0 deletions test/results/misskeydesign.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-

# 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
# published by the Free Software Foundation.

from gallery_dl.extractor import misskey


__tests__ = (
{
"#url" : "https://misskey.design/@machina_3D",
"#category": ("misskey", "misskey.design", "user"),
"#class" : misskey.MisskeyUserExtractor,
"#pattern" : r"https://file\.misskey\.design/post/[\w-]{36}\.\w+",
"#range" : "1-50",
"#count" : 50,
},

{
"#url" : "https://misskey.design/@[email protected]",
"#category": ("misskey", "misskey.design", "user"),
"#class" : misskey.MisskeyUserExtractor,
"#count" : 7,
},

{
"#url" : "https://misskey.design/@kujyo_t/following",
"#category": ("misskey", "misskey.design", "following"),
"#class" : misskey.MisskeyFollowingExtractor,
"#count" : ">= 250",
},

{
"#url" : "https://misskey.design/notes/9jva1danjc",
"#category": ("misskey", "misskey.design", "note"),
"#class" : misskey.MisskeyNoteExtractor,
"#urls" : "https://file.misskey.design/post/a8d27901-24e1-42ab-b8a6-1e09c98c6f55.webp",
},

{
"#url" : "https://misskey.design/my/favorites",
"#category": ("misskey", "misskey.design", "favorite"),
"#class" : misskey.MisskeyFavoriteExtractor,
},

{
"#url" : "https://misskey.design/api/i/favorites",
"#category": ("misskey", "misskey.design", "favorite"),
"#class" : misskey.MisskeyFavoriteExtractor,
},

)

0 comments on commit 1042278

Please sign in to comment.