Closed ziomauro1229 closed 1 year ago
Hi, can you give me some more information? I'm not sure how I can help you with only the information that you gave me.
Are you trying to set up the Telegram bot?
Does the bot not respond on Telegram, or does it not respond in general, not even in the console?
Does the bot at least successfully start and print 120 seconds to next poll.
every 2 minutes?
Did you add some query before starting?
Remember that if no one is posting new announcements on Subito, of course the bot will not say anything! Try to use a query where people post new announcements very often, for example the one in the README:
python3 subito-searcher.py --add Auto --url https://www.subito.it/annunci-italia/vendita/usato/?q=auto
By the way, thank you, I'll fix the "pyhton" typo.
I tried to set up the bot as explained in the guide. I entered the token and the name of the channel. I checked in the file that the credentials were saved correctly. I added a sample query and started the daemon. On telegram I have no message.
Right, but are you getting output in the console where you started the daemon?
Same problem here. telegram_api_credentials has the correct values but I don't get any message in the channel
solved. The ChatId was wrong. To get the correct chatid try to get it from here: https://api.telegram.org/bot[bot_token]/GetUpdates
Here you find all the chats that the bot is added to. Use the chat name or the chat id (-1234456) to send messages
read here for more informations:
https://core.telegram.org/bots/api
to test the bot you can build a test request and use the browser to see if it works
https://api.telegram.org/bot[bot_token_code]/sendMessage?chat_id=[chat_id_code]text=prova
solved. The ChatId was wrong. To get the correct chatid try to get it from here: https://api.telegram.org/bot[bot_token]/GetUpdates
Here you find all the chats that the bot is added to. Use the chat name or the chat id (-1234456) to send messages
read here for more informations:
https://core.telegram.org/bots/api
to test the bot you can build a test request and use the browser to see if it works
https://api.telegram.org/bot[bot_token_code]/sendMessage?chat_id=[chat_id_code]text=prova
Thanks! but when I tested with a request using a browser I received: {"ok":false,"error_code":400,"description":"Bad Request: message text is empty"} So I understand that there was a little error in the url.... before text insert & : (https://api.telegram.org/bot[bot_token_code]/sendMessage?chat_id=[chat_id_code]&text=prova)
solved. The ChatId was wrong. To get the correct chatid try to get it from here: https://api.telegram.org/bot[bot_token]/GetUpdates Here you find all the chats that the bot is added to. Use the chat name or the chat id (-1234456) to send messages read here for more informations: https://core.telegram.org/bots/api to test the bot you can build a test request and use the browser to see if it works https://api.telegram.org/bot[bot_token_code]/sendMessage?chat_id=[chat_id_code]text=prova
Thanks! but when I tested with a request using a browser I received: {"ok":false,"error_code":400,"description":"Bad Request: message text is empty"} So I understand that there was a little error in the url.... before text insert & : (https://api.telegram.org/bot[bot_token_code]/sendMessage?chat_id=[chat_id_code]&text=prova)
Yes, sorry. My mistake. But I understand that you solved the issue!
I tried several times to setup the bot, but the bot never responds. Also in the description, in the part that explains how to add the bot, in the command part, it says pyhton instead of python