Skip to content

Commit

Permalink
Add Viktorka restaurant
Browse files Browse the repository at this point in the history
  • Loading branch information
holoujak committed Oct 9, 2024
1 parent 0b02b74 commit 38d219e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lunches.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,23 @@ def rusty_bell_pub(dom):
yield food


@restaurant("Viktorka", "https://www.viktorkaostrava.cz/denni-menu/", Location.Poruba)
def viktorka(dom):
sections = dom.css("ul.elementor-price-list")
type = [Soup, Lunch]
day_nth = datetime.datetime.today().weekday()
for i in range(2):
titles = sections[i].css("span.elementor-price-list-title")
prices = sections[i].css("span.elementor-price-list-price")

meals = [(title.text().strip(), price.text().strip()) for title, price in zip(titles, prices)]

for name, price in meals:
# in case of soups [i = 0] check the current week day
if (i == 0 and name.startswith(days[day_nth])) or i == 1:
yield type[i](name=name, price=price)


@restaurant("Kurnik sopa", "https://www.kurniksopahospoda.cz", Location.Poruba)
def kurniksopa(dom):
for pivo in dom.css("#naCepu-list tr"):
Expand Down

0 comments on commit 38d219e

Please sign in to comment.