This is a script that scrape assignments which haven't been submitted, and notify if deadline is close.
It requires these libraries.
- beautifulsoup4
- lxml
- pytz
- requests
conda install beautifulsoup4 lxml pytz requests
pip install beautifulsoup4 lxml pytz requests
pipenv install
- First, execute these commands.
pip install beautifulsoup4 lxml pytz requests -t ./packages
zip -r function.zip ./packeages
zip function.zip lambda-function.py scraping.py
- Second, upload to AWS Lambda.
First, Create settings.json
in a directory which contains scraping.py
.
Scond, Write ID in first row and password as follows.
{
"base":{
"user":"1234567890123",
"pass":"password",
"criteria_hours":168
},
"line":{
"is_enabled":false,
"token":"line-token-from-line-notify"
},
"slack":{
"is_enabled":false,
"token":"slack-token-from-custom-integration"
}
}