A very personal project for getting trends of japanese vinyl market It includes a function that records newly registered Vinyl information in Amazon Japan based on a specific time every day in the DB and sends it via SMS.
- Clone the repository
- Install the dependencies (if you wanna use in local environment)
- create a
config.dev.json
file in theserverless
directory - Run
git clone git@github.com:${YOURS}/amazon-japan-vinyl-alert.git
cd amazon-japan-vinyl-alert
pip install -r requirements.txt
vi serverless/config.dev.json
# ... write down your config.dev.json
python run.py
{
"VINYL_MONGO_HOST":"...",
"VINYL_MONGO_PORT":"... default: 27017",
"VINYL_MONGO_USER":"...",
"VINYL_MONGO_PASSWORD":"...",
"VINYL_MONGO_COLLECTION":"amazon_japan_lp",
"VINYL_IFTTT_WEBHOOK_KEY":"...",
"VINYL_LAMBDA_LAYER":"ARN OF YOUR LAMBDA LAYER"
}
- Clone the repository
- Install the dependencies
- Check your AWS Key
- Add layer on your AWS console and check your
arn
or layer - create a
config.dev.json
file in theserverless
directory - Deploy
npm -i -g serverless
echo "export AWS_ACCESS_KEY_ID=..." >> ~/.bashrc # or ~/.zshrc
echo "export AWS_SECRET_ACCESS_KEY=..." >> ~/.bashrc # or ~/.zshrc
source ~/.bashrc # or ~/.zshrc
git clone https://github.com/dev4hobby/amazon-japan-vinyl-alert.git
cd amazon-japan-vinyl-alert
mkdir python
pip install -r ./requirements.txt -t ./python
zip -r ./python.zip ./python
# Add layer and upload your python.zip
vi serverless/config.dev.json
# ... write down your config.dev.json
sls deploy
sls invoke local --function get_vinyl_list
sls invoke local --function crawl_vinyl_from_amazon_japan