Skip to main content

This is a program that allows you to search the web from the comfort of your terminal.

Project description

Google Search CLI

This is a simple command-line tool that allows you to search Google from your terminal.

Installation

To install, simply run pip install search-terminal==0.0.1.

Usage

To use, simply run search <query>. For example, to search for "cats", you would run search cats.

The results will be printed to the terminal in JSON format.

If your search is multi-worded you might alternate to wrapping the text in double quotes. For example, to search for "cats and mice", you would run search "cats and mice".

Code Explanation

The code is relatively simple. The main function first checks to make sure that the user has provided a search query. If they have, it calls the google_searcher() function, which performs the search and returns the results. The results are then printed to the terminal in JSON format.

The google_searcher() function first makes a request to the Google search engine, using the user's query as the search term. If the request is successful, the function parses the HTML response and extracts the search results. The search results are then returned to the main function.

Conclusion

This is a simple but useful tool that can be used to search Google from the command line. It is easy to use and install, and the code is well-commented and easy to understand.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

search_terminal-0.0.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file search_terminal-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for search_terminal-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 557bc078cfed2d9d42d088c365c2951159511b87e635d8998de8c80b29039859
MD5 5d446865803717c44a45091a2989c1e3
BLAKE2b-256 a6250a9e3cca5815cdb2d8d3ef5e45df28e9b0e59f62dc5ab6489f9a372ca0fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page