From b7d3c30c86ea7fcae75efef1da817aea40f35c55 Mon Sep 17 00:00:00 2001 From: Anton Laktionov Date: Wed, 10 Jun 2026 18:40:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20ma?= =?UTF-8?q?in.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..dbf5e54 --- /dev/null +++ b/main.py @@ -0,0 +1,19 @@ +import requests +from bs4 import BeautifulSoup +import re + +headers = { + 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36' + } +response = requests.get( + 'https://online.top-academy.ru/education/ochno', + headers=headers + ) +html = response.text +soup = BeautifulSoup(html,'html.parser') +result = soup.find_all("a", class_='styles_container__Yf7Qk') +for el in result: + name = el.find("span") + name = re.search(r'([^<>]+)',str(name)) + if name: + print(name.group(1))