aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-08 02:47:43 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-08 02:47:43 +0530
commit994399bbfd72dd09db9bcf738ecdd245376a7a4e (patch)
tree3effb6edf8725b8cad616d5ea9b1954dda43794a
parented53da2e6a982cef66c429ae1775cfdebb64f356 (diff)
downloadcrypto-alert-994399bbfd72dd09db9bcf738ecdd245376a7a4e.tar.gz
crypto-alert-994399bbfd72dd09db9bcf738ecdd245376a7a4e.tar.bz2
crypto-alert-994399bbfd72dd09db9bcf738ecdd245376a7a4e.zip
secured my emails and password
-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!"