From 664ceffea80fe3802b69a36e38bf924e8edf5fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Wed, 1 May 2024 09:51:44 +0200 Subject: Remove netto --- netto.py | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100755 netto.py (limited to 'netto.py') diff --git a/netto.py b/netto.py deleted file mode 100755 index dde8d32..0000000 --- a/netto.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python3 - -import sys -from datetime import datetime -from urllib.request import Request, urlopen - -from bs4 import BeautifulSoup - - -def netto(store_id): - url = "https://www.netto-online.de/ueber-netto/Online-Prospekte.chtm/" + str( - store_id - ) - res = urlopen(Request(url)) - soup = BeautifulSoup(res, features="html.parser") - - # messages = soup.find_all('div', attrs={'class': 'tgme_widget_message_wrap'}) - message = soup.find("a", attrs={"class": "flipbook_pdf_flipbook"}) - - url = message["href"].split("?")[0] - year = str(datetime.now().year) - title = url[url.find(year) : url.find(year) + 7] - - return { - "title": "Netto Angebote für " + store_id, - "url": "https://www.netto-online.de/ueber-netto/Online-Prospekte.chtm/" - + store_id, - "description": "PDF der neuen Netto Angebote für den Laden um die Ecke.", - "content": [ - { - "title": "Angebote für " + title, - "url": url, - "content": "Angebote für " + title + " finden sich unter " + url, - } - ], - } - - -def main(store_id=9110): - print(netto(store_id)) - - -if __name__ == "__main__": - main() -- cgit v1.2.3