mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
add mastodon and peertube accounts from wikidata search
This commit is contained in:
parent
e4f8f0483f
commit
0c4c8e346e
2 changed files with 19 additions and 1 deletions
|
@ -34,6 +34,20 @@
|
|||
"default": "https://www.instagram.com/$1"
|
||||
}
|
||||
},
|
||||
"mastodon_profile": {
|
||||
"category_name": "Mastodon",
|
||||
"url_name": "Mastodon profile",
|
||||
"urls": {
|
||||
"default": "https://fedirect.toolforge.org/?id=$1"
|
||||
}
|
||||
},
|
||||
"peertube_profile": {
|
||||
"category_name": "Peertube",
|
||||
"url_name": "Peertube profile",
|
||||
"urls": {
|
||||
"default": "https://fedirect.toolforge.org/?id=$1"
|
||||
}
|
||||
},
|
||||
"imdb_title": {
|
||||
"category_name": "IMDB",
|
||||
"url_name": "IMDB title",
|
||||
|
@ -153,4 +167,4 @@
|
|||
"default": "https://www.openstreetmap.org/?lat=${latitude}&lon=${longitude}&zoom=${zoom}&layers=M"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,8 @@ WIKIDATA_PROPERTIES = {
|
|||
'P2002': 'Twitter',
|
||||
'P2013': 'Facebook',
|
||||
'P2003': 'Instagram',
|
||||
'P4033': 'Mastodon',
|
||||
'P12622': 'PeerTube',
|
||||
}
|
||||
|
||||
# SERVICE wikibase:mwapi : https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual/MWAPI
|
||||
|
@ -475,6 +477,8 @@ def get_attributes(language):
|
|||
add_url('P2002', url_id='twitter_profile')
|
||||
add_url('P2013', url_id='facebook_profile')
|
||||
add_url('P2003', url_id='instagram_profile')
|
||||
add_url('P4033', url_id='mastodon_profile')
|
||||
add_url('P12622', url_id='peertube_profile')
|
||||
|
||||
# Map
|
||||
attributes.append(WDGeoAttribute('P625'))
|
||||
|
|
Loading…
Add table
Reference in a new issue