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

Solution #371

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Solution #371

wants to merge 2 commits into from

Conversation

OttoLindholm
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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/

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]:

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"):

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.

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

Successfully merging this pull request may close these issues.

2 participants