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

Update website_crawler.py to keep clean urls #114

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crawlers/website_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def crawl(self) -> None:
pos_regex=self.pos_regex, neg_regex=self.neg_regex,
indexer=self.indexer, visited=set(), verbose=self.indexer.verbose)
urls = clean_urls(urls_set, keep_query_params)
urls = list(set(urls_set))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, but I think the idea of line 82 is really to remove duplicates, so should have been
"urls = list(set(urls))"
instead of removing this altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But clean_urls is also removing duplicates with the same mechanism isn't it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes you are right!

else:
logging.info(f"Unknown pages_source: {self.cfg.website_crawler.pages_source}")
return
Expand Down