Skip to content

Commit

Permalink
I SWEAR THIS IS THE LAST COMMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
minhadona committed May 18, 2022
1 parent d8246df commit 0adc2f1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 29 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<br>
<br>
Expand Down
28 changes: 3 additions & 25 deletions b4s.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -100,31 +100,9 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<password><lmaboymnygovzxsm><username><mg88zollverein@gmail.com>\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:root: this forwards the whole available table; if you just want a sample, reassign the variable <df> to <df.head(n)> 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",
Expand Down
4 changes: 2 additions & 2 deletions b4s.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -90,7 +90,7 @@ def connect_and_send_email(plain_text, html_text):



# In[9]:
# In[ ]:


#==============================================
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0adc2f1

Please sign in to comment.