Skip to content

dan-pavlov/Searchor

 
 

Repository files navigation

Searchor

GitHub repo size

Json-Generator

 forks

PyPI Discord

Installation

Python 3.7+ is required

# MacOS / Linux (via Terminal)
python3 -m pip install -U searchor

# Windows (via CMD Prompt)
py -3 -m pip install -U searchor

Quick Start

>>> from searchor import Engine
>>> Engine.Google.search("Hello, World!")
'https://www.google.com/search?q=Hello%2C%20World%21'

Custom Engine

>>> from searchor import Engine
>>> Engine.new("Colgate", "https://www.colgate.com/en-us/search/all?term=")
>>> print(Engine.Colgate.search("Hi world!", copy_url=True)
'https://www.colgate.com/en-us/search/all?term=Hi%20world!"

Searchor CLI Quick Start

$ searchor Google "Hello World!" --copy


Take a look at more examples in the examples folder!

Note:  Engine names follow the UpperCamelCase convention.(eg: ChromeWebStore).

v2.4.0/v2.4.1 Changes

  • [ADDED] Added custom Engine support, check out a example here
  • [ADDED] Added Reuters search engine
  • [ADDED] Added the History CLI command which stores data in a JSON file, and which allows you to view and clear. You can see some information of what was added for the history command here
  • [MODIFIED] Modified the CLI with some other minor changes

Migration

Instead of different functions for each engine, Searchor v2.2.0 uses a single function with an Engine enum. This makes it easier to use and maintain. If you're migrating from v2.0.0, compare the differences between the following snippets:

# Searchor 2.0.0
from searchor import search, Engine
search("Hello, World!", Engine.Google)
# Searchor v2.2.0
from searchor import Engine
Engine.Google.search("Hello, World!")

Want to contribute?

Take a look at the contributing guidelines!


© Arjun Sharda 2022
All Rights Reserved

About

⚡️ Quick and easy search engine queries.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%