From a9f24607d4d704b7c7bb25ac9122950c49f14c60 Mon Sep 17 00:00:00 2001 From: lulzette Date: Sat, 13 May 2023 13:52:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=BC=D0=B5=D1=80=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D0=BE=D0=B9=20=D1=81?= =?UTF-8?q?=20=D1=80=D0=B0=D1=81=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 43a0a8f..be4efd8 100644 --- a/main.py +++ b/main.py @@ -1597,8 +1597,39 @@ if __name__ == '__main__': post_headers = {"Content-Type": "application/x-www-form-urlencoded"} post_url = "https://guap.ru/rasp/?g=2" - post_result = requests.post(post_url, data=post_data, headers=post_headers) + # post_result = requests.post(post_url, data=post_data, headers=post_headers) + + post_result = html_sample + + # Парсим полученные данные + + soup_result = BeautifulSoup(post_result, 'html.parser') + + result_html = soup_result.find('div', {'class', 'result'}) + + # print(result_html.prettify()) + + rasp_summary = list() + # Пример rasp_summary + # ( + # { + # "date": "понедельник", + # "value": ( + # { + # "time": "1 пара (9:30–11:00)", + # "type": "ПР", + # "name": "– Прикладная физическая культура (элективный модуль)", + # "profs": ( + # "Алексеева С.В. - старший преподаватель" + # ), + # "groups": ( + # 1011, + # 1012 + # ), + # "place": "– Б.Морская 67, ауд. спортзал*", + # "up_or_down": None + # } + # ) + # } + # ) - print( - post_result.text - )