summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnetto.py13
-rwxr-xr-xwebapp.py18
2 files changed, 16 insertions, 15 deletions
diff --git a/netto.py b/netto.py
index 3f1beb2..dde8d32 100755
--- a/netto.py
+++ b/netto.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python3
-from urllib.request import urlopen, Request
+import sys
from datetime import datetime
+from urllib.request import Request, urlopen
+
from bs4 import BeautifulSoup
-import sys
def netto(store_id):
@@ -21,11 +22,11 @@ def netto(store_id):
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/"
+ "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: [
+ "description": "PDF der neuen Netto Angebote für den Laden um die Ecke.",
+ "content": [
{
"title": "Angebote für " + title,
"url": url,
diff --git a/webapp.py b/webapp.py
index 0e65573..84ded9a 100755
--- a/webapp.py
+++ b/webapp.py
@@ -1,23 +1,23 @@
#!/usr/bin/env python3
# from flask import Flask, redirect, render_template, request, session, url_for
-from flask import Flask, Response
-
-# from wsgiref.util import setup_testing_defaults
-from collections import OrderedDict
-from concurrent.futures import ThreadPoolExecutor
-
+import datetime
import json
+import logging
import os
import re
import sys
-import time, datetime
-import logging
+import time
+# from wsgiref.util import setup_testing_defaults
+from collections import OrderedDict
+from concurrent.futures import ThreadPoolExecutor
+
+from flask import Flask, Response
-from twitter import twitter
# from telegram import telegram
from netto import netto
from rss import buildRSS
+from twitter import twitter
from zdf import zdf
app = Flask(__name__)