-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(scraper): add random user agent #25
Conversation
@CodiumAI-Agent /review |
PR Analysis(review updated until commit 445355b)
PR Feedback💡 General suggestions: The PR is generally well done. However, it would be beneficial to add tests to ensure the random user agent is working as expected. Additionally, the print statement used for debugging should be replaced with proper logging. ✨ Usage guide:Overview:
With a configuration file, use the following template:
See the review usage page for a comprehensive guide on using this tool. |
Persistent review updated to latest commit 445355b |
browser = await p.chromium.launch() | ||
browser = await p.chromium.launch(headless=False) | ||
user_agent = await get_user_agent() | ||
print(f"Make request to {self.url} with {user_agent}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the print statement with a logging statement for better debugging and production readiness. [important]
software_names=software_names, operating_systems=operating_systems, limit=100 | ||
) | ||
|
||
return user_agent_rotator.get_random_user_agent() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding error handling in case the user agent generation fails. [medium]
No description provided.