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 #362

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

solution #362

wants to merge 1 commit into from

Conversation

Le0n-K
Copy link

@Le0n-K Le0n-K commented Jan 14, 2025

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.

Your code successfully meets the task requirements and constraints, and it effectively scrapes quotes while handling pagination. 🎉 There are a couple of minor issues, such as a typo in the variable name recived_quotes and a redundant if statement that can be simplified. These don't impact the core functionality, so feel free to address them in future iterations. Keep up the great work! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

text = requests.get(HOME_URL).content
soup = BeautifulSoup(text, "html.parser")
quotes = soup.select(".quote")
recived_quotes = [parse_single_quote(quote) for quote in quotes]

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 variable name recived_quotes. It should be received_quotes to correctly reflect the intended meaning.

Comment on lines +33 to +34
if soup.select_one(".next"):
while soup.select_one(".next"):

Choose a reason for hiding this comment

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

The if statement checking for .next is redundant since the while loop already checks for .next. You can remove the if statement to simplify the code.

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