This tool enables users to search Google through a custom search engine right from the command line. Written in Python, it tokenizes user queries, sends them to the Google Custom Search API, and then neatly displays the results.
- Ensure you have Python installed on your machine.
- Clone this repository:
git clone <repository-link>
- Install the required dependencies:
pip install nltk requests BeautifulSoup4
- Before running the script, make sure to fill in the
cx
(Programmable Search Engine ID) andapi_key
(Google API Key) variables in themain()
function. - Run the script:
python <script-name>.py
- Follow the on-screen prompts. Type in your query and press
Enter
. - To exit the tool, simply type
exit
.
- Tokenizing User Queries: Breaks down user's queries into individual words using the Natural Language Toolkit (NLTK).
- Google Custom Search Integration: Sends the tokenized queries to Google's Custom Search API.
- Beautiful Output: Parses and displays search results in a readable and user-friendly manner.
- Fadi Helal
This project is open-sourced. Feel free to use, modify, and distribute the code. We'd appreciate it if you give credit to the original author.