summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2024-05-01 09:51:44 +0200
committerAndré Glüpker <git@wgmd.de>2024-05-01 09:51:44 +0200
commit664ceffea80fe3802b69a36e38bf924e8edf5fe3 (patch)
tree514ed77f36b6e1c5898dfb87533b0b6a39900b4b
parent93b5b36903dc03ce8cb32c7da9f31980abe1e605 (diff)
downloadrss-feeds-664ceffea80fe3802b69a36e38bf924e8edf5fe3.tar.gz
rss-feeds-664ceffea80fe3802b69a36e38bf924e8edf5fe3.tar.bz2
rss-feeds-664ceffea80fe3802b69a36e38bf924e8edf5fe3.zip
Remove netto
-rwxr-xr-xnetto.py44
-rwxr-xr-xwebapp.py6
2 files changed, 0 insertions, 50 deletions
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()
diff --git a/webapp.py b/webapp.py
index 84ded9a..3c213e4 100755
--- a/webapp.py
+++ b/webapp.py
@@ -15,7 +15,6 @@ from concurrent.futures import ThreadPoolExecutor
from flask import Flask, Response
# from telegram import telegram
-from netto import netto
from rss import buildRSS
from twitter import twitter
from zdf import zdf
@@ -60,11 +59,6 @@ def feedTwitter(account):
# return response
-@app.route("/netto/<market>")
-def feedNetto(market):
- return rssResponse(netto(market))
-
-
@app.route("/zdf/<path:feed>")
def filterZDFFeed(feed):
return rssResponse(zdf(feed))