Skip to content

Commit 9159eac

Browse files
authored
Merge pull request #5 from gioxx/dev
Cambio probabilità della selezione random del tag
2 parents 9f1eef3 + cb3e66c commit 9159eac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can set two optional parameters through environment variables:
2525
- `MAX_REDIRECT_CHAIN_DEPTH`: if `CHECK_FOR_REDIRECT_CHAINS` is enabled, it will limit the number of redirect levels the bot will try to go through. It default to 2, and it should be kept at a low number to avoid wasting time going through endless redirect chains a user might provide.
2626
- `IGNORE_USERS`: a comma-separated list of usernames (starting with the "@" character) and numeric user IDs whose messages won't be acted upon by the bot, even if they contain matching Amazon links. A valid list would be `"@Yourusername,12345678,@IgnoreMeAsWell123"`. Numeric user IDs are useful for users who do not have Telegram user names defined. You can get yours by contacting [userinfobot](https://t.me/useridinfobot).
2727
- `CHANNEL_NAME`: the name of a channel to relay affiliated links to. You must first add your bot as an admin for that channel. Feature added by adapting [@nsniteshsahni's commit](https://github.com/nsniteshsahni/telegram-bot-amazon/commit/b1b814083c83089f44293adbd622ac87be8f19e8)
28-
- `SUPPORT_DEV`: if you would like to support the development of this bot, you can set this variable to `true`, the script will occasionally (the probability is 35%) insert a sponsored link that uses an alternate tag, the developer's tag (default: `true`).
28+
- `SUPPORT_DEV`: if you would like to support the development of this bot, you can set this variable to `true`, the script will occasionally (the probability is 20%) insert a sponsored link that uses an alternate tag, the developer's tag (default: `true`).
2929

3030
| String | Replacement |
3131
| -------------------- | -------------------------------------------------------------------------------------------------------------------------- |

amznDocker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
USER_IDS_TO_IGNORE = [int(user_id) for user_id in os.environ.get('IGNORE_USERS', '').split(',') if user_id.isdigit()]
4040

4141
# Check
42-
CODE_VERSION = '1.1.0'
42+
CODE_VERSION = '1.1.1'
4343

4444
def get_amazon_tag(original_tag):
4545
"""
@@ -57,7 +57,7 @@ def get_amazon_tag(original_tag):
5757
return original_tag
5858

5959
# Probability of using an alternate tag
60-
if random.random() < 0.35: # 35% probability
60+
if random.random() < 0.20: # 20% probability
6161
# List of alternate tags to use
6262
alternate_tags = [
6363
"gioxx-21"

0 commit comments

Comments
 (0)