aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--main.py10
2 files changed, 9 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index f7275bb..da09548 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
venv/
+email.txt
+pass.txt
diff --git a/main.py b/main.py
index bc321a6..d95796d 100644
--- a/main.py
+++ b/main.py
@@ -2,6 +2,7 @@ import requests
import smtplib
import json
import time
+import sys
import schedule
def price():
@@ -21,9 +22,12 @@ def price():
return btc_price
def email(btc):
- sender_email = "your mail address"
- sender_password = "password"
- receiver_email = "receiving email"
+ # change the email address or create a email.txt file and put your email there
+ sender_email = open('email.txt', 'r')
+ # do the same with password
+ sender_password = open('pass.txt', 'r')
+ # change your email to something else the alert will be send to there
+ receiver_email = "biswa@dmc.chat"
subject = "BTC Price Alert"
body = f"The current price of BTC is {btc} USD. Time to make a move!"