Git Product home page Git Product logo

searchor's Introduction

Searchor

PyPI

⚡️ 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'

Take a look at more examples in the examples folder!

v2.1.0/v2.1.1 Changes

  • [ADDED] Added view engine list module
  • [MODIFIED] Changed engines to be in alphabetical order
  • [ADDED] Added Ask, Replit, WikiHow, Fandom, and Wolframalpha as engines.
  • [ADDED] Added TikTok in 2.1.1

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())

searchor's People

Contributors

arjunsharda avatar williamjaackson avatar exersalza avatar a-1an avatar dependabot[bot] avatar chaitanya-anand avatar deepsourcebot avatar imgbotapp avatar djazi avatar secondport avatar deepsource-autofix[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.