internetnl_scan package
Submodules
internetnl_scan.internetnl_classes module
- class internetnl_scan.internetnl_classes.InternetNlScanner(urls_to_scan: list, tracking_information: str | None = None, scan_id: str | None = None, n_id_chars: int | None = None, scan_name: str | None = None, scan_type: str = 'web', api_url: str = 'https://batch.internet.nl/api/batch/v2/', interval: int = 30, cache_directory: str = 'cache', ignore_cache: bool = True, output_filename: str | None = None, wait_until_done: bool = False, get_results: bool = False, cancel_scan: bool = False, list_all_scans: bool = False, clear_all_scans: bool = False, export_results: bool = False, force_cancel: bool = False, force_overwrite: bool = False, dry_run: bool = False)[source]
Bases:
objectPython interfaces for Internet.nl API
internetnl_scan.main module
internetnl_scan.utils module
- class internetnl_scan.utils.Credentials(service_name='Internet.nl')[source]
Bases:
objectstores the user credentials in a key ring
- internetnl_scan.utils.convert_url_list(urls_to_scan: list, scan_type='web')[source]
cleans up the urls in a list
- internetnl_scan.utils.get_clean_url(url, cache_dir=None)[source]
Turns an url into a clean url and adds it
- internetnl_scan.utils.get_urls_from_domain_file(domain_file: str, url_column_key: str | None = None, sep: str = ',', column_number: int = 0) list[source]
Get urls from a file name
- Parameters:
domain_file (str) – the file name to be read
url_column_key (str, optional) – The name of the column containing the url values. Defaults to None, meaning
header (that the file does not have a) –
sep (str, optional) – The separator of the file
column_number (int, optional) – The column number to read in case no header is given
- Returns:
list of cleaned url’s
- Return type:
- internetnl_scan.utils.make_cache_file_name(directory, scan_id, scan_type)[source]
build the cache file name
- internetnl_scan.utils.query_yes_no(question, default_answer='no')[source]
Ask a yes/no question via raw_input() and return their answer.
- internetnl_scan.utils.remove_sub_domain(url: str) str[source]
remove www or any other subdomain from the url
- internetnl_scan.utils.remove_sub_domains(urls_to_scan: list) list[source]
remove www or any other subdomain from the url
- internetnl_scan.utils.response_to_dataframe(response)[source]
Convert the Internet.nl response to pandas dataframe
- Parameters:
response – the returned response ot the Internet.nl API
- Returns:
Pandas dataframe