Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pybites/100DaysOfCode
Browse files Browse the repository at this point in the history
  • Loading branch information
bbelderbos committed Sep 17, 2018
2 parents e6d9898 + 34e8796 commit 4ccbfe4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions 011/data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This is the text that will be emailed out.
The main emailer script should point to this file (or another data file of your choice).
2 changes: 1 addition & 1 deletion 011/generic_emailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from email_list import EMAILS

DATA_FILE = 'scraped_data_file'
DATA_FILE = 'data.txt'
from_addr = 'your_email@gmail.com'
to_addr = 'some_recipient@gmail.com'
bcc = EMAILS
Expand Down
8 changes: 4 additions & 4 deletions 051/requests_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import requests

#This URL will be the URL that your login form points to with the "action" tag.
POST-LOGIN-URL = 'https://my.freecycle.org/login'
POST_LOGIN_URL = 'https://my.freecycle.org/login'

#This URL is the page you actually want to pull down with requests.
REQUEST-URL = 'https://my.freecycle.org/home/posts'
REQUEST_URL = 'https://my.freecycle.org/home/posts'


#username-input-name is the "name" tag associated with the username input field of the login form.
Expand All @@ -19,6 +19,6 @@
}

with requests.Session() as session:
post = session.post(POST-LOGIN-URL, data=payload)
r = session.get(REQUEST-URL)
post = session.post(POST_LOGIN_URL, data=payload)
r = session.get(REQUEST_URL)
print(r.text) #or whatever else you want to do with the request data!
4 changes: 2 additions & 2 deletions 094/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
asn1crypto==0.22.0
bcrypt==3.1.3
cffi==1.10.0
cryptography==1.9
cryptography==2.3
idna==2.5
paramiko==2.2.1
paramiko==2.2.3
pyasn1==0.2.3
pycparser==2.17
PyNaCl==1.1.2
Expand Down

0 comments on commit 4ccbfe4

Please sign in to comment.