diff --git a/maigret/checking.py b/maigret/checking.py index ecbb618..a4cb18d 100644 --- a/maigret/checking.py +++ b/maigret/checking.py @@ -44,6 +44,7 @@ unsupported_characters = '#' QueryDraft = Tuple[Callable, Any, Any] QueriesDraft = Iterable[QueryDraft] + class AsyncExecutor: def __init__(self, *args, **kwargs): self.logger = kwargs['logger'] @@ -472,7 +473,7 @@ async def maigret(username, site_dict, query_notify, logger, headers.update(site.headers) - if not 'url' in site.__dict__: + if 'url' not in site.__dict__: logger.error('No URL for site %s', site.name) # URL of user on site (if it exists) url = site.url.format( diff --git a/maigret/maigret.py b/maigret/maigret.py index 9f37704..b9578ad 100755 --- a/maigret/maigret.py +++ b/maigret/maigret.py @@ -1,19 +1,23 @@ """ Maigret main module """ - +import aiohttp +import asyncio +import logging import os +import sys import platform from argparse import ArgumentParser, RawDescriptionHelpFormatter import requests -from socid_extractor import parse, __version__ as socid_version +from socid_extractor import extract, parse, __version__ as socid_version -from .checking import * +from .checking import timeout_check, supported_recursive_search_ids, self_check, unsupported_characters, maigret from .notify import QueryNotifyPrint from .report import save_csv_report, save_xmind_report, save_html_report, save_pdf_report, \ generate_report_context, save_txt_report, SUPPORTED_JSON_REPORT_FORMATS, check_supported_json_format, \ save_json_report +from .sites import MaigretDatabase from .submit import submit_dialog __version__ = '0.1.15' @@ -273,7 +277,6 @@ async def main(): # Make reports folder is not exists os.makedirs(args.folderoutput, exist_ok=True) - report_path = args.folderoutput # Define one report filename template report_filepath_tpl = os.path.join(args.folderoutput, 'report_{username}{postfix}') diff --git a/maigret/resources/data.json b/maigret/resources/data.json index 7e670fd..c9ade31 100644 --- a/maigret/resources/data.json +++ b/maigret/resources/data.json @@ -14,7 +14,7 @@ "ru" ], "engine": "uCoz", - "alexaRank": 8039842, + "alexaRank": 8074165, "urlMain": "http://0k.clan.su", "usernameClaimed": "eruzz", "usernameUnclaimed": "noonewouldeverusethis7" @@ -23,9 +23,10 @@ "tags": [ "ru" ], + "regexCheck": "^[^.]{1,}$", "checkType": "message", "absenceStrs": "\u042d\u0442\u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0438\u043b\u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d.", - "alexaRank": 1152434, + "alexaRank": 1156176, "url": "http://1001mem.ru/{username}", "urlMain": "http://1001mem.ru", "usernameClaimed": "adam", @@ -42,7 +43,7 @@ "absenceStrs": [ "Sorry, the requested user is not valid!" ], - "alexaRank": 33846, + "alexaRank": 33872, "url": "https://www.1001tracklists.com/user/{username}/index.html", "urlMain": "https://www.1001tracklists.com", "usernameClaimed": "JacoWilles", @@ -54,17 +55,14 @@ "ru" ], "engine": "XenForo", - "alexaRank": 115109, + "alexaRank": 111642, "urlMain": "https://forum-ru.101xp.com", "usernameClaimed": "aida", "usernameUnclaimed": "noonewouldeverusethis7" }, "11x2": { - "tags": [ - "global" - ], "checkType": "status_code", - "alexaRank": 1657254, + "alexaRank": 1661856, "url": "https://11x2.com/user/home/{username}", "urlMain": "https://11x2.com", "usernameClaimed": "hazelamy", @@ -90,7 +88,7 @@ ], "checkType": "message", "absenceStrs": "Error something went wrong", - "alexaRank": 509, + "alexaRank": 510, "url": "https://1337x.to/user/{username}/", "urlMain": "https://1337x.to", "usernameClaimed": "adam", @@ -104,7 +102,7 @@ ], "checkType": "message", "absenceStrs": "This user does not exist or is not approved yet. Come back later.", - "alexaRank": 138579, + "alexaRank": 134199, "url": "https://1x.com/member/{username}", "urlMain": "https://1x.com", "usernameClaimed": "blue", @@ -115,7 +113,7 @@ "ru" ], "engine": "vBulletin", - "alexaRank": 1818171, + "alexaRank": 1734873, "urlMain": "https://1xforum.com", "usernameClaimed": "adam", "usernameUnclaimed": "noonewouldeverusethis7" @@ -126,7 +124,7 @@ "us" ], "checkType": "status_code", - "alexaRank": 1856, + "alexaRank": 1834, "url": "https://247sports.com/user/{username}/", "urlMain": "https://247sports.com", "usernameClaimed": "adam", @@ -139,7 +137,7 @@ "us" ], "checkType": "status_code", - "alexaRank": 41803, + "alexaRank": 42088, "url": "https://24open.ru/user/{username}/", "urlMain": "https://24open.ru", "usernameClaimed": "niko3193", @@ -147,7 +145,7 @@ }, "2Dimensions": { "checkType": "status_code", - "alexaRank": 7242415, + "alexaRank": 7268180, "url": "https://2Dimensions.com/a/{username}", "urlMain": "https://2Dimensions.com/", "usernameClaimed": "blue", @@ -159,7 +157,7 @@ ], "checkType": "message", "absenceStrs": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d", - "alexaRank": 840583, + "alexaRank": 860791, "url": "https://2berega.spb.ru/user/{username}", "urlMain": "https://2berega.spb.ru", "usernameClaimed": "adam", @@ -170,7 +168,7 @@ "ru" ], "checkType": "status_code", - "alexaRank": 805036, + "alexaRank": 804958, "url": "https://www.2d-3d.ru/user/{username}/", "urlMain": "https://www.2d-3d.ru", "usernameClaimed": "adam", @@ -182,7 +180,7 @@ ], "checkType": "message", "absenceStrs": "Deze gebruiker is niet geregistreerd, zodat je zijn of haar profiel niet kunt bekijken.", - "alexaRank": 1341339, + "alexaRank": 1345235, "url": "https://www.2fast4u.be/members/?username={username}", "urlMain": "https://www.2fast4u.be", "usernameClaimed": "Schussboelie", @@ -199,7 +197,7 @@ "\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f" ], "absenceStrs": "\u0418\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442", - "alexaRank": 4331826, + "alexaRank": 4341257, "url": "http://{username}.33bru.com/", "urlMain": "http://33bru.com/", "usernameClaimed": "adam", @@ -217,12 +215,9 @@ "usernameUnclaimed": "noonewouldeverusethis7" }, "3dcadforums": { - "tags": [ - "global" - ], "checkType": "message", "absenceStrs": "The specified member cannot be found", - "alexaRank": 948319, + "alexaRank": 973583, "url": "https://www.3dcadforums.com/members/?username={username}", "urlMain": "https://www.3dcadforums.com/", "usernameClaimed": "adam", @@ -233,7 +228,7 @@ "ru" ], "checkType": "status_code", - "alexaRank": 12239, + "alexaRank": 12122, "url": "https://3ddd.ru/users/{username}", "urlMain": "https://3ddd.ru", "usernameClaimed": "adam", @@ -244,7 +239,7 @@ "ru" ], "engine": "vBulletin", - "alexaRank": 6594, + "alexaRank": 6622, "urlMain": "http://forum.3dnews.ru/", "usernameClaimed": "red", "usernameUnclaimed": "noonewouldeverusethis7" @@ -254,7 +249,7 @@ "ru" ], "checkType": "response_url", - "alexaRank": 77866, + "alexaRank": 78445, "url": "https://3dtoday.ru/blogs/{username}", "urlMain": "https://3dtoday.ru/", "usernameClaimed": "adam", @@ -265,7 +260,7 @@ "ru" ], "engine": "vBulletin", - "alexaRank": 216430, + "alexaRank": 216736, "urlMain": "https://4cheat.ru", "usernameClaimed": "adam", "usernameUnclaimed": "noonewouldeverusethis7" @@ -275,7 +270,7 @@ "ru" ], "engine": "XenForo", - "alexaRank": 90075, + "alexaRank": 88195, "urlMain": "https://4gameforum.com", "usernameClaimed": "persty", "usernameUnclaimed": "noonewouldeverusethis7" @@ -286,7 +281,7 @@ ], "checkType": "message", "absenceStrs": "\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0412\u0430\u0448 \u043f\u043e\u0438\u0441\u043a \u043d\u0435 \u0434\u0430\u043b \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.", - "alexaRank": 2737, + "alexaRank": 2768, "url": "https://4pda.ru/forum/index.php?act=search&source=pst&noform=1&username={username}", "urlMain": "https://4pda.ru/", "usernameClaimed": "green", @@ -297,7 +292,7 @@ "ru" ], "checkType": "status_code", - "alexaRank": 241283, + "alexaRank": 239881, "url": "https://4stor.ru/user/{username}", "urlMain": "https://4stor.ru", "usernameClaimed": "adam", @@ -305,7 +300,6 @@ }, "500px": { "tags": [ - "global", "in", "photo" ], @@ -316,7 +310,7 @@ "urlProbe": "https://api.500px.com/graphql?operationName=ProfileRendererQuery&variables=%7B%22username%22%3A%22{username}%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22105058632482dd2786fd5775745908dc928f537b28e28356b076522757d65c19%22%7D%7D", "checkType": "message", "absenceStrs": "No message available", - "alexaRank": 3195, + "alexaRank": 3138, "url": "https://500px.com/p/{username}", "urlMain": "https://500px.com/", "usernameClaimed": "blue", @@ -324,7 +318,7 @@ }, "50cc.com.ua": { "engine": "uCoz", - "alexaRank": 7033504, + "alexaRank": 7062044, "urlMain": "http://50cc.com.ua", "usernameClaimed": "alex", "usernameUnclaimed": "noonewouldeverusethis7" @@ -348,7 +342,7 @@ "us" ], "checkType": "status_code", - "alexaRank": 37131, + "alexaRank": 37518, "url": "https://www.7cups.com/@{username}", "urlMain": "https://www.7cups.com/", "usernameClaimed": "blue", @@ -359,7 +353,7 @@ "ru" ], "checkType": "status_code", - "alexaRank": 18075, + "alexaRank": 17699, "url": "https://7dach.ru/profile/{username}", "urlMain": "https://7dach.ru/", "usernameClaimed": "adam", @@ -370,7 +364,7 @@ "ru" ], "checkType": "status_code", - "alexaRank": 40652, + "alexaRank": 40325, "url": "https://blog.7ya.ru/{username}/", "urlMain": "https://blog.7ya.ru", "usernameClaimed": "trotter", @@ -406,7 +400,7 @@ ], "checkType": "message", "absenceStrs": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.", - "alexaRank": 9003451, + "alexaRank": 8353704, "url": "https://aback.com.ua/user/{username}", "urlMain": "https://aback.com.ua", "usernameClaimed": "adam", @@ -418,7 +412,7 @@ "in" ], "checkType": "status_code", - "alexaRank": 10376, + "alexaRank": 9842, "url": "https://about.me/{username}", "urlMain": "https://about.me/", "usernameClaimed": "blue", @@ -430,7 +424,7 @@ ], "checkType": "message", "absenceStrs": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430.", - "alexaRank": 2159895, + "alexaRank": 2166426, "url": "http://aboutcar.ru/members/{username}.html", "urlMain": "http://aboutcar.ru", "usernameClaimed": "krolenya", @@ -442,7 +436,7 @@ ], "regexCheck": "^[^\\.]+$", "checkType": "status_code", - "alexaRank": 376, + "alexaRank": 375, "url": "https://independent.academia.edu/{username}", "urlMain": "https://www.academia.edu/", "usernameClaimed": "blue", @@ -453,7 +447,7 @@ "ru" ], "checkType": "status_code", - "alexaRank": 195327, + "alexaRank": 192036, "url": "https://acomics.ru/-{username}", "urlMain": "https://acomics.ru", "usernameClaimed": "Garage", @@ -462,12 +456,11 @@ "AdultFriendFinder": { "tags": [ "dating", - "global", "us" ], "checkType": "message", "absenceStrs": "