Add support of Bilibili (#2891)

This commit is contained in:
Soxoj
2026-07-20 20:28:02 +02:00
committed by GitHub
parent d5cf4b15ef
commit 961680a81b
8 changed files with 73 additions and 18 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ false positives).
``--id-type`` - Specify identifier(s) type (default: username).
Supported types: gaia_id, steam_id, vk_id, yandex_public_id, ok_id,
wikimapia_uid, uidme_uguid, yelp_userid, orcid, qq_id.
wikimapia_uid, uidme_uguid, yelp_userid, orcid, qq_id, bilibili_id.
Sites whose type does not match are filtered out automatically. See
:ref:`supported-identifier-types` for details and an example.
@@ -214,14 +214,14 @@ msgstr "``--use-disabled-sites`` —— 把已禁用的站点也纳入搜索范
msgid ""
"``--id-type`` - Specify identifier(s) type (default: username). Supported "
"types: gaia_id, steam_id, vk_id, yandex_public_id, ok_id, wikimapia_uid, "
"uidme_uguid, yelp_userid, orcid, qq_id. Sites whose type does not match are "
"filtered out automatically. See :ref:`supported-identifier-types` for "
"details and an example."
"uidme_uguid, yelp_userid, orcid, qq_id, bilibili_id. Sites whose type does "
"not match are filtered out automatically. See "
":ref:`supported-identifier-types` for details and an example."
msgstr ""
"``--id-type`` —— 指定标识符类型(默认:username)。支持的类型有:gaia_id、"
"steam_id、vk_id、yandex_public_id、ok_id、wikimapia_uid、uidme_uguid、"
"yelp_userid、orcid、qq_id。类型不匹配的站点会被自动筛除。详情及示例见 "
":ref:`supported-identifier-types`。"
"yelp_userid、orcid、qq_id、bilibili_id。类型不匹配的站点会被自动筛除。详情及"
"示例见 :ref:`supported-identifier-types`。"
#: ../../source/command-line-options.rst:104 ef2bfbd405b1471abfed99b2b82974d7
msgid ""
@@ -85,7 +85,15 @@ msgid ""
"profile id."
msgstr "**qq_id** —— QQ(腾讯)的数字账号,同时用作 Qzone 空间的用户 id。"
#: ../../source/supported-identifier-types.rst:18
#: ../../source/supported-identifier-types.rst:17
msgid ""
"**bilibili_id** - Bilibili numeric user id (the ``mid`` in a "
"``space.bilibili.com/{mid}`` profile URL)."
msgstr ""
"**bilibili_id** —— Bilibili 的数字用户 id(即 ``space.bilibili.com/{mid}`` "
"个人主页 URL 中的 ``mid``)。"
#: ../../source/supported-identifier-types.rst:19
msgid "Example"
msgstr "示例"
@@ -107,3 +115,19 @@ msgstr ""
"Maigret 通过 Qzone 头像 API 解析该账号;找到后会提取昵称和头像。凡是 ``type`` "
"与所给 ``--id-type`` 不匹配的站点都会被跳过,因此直接运行 ``maigret 10001``"
"(默认为 ``username``)不会查询 QQ。"
#: ../../source/supported-identifier-types.rst:35
msgid ""
"Or, to look up the Bilibili user id ``2`` (the ``mid`` from "
"``space.bilibili.com/2``):"
msgstr ""
"或者,查询 Bilibili 用户 id ``2``(即 ``space.bilibili.com/2`` 中的 "
"``mid``):"
#: ../../source/supported-identifier-types.rst:41
msgid ""
"Maigret resolves the account via the Bilibili user-card API and, when found, "
"extracts the nickname, avatar, signature and follower count."
msgstr ""
"Maigret 通过 Bilibili 用户名片 API 解析该账号;找到后会提取昵称、头像、"
"签名和粉丝数。"
@@ -14,6 +14,7 @@ Maigret can search against not only ordinary usernames, but also through certain
- **ok_id** - OK.ru inner numeric user identifier.
- **yelp_userid** - Yelp inner user identifier.
- **qq_id** - QQ (Tencent) numeric account number, also used as the Qzone profile id.
- **bilibili_id** - Bilibili numeric user id (the ``mid`` in a ``space.bilibili.com/{mid}`` profile URL).
Example
-------
@@ -25,3 +26,11 @@ Pass the identifier as the target and select its type with ``--id-type``. For ex
$ maigret 10001 --id-type qq_id
Maigret resolves the account via the Qzone portrait API and, when found, extracts the nickname and avatar. Any site whose ``type`` does not match the given ``--id-type`` is skipped, so a plain ``maigret 10001`` (default ``username``) will not query QQ.
Or, to look up the Bilibili user id ``2`` (the ``mid`` from ``space.bilibili.com/2``):
.. code-block:: console
$ maigret 2 --id-type bilibili_id
Maigret resolves the account via the Bilibili user-card API and, when found, extracts the nickname, avatar, signature and follower count.
+1
View File
@@ -70,6 +70,7 @@ SUPPORTED_IDS = (
"yelp_userid",
"orcid",
"qq_id",
"bilibili_id",
)
BAD_CHARS = "#"
+20
View File
@@ -22,6 +22,26 @@
"social"
]
},
"Bilibili": {
"type": "bilibili_id",
"regexCheck": "^[1-9][0-9]{0,14}$",
"checkType": "message",
"presenseStrs": [
"\"card\":{"
],
"absenceStrs": [
"啥都木有"
],
"urlProbe": "https://api.bilibili.com/x/web-interface/card?mid={username}",
"url": "https://space.bilibili.com/{username}",
"urlMain": "https://www.bilibili.com/",
"usernameClaimed": "2",
"usernameUnclaimed": "999999999999",
"tags": [
"cn",
"video"
]
},
"Facebook": {
"regexCheck": "^[a-zA-Z0-9_\\.]{3,49}(?<!\\.com|\\.org|\\.net)$",
"checkType": "message",
+3 -3
View File
@@ -1,8 +1,8 @@
{
"version": 1,
"updated_at": "2026-07-20T17:18:36Z",
"sites_count": 3211,
"updated_at": "2026-07-20T18:26:06Z",
"sites_count": 3212,
"min_maigret_version": "0.5.0",
"data_sha256": "3dac4e972128b0d0839d725326eebce5363252d000ac78420534a92624ecbe06",
"data_sha256": "791ead9ed78a04f4fdffe2c7fcc2bde7bdb0d2ac0f39201fd3dc79843621a050",
"data_url": "https://raw.githubusercontent.com/soxoj/maigret/main/maigret/resources/data.json"
}
+9 -8
View File
@@ -1,5 +1,5 @@
## List of supported sites (search methods): total 3211
## List of supported sites (search methods): total 3212
Rank data fetched from Majestic Million by domains.
@@ -1178,6 +1178,7 @@ Rank data fetched from Majestic Million by domains.
1. ![](https://www.google.com/s2/favicons?domain=http://dogster.ru/) [Dogster (http://dogster.ru/)](http://dogster.ru/)*: top 10M, ru*
1. ![](https://www.google.com/s2/favicons?domain=https://www.dalnoboi.ru) [Dalnoboi (https://www.dalnoboi.ru)](https://www.dalnoboi.ru)*: top 10M, ru*
1. ![](https://www.google.com/s2/favicons?domain=https://qq.com) [QQ (https://qq.com)](https://qq.com)*: top 100M, cn, social*
1. ![](https://www.google.com/s2/favicons?domain=https://www.bilibili.com/) [Bilibili (https://www.bilibili.com/)](https://www.bilibili.com/)*: top 100M, cn, video*
1. ![](https://www.google.com/s2/favicons?domain=https://social.technet.microsoft.com) [MicrosoftTechNet (https://social.technet.microsoft.com)](https://social.technet.microsoft.com)*: top 100M*, search is disabled
1. ![](https://www.google.com/s2/favicons?domain=https://learn.microsoft.com) [MicrosoftLearn (https://learn.microsoft.com)](https://learn.microsoft.com)*: top 100M, tech*
1. ![](https://www.google.com/s2/favicons?domain=https://social.msdn.microsoft.com) [social.msdn.microsoft.com (https://social.msdn.microsoft.com)](https://social.msdn.microsoft.com)*: top 100M*, search is disabled
@@ -3218,21 +3219,21 @@ Rank data fetched from Majestic Million by domains.
The list was updated at (2026-07-20)
## Statistics
Enabled/total sites: 2538/3211 = 79.04%
Enabled/total sites: 2539/3212 = 79.05%
Incomplete message checks: 325/2538 = 12.81% (false positive risks)
Incomplete message checks: 325/2539 = 12.8% (false positive risks)
Status code checks: 691/2538 = 27.23% (false positive risks)
Status code checks: 691/2539 = 27.22% (false positive risks)
False positive risk (total): 40.04%
False positive risk (total): 40.02%
Sites with probing: 500px, Armchairgm, BinarySearch (disabled), BitBucket, BleachFandom, Bluesky, BongaCams, Boosty, Bunpro, BuyMeACoffee, Calendly, Cent, Chess, Code Sandbox (disabled), Code Snippet Wiki, DailyMotion, Discord, Diskusjon.no, Disqus, Docker Hub, Duolingo, F-droid, Faceit, FandomCommunityCentral, GitHub, GitLab, Golangbridge, Google Plus (archived), Gravatar, HackTheBox, HackerNews, HackerNoon, Hackerrank, Hashnode, Hey, Holopin, ITVDN Forum, Imgur, Instagram, Keybase, Kick, Kvinneguiden, LeetCode, Lemmy World, Lesswrong, Livejasmin, LocalCryptos (disabled), Mapillary Forum, Matrix, Medium, MetaDiscourse, MicrosoftLearn, Minds, MixCloud, Monkeytype, NPM, Niftygateway, ORCID, Omg.lol, OnlyFans, Paragraph, Picsart, Polarsteps, QQ, Rarible, Reddit, Reddit Search (Pushshift) (disabled), Revolut.me, RoyalCams, Scratch, Silver-collector, Soop, SportsTracker, Spotify, StackOverflow, Substack, TAP'D, Topcoder, Trello, Twitch, Twitter, Twitter Shadowban (disabled), UnstoppableDomains, Vimeo, Vivino, Warframe Market, Warpcast, Weibo, Wikipedia, Yapisal (disabled), Ybox, YouNow, community.endlessos.com, community.getpostman.com, community.icons8.com, community.p2pu.org, discourse.haskell.org, discourse.jupyter.org, discuss.inventables.com, en.brickimedia.org, forum.audacityteam.org, forum.garudalinux.org, forum.ghost.org, forum.languagelearningwithnetflix.com, forum.shotcut.org, forum.zorin.com, forums.docker.com, forums.grandstream.com, forums.steinberg.net, habbo.com.br, habbo.com.tr, hiveos.farm, iNaturalist, nightbot, notabug.org, openframeworks, programming.dev, qiwi.me (disabled), sourceruns, support.ilovegrowingmarijuana.com
Sites with probing: 500px, Armchairgm, Bilibili, BinarySearch (disabled), BitBucket, BleachFandom, Bluesky, BongaCams, Boosty, Bunpro, BuyMeACoffee, Calendly, Cent, Chess, Code Sandbox (disabled), Code Snippet Wiki, DailyMotion, Discord, Diskusjon.no, Disqus, Docker Hub, Duolingo, F-droid, Faceit, FandomCommunityCentral, GitHub, GitLab, Golangbridge, Google Plus (archived), Gravatar, HackTheBox, HackerNews, HackerNoon, Hackerrank, Hashnode, Hey, Holopin, ITVDN Forum, Imgur, Instagram, Keybase, Kick, Kvinneguiden, LeetCode, Lemmy World, Lesswrong, Livejasmin, LocalCryptos (disabled), Mapillary Forum, Matrix, Medium, MetaDiscourse, MicrosoftLearn, Minds, MixCloud, Monkeytype, NPM, Niftygateway, ORCID, Omg.lol, OnlyFans, Paragraph, Picsart, Polarsteps, QQ, Rarible, Reddit, Reddit Search (Pushshift) (disabled), Revolut.me, RoyalCams, Scratch, Silver-collector, Soop, SportsTracker, Spotify, StackOverflow, Substack, TAP'D, Topcoder, Trello, Twitch, Twitter, Twitter Shadowban (disabled), UnstoppableDomains, Vimeo, Vivino, Warframe Market, Warpcast, Weibo, Wikipedia, Yapisal (disabled), Ybox, YouNow, community.endlessos.com, community.getpostman.com, community.icons8.com, community.p2pu.org, discourse.haskell.org, discourse.jupyter.org, discuss.inventables.com, en.brickimedia.org, forum.audacityteam.org, forum.garudalinux.org, forum.ghost.org, forum.languagelearningwithnetflix.com, forum.shotcut.org, forum.zorin.com, forums.docker.com, forums.grandstream.com, forums.steinberg.net, habbo.com.br, habbo.com.tr, hiveos.farm, iNaturalist, nightbot, notabug.org, openframeworks, programming.dev, qiwi.me (disabled), sourceruns, support.ilovegrowingmarijuana.com
Sites with activation: OnlyFans, ProtonMail, Twitter, Vimeo, Weibo, WikimapiaSearch
Top 20 profile URLs:
- (709) `{urlMain}/index/8-0-{username} (uCoz)`
- (326) `/{username}`
- (327) `/{username}`
- (222) `{urlMain}{urlSubpath}/members/?username={username} (XenForo)`
- (176) `/user/{username}`
- (142) `/profile/{username}`
@@ -3284,7 +3285,7 @@ Top 20 tags:
- (36) `music`
- (29) `crypto`
- (27) `finance`
- (25) `video`
- (26) `video`
- (25) `sharing`
- (25) `education`
- (22) `freelance`