Skip to content

Commit 1640380

Browse files
committed
v1.0
1 parent bc7ccf7 commit 1640380

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ This script executes 2 actions:
1313

1414
## Usage:
1515

16-
Environment Variables:
16+
Set environment variables:
1717

1818
- Set IG_USERNAME to username account you want to monitor. Example: ladygaga
1919
- Set WEBHOOK_URL to Discord account webhook url. To know how, just Google: "how to create webhook discord".
20-
- Set TIME_INTERVAL to the time in seconds in between each check for a new post. Example: 1.5, 600 (default=600)
20+
- Set TIME_INTERVAL to the time in seconds in between each check for a new post. Example: 1.5, 600 (default=600 = 10 minutes)
21+
22+
How to setup enviroment variables:
23+
Help: https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-environment-variables-in-linux/
2124

2225
## Collaborations:
2326

instagram-discord.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
import time
2323

2424
# USAGE:
25-
# Environment Variables
25+
# Set Environment Variables:
2626
# Set IG_USERNAME to username account you want to monitor. Example - ladygaga
2727
# Set WEBHOOK_URL to Discord account webhook url. To know how, just Google: "how to create webhook discord".
2828
# Set TIME_INTERVAL to the time in seconds in between each check for a new post. Example - 1.5, 600 (default=600)
29+
# Help: https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-environment-variables-in-linux/
2930

3031
INSTAGRAM_USERNAME = os.environ.get('IG_USERNAME')
3132

@@ -109,6 +110,6 @@ def main():
109110
if os.environ.get('IG_USERNAME') != None and os.environ.get('WEBHOOK_URL') != None:
110111
while True:
111112
main()
112-
time.sleep(float(os.environ.get('TIME_INTERVAL') or 600))
113+
time.sleep(float(os.environ.get('TIME_INTERVAL') or 600)) # 600 = 10 minutes
113114
else:
114115
print('Please configure environment variables properly!')

0 commit comments

Comments
 (0)