diff --git a/.gitignore b/.gitignore index be6b6be..3873c3a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .DS_Store _tmp env -__pycache__ \ No newline at end of file +venv +__pycache__ diff --git a/27_send_sms.py b/27_send_sms.py new file mode 100644 index 0000000..0ad1d58 --- /dev/null +++ b/27_send_sms.py @@ -0,0 +1,12 @@ +import requests + +message = raw_input('Enter a Message: ') +number = raw_input('Enter the phone number: ') + + +payload = {'number': number, 'message': message} +r = requests.post("http://textbelt.com/text", data=payload) +if r.json()['success']: + print('Success!') +else: + print('Error!') diff --git a/readme.md b/readme.md index 2e00620..19551da 100644 --- a/readme.md +++ b/readme.md @@ -25,4 +25,5 @@ 1. **23_flask_session_test.py**: Just a simple app to see if the sessions are working 1. **24_sql2csv.py**: SQL to CSV. 1. **25_ip2geolocation.py**: Given a CSV file with an ip address (see sample - *25_sample_csv.csv*), return the geolocation based on the ip. -1. **26_stock_scraper.py**: Scrape the S&P 500 Companies list from Wikipedia, then output he data. +1. **26_stock_scraper.py**: Scrape the S&P 500 Companies list from Wikipedia, then output the data. +1. **27_send_sms.py**: Send SMS message via [TextBelt](http://textbelt.com/) diff --git a/requirements.txt b/requirements.txt index d1a3d68..baafbf3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ itsdangerous==0.24 lxml==3.4.4 numpy==1.9.2 requests==2.7.0 +wheel==0.24.0