From 0c456117a06072c068b4deca8c2ebabe5aa195e1 Mon Sep 17 00:00:00 2001 From: iamtodor Date: Wed, 15 Dec 2021 10:48:26 +0100 Subject: [PATCH 1/5] add .gitignore --- .gitignore | 4 ++++ configexample.ini => config.ini | 0 2 files changed, 4 insertions(+) create mode 100644 .gitignore rename configexample.ini => config.ini (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2dd833 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.idea +env +venv +__pycache__/ \ No newline at end of file diff --git a/configexample.ini b/config.ini similarity index 100% rename from configexample.ini rename to config.ini From 9d793b54ee8c1042e572ee1f2235f940b29c22f9 Mon Sep 17 00:00:00 2001 From: iamtodor Date: Wed, 15 Dec 2021 10:48:39 +0100 Subject: [PATCH 2/5] rename config.ini --- config.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.ini b/config.ini index c26adc8..e879c6d 100644 --- a/config.ini +++ b/config.ini @@ -1,2 +1,2 @@ [ID] -telegram=0 +telegram=5038841584:AAEUR-0bYkOU93SMjEf1TKWavraRMse7PVk From 35dc4f5e76c055d5b7e2a53897588a26124451ed Mon Sep 17 00:00:00 2001 From: iamtodor Date: Wed, 15 Dec 2021 10:49:53 +0100 Subject: [PATCH 3/5] add instruction how to add your bot and requests lib as it is required --- README.md | 10 ++++++---- requirement.txt | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1a17cb2..6b3b3db 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,10 @@ https://telegram.me/dividendquerybot Read stock ticker symbol and queries for dividend data ### Dependencies -BeautifulSoup4 +* BeautifulSoup4 +* python-telegram-bot +* cachetools +* requests -python-telegram-bot - -cachetools \ No newline at end of file +### How to add your bot +https://telegra.ph/Awesome-Telegram-Bot-11-11 \ No newline at end of file diff --git a/requirement.txt b/requirement.txt index 0ba3d66..1312e01 100644 --- a/requirement.txt +++ b/requirement.txt @@ -1,3 +1,4 @@ -python-telegram-bot==10.1.0 -beautifulsoup4==4.6.0 -cachetools==3.1.1 +python-telegram-bot==13.9 +beautifulsoup4==4.10.0 +cachetools==4.2.2 +requests==2.26.0 \ No newline at end of file From 937bcacb44a11a8460a95d8d29ee916d7310d48b Mon Sep 17 00:00:00 2001 From: iamtodor Date: Wed, 15 Dec 2021 10:50:22 +0100 Subject: [PATCH 4/5] rename tid to token_id in case to be more explicit --- dividendbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dividendbot.py b/dividendbot.py index 669ae2d..34b8af6 100755 --- a/dividendbot.py +++ b/dividendbot.py @@ -17,12 +17,12 @@ def main(): #read config file config = configparser.ConfigParser() config.read('config.ini') - tid = config['ID']['telegram'] + token_id = config['ID']['telegram'] """Run the bot.""" global update_id # Telegram Bot Authorization Token - bot = telegram.Bot(tid) + bot = telegram.Bot(token_id) # get the first pending update_id, this is so we can skip over it in case # we get an "Unauthorized" exception. From afd4b3f64b6c5e4f64b0f57e11a29eec95a0c685 Mon Sep 17 00:00:00 2001 From: iamtodor Date: Wed, 15 Dec 2021 10:51:07 +0100 Subject: [PATCH 5/5] remove token id --- config.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.ini b/config.ini index e879c6d..c26adc8 100644 --- a/config.ini +++ b/config.ini @@ -1,2 +1,2 @@ [ID] -telegram=5038841584:AAEUR-0bYkOU93SMjEf1TKWavraRMse7PVk +telegram=0