1
0
This commit is contained in:
Jon Michael Aanes 2023-10-03 21:58:10 +02:00
parent 2bdd5b43fa
commit 70728b70a8

View File

@ -45,6 +45,7 @@ class SocialSiteId(enum.Enum):
DEVIANT_ART_ACCOUNT = 7737
DANBOORU_ARTIST = 30
BANDCAMP_PROFILE = 3283
BLUESKY_PROFILE = 32
def wikidata_property(self, client):
return client.get(WIKIDATA_PROPERTIES[self])
@ -111,6 +112,7 @@ WIKIDATA_PROPERTIES = {
SocialSiteId.DEVIANT_ART_ACCOUNT: WikidataInfo(7737, None),
SocialSiteId.DANBOORU_ARTIST: WikidataInfo(None, 64514853),
SocialSiteId.BANDCAMP_PROFILE: WikidataInfo(3283, 545966),
SocialSiteId.BLUESKY_PROFILE: WikidataInfo(None, 78194383),
}
def re_social_subdomain(main_domain):
@ -175,8 +177,7 @@ URL_PARSE_DEVIANT_ART_ACCOUNT = re_social_path_adv('deviantart.com', RE_ID)
URL_PARSE_DEVIANT_ART_ACCOUNT_2 = re_social_subdomain('deviantart.com')
URL_PARSE_DANBOORU_ARTIST = re_social_path_adv('danbooru.donmai.us', 'artists', RE_ID)
URL_PARSE_BANDCAMP = re_social_subdomain('bandcamp.com')
# TODO: https://<ID>.deviantart.com
URL_PARSE_BLUESKY = re_social_path_adv('bsky.app', 'profile', RE_ID)
REGEXES = [
# Reddit
@ -272,6 +273,9 @@ REGEXES = [
# Bandcamp
(URL_PARSE_BANDCAMP, SocialSiteId.BANDCAMP_PROFILE),
# Bluesky
(URL_PARSE_BLUESKY, SocialSiteId.BLUESKY_PROFILE),
]
WELL_KNOWN_MASTODON_INSTANCES = frozenset({