Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method _init_input() is common for all templates (Product, Article, ...) - find a better approach to re-use this #51

Open
PyExplorer opened this issue Apr 19, 2024 · 0 comments

Comments

@PyExplorer
Copy link
Contributor

Based on discussion about new Article template.
_init_input()

   def _init_input(self):
        urls_file = self.args.urls_file
        if urls_file:
            response = requests.get(urls_file)
            urls = load_url_list(response.text)
            self.logger.info(f"Loaded {len(urls)} initial URLs from {urls_file}.")
            self.start_urls = urls
        else:
            self.start_urls = [self.args.url]
        self.allowed_domains = list(set(get_domain(url) for url in self.start_urls))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant