From 0adc2f1f8321882f2367d90d9009c82825ddf5a8 Mon Sep 17 00:00:00 2001 From: gabriella Date: Wed, 18 May 2022 20:31:39 -0300 Subject: [PATCH] I SWEAR THIS IS THE LAST COMMIT --- README.md | 4 +++- b4s.ipynb | 28 +++------------------------- b4s.py | 4 ++-- requirements.txt | 1 - 4 files changed, 8 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 711c061..6e5c891 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,9 @@ Set a cron job to run this script and receive the winners list by e-mail :) ## You'll need - a gmail account - recent version of python installed -- basic knowledge of cron (or app deploy on heroku, it's up to you) +- clone this repository, browse into it +- execute `pip install -r requirements.txt` +- basic (VERY BASIC) knowledge of cron (or app deploy on heroku, it's up to you) - optional

diff --git a/b4s.ipynb b/b4s.ipynb index 5e1c9fe..13df81b 100644 --- a/b4s.ipynb +++ b/b4s.ipynb @@ -64,7 +64,7 @@ "port = 465\n", "smtp_server = \"smtp.gmail.com\"\n", "sender_email = \"ebit_webscraping@minhadona.com\" # Enter your address\n", - "receiver_email = \"mg88zollverein@gmail.com\" # Enter receiver address\n", + "receiver_email = os.environ['EMAIL_USERNAME'] # Enter receiver address\n", "password = os.environ['EMAIL_PASSWORD']\n", "email_username = os.environ['EMAIL_USERNAME']\n", "message = MIMEMultipart(\"alternative\")\n", @@ -100,31 +100,9 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:root: this forwards the whole available table; if you just want a sample, reassign the variable to by n meaning the number of lines you want on your output table\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "!email successfully sent!\n" - ] - } - ], + "outputs": [], "source": [ "#==============================================\n", "#---- html tabulating table + send call -------\n", diff --git a/b4s.py b/b4s.py index 0dc8ea3..a5abef3 100644 --- a/b4s.py +++ b/b4s.py @@ -56,7 +56,7 @@ port = 465 smtp_server = "smtp.gmail.com" sender_email = "ebit_webscraping@minhadona.com" # Enter your address -receiver_email = "mg88zollverein@gmail.com" # Enter receiver address +receiver_email = os.environ['EMAIL_USERNAME'] # Enter receiver address password = os.environ['EMAIL_PASSWORD'] email_username = os.environ['EMAIL_USERNAME'] message = MIMEMultipart("alternative") @@ -90,7 +90,7 @@ def connect_and_send_email(plain_text, html_text): -# In[9]: +# In[ ]: #============================================== diff --git a/requirements.txt b/requirements.txt index aa73936..5425546 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,6 @@ oauthlib==3.1.1 pandas==1.3.0 pandocfilters==1.5.0 parso==0.8.3 -pexpect==4.8.0 pretty-html-table==0.9.16 requests==2.26.0 requests-oauthlib==1.3.0