diff --git a/README.html b/README.html index 7bb6fe2..bc0b10e 100644 --- a/README.html +++ b/README.html @@ -55,30 +55,43 @@ -
- github/license - github/last-commit - github/issues_open - github/stars +
+ + GitHub/NapoII/netcup_egg_tracker + + downloads/total + github/repo-size + github/license + github/last-commit + github/issues_open + github/stars + discord

netcup_egg_tracker

Dieses Python-Skript sucht nach versteckten "Eiern" auf der Website www.netcup.de und listet die Sonderangebote in Textdateien auf.

+
+

+ Besuchen Sie napo-ii.de für den Live-Tracker mit den aktuellen Eggs vom Netcup-Event. +

+
+

📝 Table of Contents

🎥 Demo / Working

- Img von folder mit angeboten + Img von folder mit angeboten

💻 Install

-
git clone https://github.com/NSG22/netcup_egg_tracker
+        
git clone https://github.com/NapoII/netcup_egg_tracker
 pip install -r requirements.txt

💭 How it works

@@ -96,10 +109,17 @@

💭 How it works

  • Stellen Sie sicher, dass das Skript über die erforderlichen Berechtigungen zum Schreiben von Dateien im aktuellen Verzeichnis verfügt.
  • +

    ☕ Buy me a coffee

    +

    Feel free to show your appreciation by treating me to a virtual coffee. Your support means a lot and keeps the creative coding vibes going! 🚀

    + Buy Me a Coffee at ko-fi.com +

    📚 LICENSE

    GNU GENERAL PUBLIC LICENSE Version 3

    netcup_egg_tracker was created on 31.March.2024 by NapoII

    +

    + Github Stats +

    diff --git a/README.md b/README.md index 0a3801c..63a8b90 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,27 @@ +[![github/NapoII/netcup_egg_tracker](https://raw.githubusercontent.com/NapoII/netcup_egg_tracker/main/README_img/Readme_top.png)](https://github.com/NapoII/netcup_egg_tracker) +[![downloads/total](https://img.shields.io/github/downloads/NapoII/netcup_egg_tracker/total)](https://github.com/NapoII/netcup_egg_tracker/archive/refs/heads/main.zip) [![github/repo-size](https://img.shields.io/github/repo-size/NapoII/netcup_egg_tracker)](https://github.com/NapoII/netcup_egg_tracker/archive/refs/heads/main.zip) [![github/license](https://img.shields.io/github/license/NapoII/netcup_egg_tracker)](https://github.com/NapoII/netcup_egg_tracker/blob/main/LICENSE) [![github/last-commit](https://img.shields.io/github/downloads/NapoII/netcup_egg_tracker/total)](https://img.shields.io/github/issues/NapoII/netcup_egg_tracker?style=plastic) [![github/issues_open](https://img.shields.io/github/issues/NapoII/netcup_egg_tracker?style=plastic)](https://img.shields.io/github/issues-raw/NapoII/netcup_egg_tracker) [![github/stars](https://img.shields.io/github/stars/NapoII/netcup_egg_tracker?style=social)](https://github.com/NapoII/netcup_egg_tracker/stargazers) [![discord](https://img.shields.io/discord/190307701169979393)](https://discord.gg/knTKtKVfnr) + 🐰🥚 Willkommen zur großen Oster-Eiersuche auf der Sonderangebotsseite von www.netcup.de! Dieses spezielle Python-Skript durchstöbert die Seite nach versteckten Osterangeboten und speichert sie in Textdateien. 🐣🌼 Automatische Aktualisierung alle 2 Minuten, damit Sie keine versteckten Schätze verpassen! 🔄🔎 +Besuchen Sie [napo-ii.de](http://napo-ii.de/) für den Live-Tracker mit den aktuellen Eggs vom Netcup-Event. + + ## 📝 Table of Contents + [Demo / Working](#demo) -+ [Install](#install) -+ [How it works](#useage) -+ [LICENSE](#license) ++ [Install](#usage) ++ [How it works](#Use) ++ [Buy me a coffee](#coffee) ++ [LICENSE](#LICENSE) ## 🎥 Demo / Working ![BSP](https://raw.githubusercontent.com/NSG22/netcup_egg_tracker/main/README_img/demo.png) -## 💻 Install + +## 💻 Install ```cmd -git clone https://github.com/NSG22/netcup_egg_tracker.git +git clone https://github.com/NapoII/netcup_egg_tracker pip install -r requirements.txt ``` -## 💭 How it works +## 💭 How it works start netcup_egg_tracker.py directly from the folder or run in cmd: ```cmd @@ -29,8 +37,20 @@ python netcup_egg_tracker.py - Die Dateinamen enthalten den Preis und die Produktinformationen, um die Angebote leicht identifizieren zu können. - Stellen Sie sicher, dass das Skript über die erforderlichen Berechtigungen zum Schreiben von Dateien im aktuellen Verzeichnis verfügt. -## 📚 LICENSE +## ☕ Buy me a coffee + +Feel free to show your appreciation by treating me to a virtual coffee. Your support means a lot and keeps the creative coding vibes going! 🚀 + +Buy Me a Coffee at ko-fi.com + +## 📚 LICENSE [GNU GENERAL PUBLIC LICENSE Version 3](LICENSE) [netcup_egg_tracker](netcup_egg_tracker) was created on 31.March.2024 by [NapoII](https://github.com/NapoII) + + + +

    +Github Stats +

    diff --git a/README_img/Readme_top.png b/README_img/Readme_top.png index 4c81ab2..1291431 100644 Binary files a/README_img/Readme_top.png and b/README_img/Readme_top.png differ diff --git a/netcup_egg_tracker/netcup_egg_tracker.py b/netcup_egg_tracker/netcup_egg_tracker.py index e02472f..f5a6cde 100644 --- a/netcup_egg_tracker/netcup_egg_tracker.py +++ b/netcup_egg_tracker/netcup_egg_tracker.py @@ -35,12 +35,14 @@ def get_price_formatted(price): def main(): current_year = datetime.now().year # Aktuelles Jahr abrufen folder_path = f"eggs_{current_year}" # Ordnername mit aktuellem Jahr erstellen + if not os.path.exists(folder_path): os.makedirs(folder_path) while True: for r in refs: + try: resp = requests.post("https://www.netcup.de/api/eggs", data={"requrl": r}) response_text = json.loads(resp.text)["eggs"] @@ -50,7 +52,7 @@ def main(): print(f"Kein Angebot gefunden für {r}") print(f"{'-' * 10}") continue - + egg = response_text[0] if egg['title'][-1] == " ": egg['title'] = egg['title'][:-1] @@ -63,7 +65,7 @@ def main(): full_folder_path = os.path.join(folder_path, sub_folder) if not os.path.exists(full_folder_path): os.makedirs(full_folder_path) - + path = os.path.join(full_folder_path, file_name) egg['original_url'] = f"https://www.netcup.de/bestellen/produkt.php?produkt={egg['product_id']}&ref=230003&hiddenkey={egg['product_key']}" @@ -71,10 +73,8 @@ def main(): egg['found_unix_time'] = int(time.time()) # Hinzufügen der Unix-Zeit with open(path, "w") as file: json.dump(egg, file, indent=4) - - if os.path.exists(path):# nicht neu printen, falls schon vorhanden - continue - + + print(f"{'-' * 10}") print(f"{egg['title']}") print(f"{price}") @@ -82,11 +82,12 @@ def main(): print(f"{egg['found_url']}") # Ausgabe der gefundenen URL print(f"Found Unix Time: {egg['found_unix_time']}") # Ausgabe der gefundenen Unix-Zeit print(f"{'-' * 10}") + except Exception as e: - print(e) + pass print(f"\n\n Time Sleep - {2*60}") time.sleep(2 * 60) if __name__ == "__main__": - main() + main() \ No newline at end of file