mirror of
https://github.com/EDeev/school_menu.git
synced 2026-06-15 11:01:04 +03:00
from site
This commit is contained in:
parent
d098d1e627
commit
6d771232ed
1 changed files with 2 additions and 2 deletions
4
pars.py
4
pars.py
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue