From 96f6e7b1cdd75ca5d71eff0b548390ea908d8824 Mon Sep 17 00:00:00 2001 From: def <8384198-dettlaff@users.noreply.gitlab.com> Date: Tue, 26 Oct 2021 22:27:33 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B9=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- idioto.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 idioto.py diff --git a/idioto.py b/idioto.py new file mode 100644 index 0000000..4eb1dc9 --- /dev/null +++ b/idioto.py @@ -0,0 +1,26 @@ +import requests +from bs4 import BeautifulSoup # pip install bs4, pip install lxml +import re +import os + + + +url = 'ссылка для идиота' +response = requests.get(url) +soup = BeautifulSoup(response.text, 'lxml') + +def string_cleanup(x, notwanted): + for item in notwanted: + x = re.sub(item, '', x) + return x + +lol = (soup.get_text()) + +lol = lol.split() + +lol = lol[0:3] + +print(*lol) + + +os.system("notify-send 'ОЛО!' '" + str(lol) + "'")