mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-06 14:08:59 +00:00
Added separate no-extracing flag to rule page parsing
This commit is contained in:
+3
-3
@@ -289,7 +289,7 @@ def process_site_result(response, query_notify, logger, results_info, site: Maig
|
||||
|
||||
|
||||
async def maigret(username, site_dict, query_notify, logger,
|
||||
proxy=None, timeout=None, recursive_search=False,
|
||||
proxy=None, timeout=None, is_parsing_enabled=False,
|
||||
id_type='username', debug=False, forced=False,
|
||||
max_connections=100, no_progressbar=False,
|
||||
cookies=None):
|
||||
@@ -307,7 +307,7 @@ async def maigret(username, site_dict, query_notify, logger,
|
||||
proxy -- String indicating the proxy URL
|
||||
timeout -- Time in seconds to wait before timing out request.
|
||||
Default is no timeout.
|
||||
recursive_search -- Search for other usernames in website pages & recursive search by them.
|
||||
is_parsing_enabled -- Search for other usernames in website pages.
|
||||
|
||||
Return Value:
|
||||
Dictionary containing results from report. Key of dictionary is the name
|
||||
@@ -364,7 +364,7 @@ async def maigret(username, site_dict, query_notify, logger,
|
||||
|
||||
# Record URL of main site and username
|
||||
results_site['username'] = username
|
||||
results_site['parsing_enabled'] = recursive_search
|
||||
results_site['parsing_enabled'] = is_parsing_enabled
|
||||
results_site['url_main'] = site.url_main
|
||||
results_site['cookies'] = cookie_jar and cookie_jar.filter_cookies(site.url_main) or None
|
||||
|
||||
|
||||
+7
-2
@@ -106,7 +106,11 @@ async def main():
|
||||
)
|
||||
parser.add_argument("--no-recursion",
|
||||
action="store_true", dest="disable_recursive_search", default=False,
|
||||
help="Disable parsing pages for other usernames and recursive search by them."
|
||||
help="Disable recursive search by additional data extracted from pages."
|
||||
)
|
||||
parser.add_argument("--no-extracting",
|
||||
action="store_true", dest="disable_extracting", default=False,
|
||||
help="Disable parsing pages for additional data and other usernames."
|
||||
)
|
||||
parser.add_argument("--self-check",
|
||||
action="store_true", default=False,
|
||||
@@ -203,6 +207,7 @@ async def main():
|
||||
and u not in args.ignore_ids_list
|
||||
}
|
||||
|
||||
parsing_enabled = not args.disable_extracting
|
||||
recursive_search_enabled = not args.disable_recursive_search
|
||||
|
||||
# Make prompts
|
||||
@@ -324,7 +329,7 @@ async def main():
|
||||
query_notify,
|
||||
proxy=args.proxy,
|
||||
timeout=args.timeout,
|
||||
recursive_search=recursive_search_enabled,
|
||||
is_parsing_enabled=parsing_enabled,
|
||||
id_type=id_type,
|
||||
debug=args.verbose,
|
||||
logger=logger,
|
||||
|
||||
Reference in New Issue
Block a user