-
Notifications
You must be signed in to change notification settings - Fork 375
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
Solution #371
base: master
Are you sure you want to change the base?
Solution #371
Conversation
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.
Great job on meeting the core requirements of the task! 🎉 Your code effectively scrapes all quotes, handles pagination, and writes the data to a CSV file as expected. While there are a few minor issues, such as a typo in a function name and a potential improvement in error handling, these do not significantly impact the functionality. Keep up the good work and consider addressing these minor points for even better code quality in the future! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
@@ -3,6 +3,6 @@ | |||
*.iml | |||
.env | |||
.DS_Store | |||
venv/ | |||
.venv/ |
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.
The .venv/
entry is correctly included to ignore virtual environment directories. However, ensure that this matches the actual directory name used in your project. If your virtual environment directory has a different name, you should update this entry accordingly.
) | ||
|
||
|
||
def parse_qutes(soup: Tag) -> list[Quote]: |
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.
There is a typo in the function name parse_qutes
. It should be parse_quotes
to accurately reflect its purpose and maintain consistency with naming conventions.
|
||
def parse_qutes(soup: Tag) -> list[Quote]: | ||
quotes = [parse_single_quote(quote) for quote in soup.select(".quote")] | ||
while next := soup.select_one(".next > a"): |
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.
The use of the walrus operator :=
is correct here for Python 3.8 and above. Ensure that your environment supports this syntax, or consider using a different approach if compatibility with older Python versions is required.
No description provided.