Skip to content
This repository has been archived by the owner. It is now read-only.
Telegram bot for looking for news. Has scheduling and preferences
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Update Feb 2, 2018 Updated version and database ^^ Jun 8, 2017


Telegram bot for looking for news. Has scheduling and preferences

TRY IT RIGHT HERE: @GooglNews_bot

Don't forget to rate: Rate this bot 🌟


  1. First, you have to create a table in MySQL like this:
Field Type Null Key Default Extra
chat_id int(15) NO PRI NULL
lang char(2) YES NULL
preferences varchar(1000) YES NULL
diff_time varchar(50) YES NULL
is_time varchar(5) YES NULL
programation varchar(150) YES NULL
is_prog varchar(5) YES NULL
is_pref varchar(5) YES NULL
msg_id int(20) YES NULL
max_results int(3) YES NULL
next_prog varchar(150) YES NULL
usr_name varchar(150) YES NULL
last_time varchar(50) YES NULL



   -> usr_name VARCHAR(150),

   -> chat_id INT(15) NOT NULL PRIMARY KEY,

   -> lang CHAR(2),

   -> diff_time VARCHAR(50),

   -> preferences VARCHAR(10000),

   -> programation VARCHAR(150),

   -> next_prog VARCHAR(150),

   -> msg_id INT(20),

   -> max_results INT(3),

   -> is_time VARCHAR(5),

   -> is_prog VARCHAR(5),

   -> is_pref VARCHAR(5),
   -> last_time VARCHAR(50)

  1. Then, ask BotFather for a TOKEN unique for your bot.
  2. Save that token into a file called TOKEN.txt.
  3. Go to this Google page and ask for your API-KEY. Save it in API-KEY_geo.txt (don't forget to activate your API).
  4. Go to this another Google page and ask for your API-KEY. Save it in API-KEY.txt (don't forget to activate your API).

It's done, you have finished your initial set-up


Install this packages with pip (using Python 3):

  • pip install PyMySQL
  • pip install python-telegram-bot
  • pip install py-GSearch-API
  • pip install bs4
  • pip install ujson
  • pip install unidecode
  • pip install URLEncoder
  • pip install requests
  • pip install html
  • pip install contextlib

When finished, everything is now set-up.


Just execute python and the bot will start 😄


The next message has to be included in every copy of this program, modified or not

NewsBot (Telegram) -- A simple bot for getting news from Google
Copyright (C) 2017  Javinator9889

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <>.

For contacting, go to "" and type your message.
Also you can go to my GitHub profile and send me direct message.
You can’t perform that action at this time.