Skip to content

Commit

Permalink
Adding --platform-aware to url-parse command
Browse files Browse the repository at this point in the history
Fix #600
  • Loading branch information
Yomguithereal committed Jul 24, 2023
1 parent f8907dc commit 23d8cf2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions minet/cli/url_parse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,10 @@ def __call__(self, parser, cli_args, values, option_string=None):
"help": "Whether to strip the hostname suffix when fingerprinting the url.",
"action": "store_true",
},
{
"flag": "--plaftorm-aware",
"help": "Whether url parsing should know about some specififc platform such as Facebook, YouTube etc. into account when normalizing urls. Note that this is different than activating --facebook or --youtube.",
"action": "store_true",
},
],
)
7 changes: 6 additions & 1 deletion minet/cli/url_parse/url_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,13 @@ def extract_standard_addendum(cli_args, url):
strip_irrelevant_subdomains=cli_args.strip_irrelevant_subdomains,
strip_protocol=cli_args.strip_protocol,
strip_trailing_slash=cli_args.strip_trailing_slash,
platform_aware=cli_args.platform_aware,
),
fingerprint_url(
url,
strip_suffix=cli_args.strip_suffix,
platform_aware=cli_args.platform_aware,
),
fingerprint_url(url, strip_suffix=cli_args.strip_suffix),
infer_redirection(url),
get_domain_name(url),
get_hostname(url),
Expand Down

0 comments on commit 23d8cf2

Please sign in to comment.