rewise is an unofficial wrapper for google search's auto-complete feature

Overview

rewise

rewise is an unofficial wrapper for google search's auto-complete feature. It can be installed with pip as follows:

python -m pip install rewise

Documentation

rewise library has 4 public functions:

  1. raw - raw response
  2. revise - parsed data
  3. correct - corrected query
  4. complete - suggested queries

All of these functions have a required argument q (query) and an optional argument lang (language in ISO 693 format).

raw

This function returns the original responses returned by Google.

>>> raw('new yerk')
[[['new york', 46, [433, 10, 275], {'zh': 'New York', 'zi': 'City in New York State', 'zp': {'gs_ssp': 'eJzj4tTP1TcwijeyMDNg9OLISy1XqMwvygYAOpEF8g'}, 'zs': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRWk035eGDgU54tgzsd99rp99r_XclRqa2XIR-N5lkTP43uRdXoy8bMMFhR_4s&s=10'}], ['new york time', 0, [433, 10]], ['new york time now', 0, [433, 10]], ['new york movie', 46, [433, 10], {'zh': 'new york movie', 'zi': 'New York — 2009 film', 'zp': {'gs_ssp': 'eJzj4tLP1TcwycqpKEsyYPTiy0stV6jML8pWyM0vy0wFAH_ZCWI'}, 'zs': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS8sUo_yUK4ITv1r_oYgQuHAC2GZJSxor74KuEee7z8&s=10'}], ['new york zip code', 0, [10]], ['new york temperature', 0, [433, 10]], ['new york full movie', 0, [10]], ['new york university', 46, [433, 10], {'zh': 'New York University', 'zi': 'Private university in New York City, New York', 'zp': {'gs_ssp': 'eJzj4tDP1TdIKk_LM2D0Es5LLVeozC_KVijNyyxLLSrOLKkEAKCPCvo'}, 'zs': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ5C-Rjr8zI0n4Eec1F0VCqXchB0McJI_9-Q8N3kIAIvg&s=10'}], ['new york movie download', 0, [10]], ['new york stock exchange', 46, [433, 199, 175, 10], {'zh': 'New York Stock Exchange', 'zi': 'Stock broker · 11 Wall St, New York, NY, USA', 'zp': {'gs_ssp': 'eJzj4tDP1TcwTSnKMGC0UjWosLBMNjJNNDQztLQwSLFINLQyqLBMNTW3NE8xTbS0MDQ3MEzxEs9LLVeozC_KViguyU_OVkitSM5IzEtPBQDv-RXn'}, 'zs': 'https://lh5.googleusercontent.com/p/AF1QipP2EDrc6ChAHnAiLZYxMFuwN-qtNafajsdy0Pw-=w92-h92-n-k-no'}]], {'o': 'new york', 'p': 'new yerk', 'q': '4ReAWeajJ1mTkjJFwqVFPnAZlMc'}]```

revise

This function returns a parsed version of the raw response only containing the fields that the author of this library considers useful. Here's an explanation of the fields

  • corrected corrected query, if possible.
  • completed suggested queries by Google, if any.
    • str suggested query e.g. new york
    • fmt suggested query, but formatted e.g. New York
    • img image associated with the suggestion, if any. e.g. https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRWk035eGDgU54tgzsd99rp99r_XclRqa2XIR-N5lkTP43uRdXoy8bMMFhR_4s&s=10
    • info additional information about the suggestion e.g. City in New York State
>>> revise('new yerk')
{'corrected': 'new york', 'completed': [{'str': 'new york time', 'fmt': '', 'img': '', 'info': ''}, {'str': 'new york', 'fmt': 'New York', 'img': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRWk035eGDgU54tgzsd99rp99r_XclRqa2XIR-N5lkTP43uRdXoy8bMMFhR_4s&s=10', 'info': 'City in New York State'}, {'str': 'new york time now', 'fmt': '', 'img': '', 'info': ''}, {'str': 'new york movie', 'fmt': 'new york movie', 'img': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS8sUo_yUK4ITv1r_oYgQuHAC2GZJSxor74KuEee7z8&s=10', 'info': 'New York — 2009 film'}, {'str': 'new york zip code', 'fmt': '', 'img': '', 'info': ''}, {'str': 'new york capital', 'fmt': '', 'img': '', 'info': ''}, {'str': 'new york full movie', 'fmt': '', 'img': '', 'info': ''}, {'str': 'new york university', 'fmt': 'New York University', 'img': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ5C-Rjr8zI0n4Eec1F0VCqXchB0McJI_9-Q8N3kIAIvg&s=10', 'info': 'Private university in New York City, New York'}, {'str': 'new york temperature', 'fmt': '', 'img': '', 'info': ''}, {'str': 'new york movie download', 'fmt': '', 'img': '', 'info': ''}]}

correct

This function returns the search query corrected by Google.

>>> correct('new yerk')
'new york'

complete

This function returns auto-completed search queries suggested by Google.

>>> complete('new yerk')
['new york time', 'new york', 'new york time now', 'new york movie', 'new york zip code', 'new york capital', 'new york full movie', 'new york university', 'new york temperature', 'new york movie download']
You might also like...
🔍 Google Search unofficial API for Python with no external dependencies

Python Google Search API Unofficial Google Search API for Python. It uses web scraping in the background and is compatible with both Python 2 and 3. W

(unofficial) Googletrans: Free and Unlimited Google translate API for Python. Translates totally free of charge.

Googletrans Googletrans is a free and unlimited python library that implemented Google Translate API. This uses the Google Translate Ajax API to make

An unofficial client library for Google Music.

gmusicapi: an unofficial API for Google Play Music gmusicapi allows control of Google Music with Python. from gmusicapi import Mobileclient api = Mob

CoWIN Vaccination slot booking telegram bot with auto captcha resolver & alerting feature.Now, never miss a slot.
CoWIN Vaccination slot booking telegram bot with auto captcha resolver & alerting feature.Now, never miss a slot.

COWIN VACCINATION SLOT AUTO BOOKING (Bot with captcha solving & alerting capabilities. Never miss the vaccine slot.) June-10-2021/ 0030 hrs: 23 succes

Unofficial Python wrapper for official Hacker News API

haxor Unofficial Python wrapper for official Hacker News API. Installation pip install haxor Usage Import and initialization: from hackernews import H

An Unofficial TikTok API Wrapper In Python

This is an unofficial api wrapper for TikTok.com in python. With this api you are able to call most trending and fetch specific user information as well as much more.

This is a simple unofficial async Api-wrapper for tio.run

Async-Tio This is a simple unofficial async Api-wrapper for tio.run

Unofficial API wrapper for seedr.cc

Seedr API Unofficial API wrapper for seedr.cc Inspired by theabbie's seedr-api Powered by @harp_tech (Telegram) How to use You can install lib via git

An unofficial Python wrapper for the 'Binance exchange REST API'

Welcome to binex_f v0.1.0 many interfaces are heavily used by myself in product environment, the websocket is reliable (re)connected. Latest version:

Releases(0.0.1)
Owner
Somdev Sangwan
I make things, I break things and I make things that break things.
Somdev Sangwan
股票量化

StockQuant Gary-Hertel 请勿提交issue!可以加入交流群与其他朋友一起自学交流,加微信mzjimmy 一、配置文件的设置 启动框架需要先导入必要的模块,并且载入一次配置文件! 配置文件是一个json格式的文件config.json,在docs文件夹中有模板

218 Dec 25, 2022
TwitterBot-ImageCollector - Twitter bot that collects images from likes saves the image

TwitterBot-ImageCollector Bot de Twitter que recolecta imagenes a partir de los

Gx3 Studios 4 Jun 01, 2022
TM1py is a Python package that wraps the TM1 REST API in a simple to use library.

By wrapping the IBM Planning Analytics (TM1) REST API in a concise Python framework, TM1py facilitates Python developments for TM1. Interacting with T

Cubewise CODE 147 Dec 15, 2022
DadBot 2.0 is an interactive bot that reflects the personality of a typical dad

DadBot 2.0 is an interactive bot that reflects the personality of a typical dad! You can start by running main while all directories are maintained as they are on this GitHub.

1 Dec 04, 2021
Paginator for Dis-Snek Python Discord API wrapper

snek-paginator Paginator for Dis-Snek Python Discord API wrapper Installation: pip install -U snek-paginator Basic Example: from dis_snek.client impo

1 Nov 04, 2021
Apps related to Odoo it's calendar features

calendar Apps related to Odoo it's calendar/appointments features: online_appointment_locations: allow setting an online URL per employee online_appoi

Yenthe Van Ginneken 3 Oct 27, 2022
CSUL Discord Bot

Cruzeiro This is the same old bot running on the Discord Server of CSUL, but i've changed the code. It's better now. Discord.py Heroku How i did The b

Operaho 6 Jan 31, 2022
Please Do Not Throw Sausage Pizza Away - Side Scrolling Up The OSI Stack

Please Do Not Throw Sausage Pizza Away - Side Scrolling Up The OSI Stack

John Capobianco 2 Jan 25, 2022
Send pm to Admin - Telegram

Send pm to Admin - Telegram

Ahoora 3 Nov 17, 2022
DDoS Script (DDoS Panel) with Multiple Bypass ( Cloudflare UAM,CAPTCHA,BFM,NOSEC / DDoS Guard / Google Shield / V Shield / Amazon / etc.. )

KARMA DDoS DDoS Script (DDoS Panel) with Multiple Bypass ( Cloudflare UAM,CAPTCHA,BFM,NOSEC / DDoS Guard / Google Shield / V Shield / Amazon / etc.. )

Hyuk 256 Jan 02, 2023
This is a python wrapper for "the best api in the world"

This is a python wrapper for my api api_url = "https://api.dhravya.me/" This wrapper now has async support, its basically the same except it uses asyn

Dhravya Shah 3 Dec 21, 2021
An example of matrix addition, demonstrating the basic method of Python calling C library functions

Example for Python call C functions An example of matrix addition, demonstrating the basic method of Python calling C library functions. How to run Bu

Quantum LIu 2 Dec 21, 2021
Filters to block and remove copycat-websites from DuckDuckGo and Google. Specific to dev websites like StackOverflow or GitHub.

uBlock-Origin-dev-filter Filters to block and remove copycat-websites from DuckDuckGo and Google. Specific to dev websites like StackOverflow or GitHu

1.7k Dec 30, 2022
Deepl - DeepL Free API For Python

DeepL DeepL Free API Notice Since I don't want to make my AuthKey public, if you

Vincent Young 4 Apr 11, 2022
Experiment to find the best time to look for an appointment at the Berlin Bürgeramt

Bürgeramt appointment experiment Checks Berlin.de for free Anmeldung appointments every X minutes, then analyses the results. How to use Run get-page.

Nicolas Bouliane 42 Jan 02, 2023
A cross-platform script to book first available time for getting a passport in Sweden - Ett skript som automatiskt bokar pass hos polisen

Automatic passport booker - Boka pass automatiskt hos Svenska polisen A cross-platform script to book first available time for getting a passport in S

Elias Floreteng 14 Oct 17, 2022
Python client and API for monitoring and controling energy diversion devices from MyEnergi

Python client and API for monitoring and controling energy diversion devices from MyEnergi A set of library functions and objects for interfacing with

1 Dec 17, 2021
EzilaX Music ❤ is the best and only Telegram VC player with playlists, Multi Playback, Channel play and more POWERD By SDBOTs

EzilaX-Music 🎵 A bot that can play music on Telegram Group and Channel Voice Chats Available on telegram as @EzilaXMBot Features 🔥 Thumbnail Support

Sadew Jayasekara 9 Oct 24, 2021
A telegram media to pixeldrain stream link bot

Pixeldrain-Bot A telegram media to pixeldrain stream link bot Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - ht

Fayas Noushad 11 Oct 21, 2022
100d002 - Simple program to calculate the tip amount and split the bill between all guests

Day 2 - Tip Calculator Simple program to calculate the tip amount and split the

Andre Schickhoff 1 Jan 24, 2022