Service to email recipients about potential new free agents on the waiver wire (ESPN league)
ssh -i ~/.ssh/fantasypager.pem ubuntu@ec2-34-201-127-136.compute-1.amazonaws.com
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
sudo nano ~/.bashrc
alias python="/home/ubuntu/miniconda3/bin/python"
source ~/.bashrc
cd /tmp
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get -f install
sudo apt install unzip
wget https://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
pip install bs4 selenium simple-crypt
scp -i ~/.ssh/fantasypager.pem ~/Documents/fantasy_pager.py ubuntu@ec2-34-201-127-136.compute-1.amazonaws.com:~
scp -i ~/.ssh/fantasypager.pem ~/fantasea.txt ubuntu@ec2-34-201-127-136.compute-1.amazonaws.com:~
sudo nano /etc/crontab
*/60 * * * * ubuntu /home/ubuntu/miniconda3/bin/python fantasy_pager.py
wget https://chromedriver.storage.googleapis.com/2.33/chromedriver_mac64.zip
sudo apt install aptitude
sudo aptitude install postfix
- select "Local Only" during setup, accept defaults
import os
from simplecrypt import encrypt, decrypt
passphrase = 'fantasea'
filename = 'fantasea.txt'
password = 'your_password'
def write_encrypted(passphrase, filename, plaintext):
with open(filename, 'wb') as output:
ciphertext = encrypt(passphrase, plaintext)
output.write(ciphertext)
data = write_encrypted(passphrase, filename, password)
- transactions_url: http://games.espn.com/ffl/recentactivity?leagueId=973912
- transactions_url_day: http://games.espn.com/ffl/recentactivity?leagueId=973912&seasonId=2017&activityType=-1&startDate=20180906&endDate=20180907&teamId=-1&tranType=-2
- transactions_url_days: http://games.espn.com/ffl/recentactivity?leagueId=973912&seasonId=2017&activityType=-1&startDate=20180904&teamId=-1&tranType=-2
- search_url: http://games.espn.com/ffl/freeagency?leagueId=973912&teamId=1&seasonId=2017