Skip to content

Commit

Permalink
Fix and document minimum cooldown time option
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanC committed Mar 5, 2024
1 parent 44d3e54 commit 3763742
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ LOG_DISCORD_WEBHOOK_LEVEL=WARNING
USERS_ALL=Mxtive,spectatorindex,Breaking911
USERS_TOP=X,XData
USERS_MEDIA=archillect
COOLDOWN_MAX_TIME=60
COOLDOWN_MIN_TIME=60
COOLDOWN_MAX_TIME=300
X_CSRF_TOKEN=XXXXXXXX
X_AUTH_TOKEN=XXXXXXXX
X_BEARER_TOKEN=XXXXXXXX
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ An X account is required. It is recommended to use a throwaway account due to us
- `USERS_ALL`: Comma-separated list of [X](https://x.com/) usernames to monitor for all posts.
- `USERS_TOP`: Comma-separated list of [X](https://x.com/) usernames to monitor for top-level posts only.
- `USERS_MEDIA`: Comma-separated list of [X](https://x.com/) usernames to monitor for media posts only.
- `COOLDOWN_MAX_TIME`: Maximum randomized cooldown time between checking for new posts (default is 60).
- `COOLDOWN_MIN_TIME`: Minimum randomized cooldown time between checking for new posts (default is 60).
- `COOLDOWN_MAX_TIME`: Maximum randomized cooldown time between checking for new posts (default is 300).
- `X_CSRF_TOKEN`: CSRF Token obtained via request inspection on X.
- `X_AUTH_TOKEN`: Cookie Auth Token obtained via request inspection on X.
- `X_BEARER_TOKEN`: Authentication Bearer Token obtained via request inspection on X.
Expand All @@ -40,7 +41,8 @@ services:
USERS_ALL: Mxtive,spectatorindex,Breaking911
USERS_TOP: X,XData
USERS_MEDIA: archillect
COOLDOWN_MAX_TIME: 60
COOLDOWN_MIN_TIME: 60
COOLDOWN_MAX_TIME: 300
X_CSRF_TOKEN: XXXXXXXX
X_AUTH_TOKEN: XXXXXXXX
X_BEARER_TOKEN: XXXXXXXX
Expand Down
2 changes: 1 addition & 1 deletion bluebird.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def WatchPosts(

while True:
# Randomize cooldown to mimic natural behavior.
cooldownMin: int = int(environ.get("COOLDOWN_MAX_TIME", 60))
cooldownMin: int = int(environ.get("COOLDOWN_MIN_TIME", 60))
cooldownMax: int = int(environ.get("COOLDOWN_MAX_TIME", 300))

cooldown: int = randint(cooldownMin, cooldownMax)
Expand Down

0 comments on commit 3763742

Please sign in to comment.