mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-07 23:27:43 +00:00
Added --ignore-ids option, some sites updates
This commit is contained in:
@@ -128,6 +128,11 @@ async def main():
|
||||
dest="id_type", default='username',
|
||||
help="Specify identifier(s) type (default: username)."
|
||||
)
|
||||
parser.add_argument("--ignore-ids",
|
||||
action="append", metavar='IGNORED_IDS',
|
||||
dest="ignore_ids_list", default=[],
|
||||
help="Do not make search by the specified username or other ids."
|
||||
)
|
||||
parser.add_argument("username",
|
||||
nargs='+', metavar='USERNAMES',
|
||||
action="store",
|
||||
@@ -195,6 +200,7 @@ async def main():
|
||||
u: args.id_type
|
||||
for u in args.username
|
||||
if u not in ['-']
|
||||
and u not in args.ignore_ids_list
|
||||
}
|
||||
|
||||
recursive_search_enabled = not args.disable_recursive_search
|
||||
@@ -298,6 +304,10 @@ async def main():
|
||||
else:
|
||||
already_checked.add(username.lower())
|
||||
|
||||
if username in args.ignore_ids_list:
|
||||
query_notify.warning(f'Skip a search by username {username} cause it\'s marked as ignored.')
|
||||
continue
|
||||
|
||||
# check for characters do not supported by sites generally
|
||||
found_unsupported_chars = set(unsupported_characters).intersection(set(username))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user