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

Added Paulus restaurant #8

Merged
merged 2 commits into from
Aug 7, 2024
Merged

Added Paulus restaurant #8

merged 2 commits into from
Aug 7, 2024

Conversation

SacrificeGhuleh
Copy link
Contributor

No description provided.

lunches.py Outdated
continue
soup_table = day_dom.css("table")[0].css("span")
lunch_table = day_dom.css("table")[1].css("span") + day_dom.css("table")[2].css("span")
for i in range(0, len(soup_table), 2):
Copy link
Owner

Choose a reason for hiding this comment

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

what about this? zip even rows with odd rows ([start:end:increment]) into tuple:

for soup, price in zip(soup_table[::2], soup_table[1::2]):
            yield Soup(soup.text(strip=True), price.text(strip=True))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixde

if current_day not in day:
continue
soup_table = day_dom.css("table")[0].css("span")
lunch_table = day_dom.css("table")[1].css("span") + day_dom.css("table")[2].css("span")
Copy link
Owner

Choose a reason for hiding this comment

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

I would move this variable just before the right for cycle - to show "lifetime" or when the variable is really needed

@trnila trnila merged commit f4e2dee into trnila:master Aug 7, 2024
2 checks passed
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