Refactor variables like INSTAGRAM_USERNAME and WEBHOOK_URL to use environment variables instead of being hardcoded. This would make it easier to deploy in the cloud.
I used the time library to make it so that the code runs every set interval. This can be configured using the TIME_INTERVAL environment variable. The interval defaults to 600 which is 10 minutes.
I refactored the code to use an environment variable instead of a file to store the last image id. This can help when using AWS Lambda or similar platforms to deploy the code.
I hope you find these changes appropriate.
Thanks for this wonderful program :D
I made three major changes to the code.
INSTAGRAM_USERNAME
andWEBHOOK_URL
to use environment variables instead of being hardcoded. This would make it easier to deploy in the cloud.time
library to make it so that the code runs every set interval. This can be configured using theTIME_INTERVAL
environment variable. The interval defaults to 600 which is 10 minutes.I hope you find these changes appropriate. Thanks for this wonderful program :D