1
0
Fork 0
mirror of https://github.com/EDeev/school_menu.git synced 2026-10-07 20:49:36 +03:00

from site

This commit is contained in:
Egor Deev 2021-10-09 21:22:26 +07:00 • committed by GitHub
parent ed69b5fc5e
commit 23d7ca6382

View file

@ -1,4 +1,4 @@
from bs4 import BeautifulSoup as bf from bs4 import BeautifulSoup
import requests as req import requests as req
import datetime as dt import datetime as dt
import openpyxl, os import openpyxl, os
@ -13,7 +13,7 @@ def eating(day):
if wkd != 6: if wkd != 6:
try: try:
resp = req.get('http://school09.ru/vse-stati/main/food1').text resp = req.get('http://school09.ru/vse-stati/main/food1').text
soup = bf(resp, "html.parser").find_all("ul", "easyfolderlisting")[0] soup = BeautifulSoup(resp, "html.parser").find_all("ul", "easyfolderlisting")[0]
food = [[str(_)[15:32], str(_)[190:200], str(_)[130:172]] for _ in soup if _ != "\n"] food = [[str(_)[15:32], str(_)[190:200], str(_)[130:172]] for _ in soup if _ != "\n"]
if day == 0: if day == 0: