Skip to main content

A fast, efficiency python package for searching and getting search results with many different search engines.

Project description

search

A fast, efficiency python package for searching and getting search results with many different search engines.

Installation

To install the package, run the following command:

python3 -m pip install search-python

Or install from Github:

python3 -m pip install git+https://github.com/Neurs1/search.git

Features

This package support many different search engines. Provide the best speed with BS4 using lxml. Fix bugs, adapt new features and page design from fearch engines. Output in dict type, easier to interact with.

Usage

Search using multiple search engines!

import search
search.google("Python")
search.bing("Python")
search.yahoo("Python")

Customize Google search engine:

import search
search.google("Python", max_results = 30, lang = "en")

You could use your own proxy:

import search
search.google("Python", proxies = {
    "https": "https://example.com"
  })

Output format

Example search.google("YouTube"):

{
  0: {
    "title": "YouTube",
    "url": "https://www.youtube.com/"
  },
  1: {
    "title": "YouTube - Apps on Google Play",
    "url": "https://play.google.com/store/apps/details?id=com.google.android.youtube&hl=en_US&gl=US"
  },
  2: {
    "title": "YouTube - Home | Facebook",
    "url": "https://www.facebook.com/youtube/"
  },
  3: {
    "title": "YouTube - Wikipedia",
    "url": "https://en.wikipedia.org/wiki/YouTube"
  }
}

How to access search results:

import search
results = search.google("YouTube")
#At the first result, get the title of the result.
print(results[0]["title"])
#At the second result, get the url of the result.
print(results[1]["url"])

Output:

YouTube
https://play.google.com/store/apps/details?id=com.google.android.youtube&hl=en_US&gl=US

Supported search engines

  • Google
  • Bing
  • Yahoo
  • Aol You could pull a request for other search engines.

Known issues

I could only find max results and languages in Google search engine, still trying to figure it out on other search engines.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

search-python-1.0.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file search-python-1.0.tar.gz.

File metadata

  • Download URL: search-python-1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for search-python-1.0.tar.gz
Algorithm Hash digest
SHA256 cf3cf252c2b125649bb37e9eb97ff39877e98d203348ed6ba2b9373b52bdde57
MD5 58358b577cc77499f5aac42223b9ce6b
BLAKE2b-256 05c8c05849ef475b3537468af6726c35ec123f3dee9e22b8d6bcbdc5c6be06ea

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