- added optional --domain parameter to fetch only from one oliphant blocklist
files
"fetch_oliphant",
help="Fetches CSV files (block recommendations) for more possible instances to disover",
)
+ parser.add_argument("--domain", help="Instance name (aka. domain) to check")
parser.set_defaults(command=commands.fetch_oliphant)
### Fetch instances from given initial instance ###
)
for block in blocklists:
+ # Is domain given and not equal blocker?
+ if isinstance(args.domain, str) and args.domain != block["blocker"]:
+ # DEBUG: print(f"DEBUG: Skipping blocker='{block['blocker']}', not matching args.domain='{args.domain}'")
+ continue
+
# Fetch this URL
- print(f"DEBUG: Fetching csv_url='{block['csv_url']}' for blocker='{block['blocker']}' ...")
+ print(f"INFO: Fetching csv_url='{block['csv_url']}' for blocker='{block['blocker']}' ...")
response = fba.fetch_url(f"{base_url}/{block['csv_url']}", network.web_headers, (config.get("connection_timeout"), config.get("read_timeout")))
# DEBUG: print(f"DEBUG: response[]='{type(response)}'")