[misskey] update

- rename to 'MisskeyFavoriteExtractor'
- add 'access-token' option to docs
- add test URLs for other instances
- simplify 'pattern'
This commit is contained in:
Mike Fährmann
2023-05-23 22:15:20 +02:00
parent f9b7a033e0
commit c76f0f3a1b
4 changed files with 21 additions and 10 deletions

View File

@@ -70,7 +70,7 @@ BASE_PATTERN = MisskeyExtractor.update({
},
"lesbian.energy": {
"root": "https://lesbian.energy",
"pattern": r"lesbian\.energy"
"pattern": r"lesbian\.energy",
},
"sushi.ski": {
"root": "https://sushi.ski",
@@ -154,13 +154,15 @@ class MisskeyNoteExtractor(MisskeyExtractor):
return (self.api.notes_show(self.item),)
class MisskeyMyFavoritesExtractor(MisskeyExtractor):
"""Extractor for images from favorites"""
subcategory = "favorites"
pattern = BASE_PATTERN + r"(/my/favorites|/api/i/favorites)"
class MisskeyFavoriteExtractor(MisskeyExtractor):
"""Extractor for favorited notes"""
subcategory = "favorite"
pattern = BASE_PATTERN + r"/(?:my|api/i)/favorites"
test = (
("https://misskey.io/my/favorites"),
("https://misskey.io/api/i/favorites"),
("https://lesbian.energy/my/favorites"),
("https://sushi.ski/my/favorites"),
)
def notes(self):