⚡️ Quick and easy search engine queries.
Project description
Searchor
⚡️ Quick and easy search engine queries.
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 search, Engine
>>> search("Hello, World!", Engine.Google)
'https://www.google.com/search?q=Hello%2C%20World%21'
Note: Engine names follow the UpperCamelCase convention.(eg: ChromeWebStore).
Take a look at more examples in the examples folder!
v2.1.4 Changes
- [ADDED] Added Reddit, Altassian and AWS.
- [MODIFIED] Modified the AOL search link as it was not the correct link.
Migration
Instead of different functions for each engine, Searchor v2.0.0
uses a single function with an Engine
enum. This makes it easier to use and maintain. If you're migrating from v1.0.0
, compare the differences between the following snippets:
# Searchor v1.0.0
import Searchor
Searchor.SearchGoogle("Hello, World!")
# Searchor v2.0.0
from searchor import search, Engine
search("Hello, World!", Engine.Google)
Custom Engine
Single Use
from searchor import search
search("Hello, World!", "https://example.com/search/{query}")
Multiple Use
from searchor import search, Engine
Engine.MySite = "https://example.com/search/{query}"
search("Hello, World!", Engine.MySite)
search("Hello Again!", Engine.MySite)
View Engine list
from searchor import engine_list
print(engine_list())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
searchor-2.1.4.tar.gz
(4.2 kB
view hashes)