Skip to main content

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=")
>>> 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).

Docker

Building the docker image

$ docker build -t searchor .

Running searchor on the docker container

$ docker run --rm -it searchor sh
/usr/src/searchor/examples # python searchamazon.py
https://www.amazon.com/s?k=Hello%2C%20World%21

v2.5.2 Changes

v2.5.0

  • [ADDED] Added a new Enum class Information.
  • [ADDED] Added getinfo function in the Information Enum to gather information about a given topic, using Wikipedia.
  • [ADDED] Add web_scraper function in the Information Enum, to web scrape a URL that is given.
  • [ADDED] Added bs4 and requests as dependencies.
  • [MODIFIED] The Searchor Package is now officially becoming a library, and is therefore no longer considered a package.

v2.5.2

  • [FIXED] Fixed issue with web scraping, with attribute errors, and CLI issues

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-present
All Rights Reserved

Release files for searchor 2.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for searchor 2.5.2
File Size Uploaded
searchor-2.5.2.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for searchor 2.5.2
File Interpreter ABI Platform
searchor-2.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.0 kB

Release files / searchor-2.5.2.tar.gz

Download URL searchor-2.5.2.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
14c0399fd5cf0fb9d4022901462cf156c81f80cb2ee02ccb76be3b22670a1cce
BLAKE2b-256 checksum
How to use checksums
f0e23e04476f2d3d2cdb62e95b4f238a941daf6edcaf2d5760fc0b183590951f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release files / searchor-2.5.2-py3-none-any.whl

Download URL searchor-2.5.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7526f5cc5aefbdfa51bb24816becb524aabf6f0dbe10392265d3f72322db0ccc
BLAKE2b-256 checksum
How to use checksums
37757788cbc3c9c66a87837dc0fbb27d4ec4dfa488a4fb0b2f8917545a0e84fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release history Release notifications | RSS feed

This release

2.5.2 This release

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.4.0

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page