INNER CODE UNIT · Python

count_files

atenreiro/opensquat · opensquat/app.py:128

    def count_files(self):
        (self.keywords_total, self.domain_total) = file_input.InputFile().main(
            self.keywords_filename,
            self.domain_filename
        )

    def _read_domains(self):
        """Load the domain feed file into self.list_file_domains."""
        with open(self.domain_filename, mode='r', encoding='utf-8') as file_domains:
            for mydomains in file_domains:
                domain = mydomains.replace("\n", "")
                domain = domain.lower().strip()
                # Skip comments and empty lines
                if domain and not domain.startswith("#"):
                    self.list_file_domains.append(domain)

    def _read_keywords(self):
        """Load the keywords file into self.list_file_keywords."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…