Sites fixes (#1917)

* Some sites fixes

* Sites stats updated
This commit is contained in:
Soxoj
2024-12-01 03:19:36 +01:00
committed by GitHub
parent 0c7e3898e8
commit d15e12750b
3 changed files with 44 additions and 25 deletions
+27 -18
View File
@@ -10640,10 +10640,11 @@
"type": "ok_id",
"checkType": "message",
"presenceStrs": [
"profile__menu"
"profile__content_header_user"
],
"absenceStrs": [
"mm-profile_not-found_content"
"mm-profile_not-found_content",
"<title>\u041c\u043e\u0439 \u041c\u0438\u0440@Mail.Ru</title>"
],
"alexaRank": 49,
"urlMain": "https://my.mail.ru/",
@@ -10658,10 +10659,11 @@
"type": "vk_id",
"checkType": "message",
"presenceStrs": [
"profile__menu"
"profile__content_header_user"
],
"absenceStrs": [
"mm-profile_not-found_content"
"mm-profile_not-found_content",
"<title>\u041c\u043e\u0439 \u041c\u0438\u0440@Mail.Ru</title>"
],
"alexaRank": 49,
"urlMain": "https://my.mail.ru/",
@@ -10675,10 +10677,11 @@
],
"checkType": "message",
"presenceStrs": [
"profile__menu"
"profile__content_header_user"
],
"absenceStrs": [
"mm-profile_not-found_content"
"mm-profile_not-found_content",
"<title>\u041c\u043e\u0439 \u041c\u0438\u0440@Mail.Ru</title>"
],
"alexaRank": 49,
"urlMain": "https://my.mail.ru/",
@@ -10692,10 +10695,11 @@
],
"checkType": "message",
"presenceStrs": [
"profile__menu"
"profile__content_header_user"
],
"absenceStrs": [
"mm-profile_not-found_content"
"mm-profile_not-found_content",
"<title>\u041c\u043e\u0439 \u041c\u0438\u0440@Mail.Ru</title>"
],
"alexaRank": 49,
"urlMain": "https://my.mail.ru/",
@@ -10709,10 +10713,11 @@
],
"checkType": "message",
"presenceStrs": [
"profile__menu"
"profile__content_header_user"
],
"absenceStrs": [
"mm-profile_not-found_content"
"mm-profile_not-found_content",
"<title>\u041c\u043e\u0439 \u041c\u0438\u0440@Mail.Ru</title>"
],
"alexaRank": 49,
"urlMain": "https://my.mail.ru/",
@@ -10726,10 +10731,11 @@
],
"checkType": "message",
"presenceStrs": [
"profile__menu"
"profile__content_header_user"
],
"absenceStrs": [
"mm-profile_not-found_content"
"mm-profile_not-found_content",
"<title>\u041c\u043e\u0439 \u041c\u0438\u0440@Mail.Ru</title>"
],
"alexaRank": 49,
"urlMain": "https://my.mail.ru/",
@@ -10743,16 +10749,17 @@
],
"checkType": "message",
"presenceStrs": [
"profile__menu"
"profile__content_header_user"
],
"absenceStrs": [
"mm-profile_not-found_content"
"mm-profile_not-found_content",
"<title>\u041c\u043e\u0439 \u041c\u0438\u0440@Mail.Ru</title>"
],
"alexaRank": 49,
"urlMain": "https://my.mail.ru/",
"url": "https://my.mail.ru/ya.ru/{username}/",
"usernameClaimed": "hovsepovich",
"usernameUnclaimed": "noonewouldeverusethis7"
"usernameUnclaimed": "MAlKOVyd"
},
"My.Mail.ru@yandex.ru": {
"tags": [
@@ -10760,10 +10767,11 @@
],
"checkType": "message",
"presenceStrs": [
"profile__menu"
"profile__content_header_user"
],
"absenceStrs": [
"mm-profile_not-found_content"
"mm-profile_not-found_content",
"<title>\u041c\u043e\u0439 \u041c\u0438\u0440@Mail.Ru</title>"
],
"alexaRank": 49,
"urlMain": "https://my.mail.ru/",
@@ -18773,7 +18781,8 @@
"\u7528\u6237\u4e0d\u5b58\u5728"
],
"usernameClaimed": "blue",
"usernameUnclaimed": "noonewouldeverusethis7"
"usernameUnclaimed": "noonewouldeverusethis7",
"disabled": true
},
"Zhyk": {
"disabled": true,
+11 -1
View File
@@ -260,7 +260,6 @@ class MaigretDatabase:
def has_site(self, site: MaigretSite):
for s in self._sites:
if site == s:
print(f"input == site: {site} == {s}")
return True
return False
@@ -278,6 +277,17 @@ class MaigretDatabase:
):
"""
Ranking and filtering of the sites list
Args:
reverse (bool, optional): Reverse the sorting order. Defaults to False.
top (int, optional): Maximum number of sites to return. Defaults to sys.maxsize.
tags (list, optional): List of tags to filter sites by. Defaults to empty list.
names (list, optional): List of site names (or urls, see MaigretSite.__eq__) to filter by. Defaults to empty list.
disabled (bool, optional): Whether to include disabled sites. Defaults to True.
id_type (str, optional): Type of identifier to filter by. Defaults to "username".
Returns:
dict: Dictionary of filtered and ranked sites, with site names as keys and MaigretSite objects as values
"""
normalized_names = list(map(str.lower, names))
normalized_tags = list(map(str.lower, tags))