This is for google custom search api.
Project description
How to use this package.
first please install this package
pip install google-custom-search
sample code
import google_custom_search
google=google_custom_search.custom_search(token="your api_key", engine_id="your engine_id")
result=google.search("Hello")
# get a list of title.
for title in result.titles:
print(title)
# get a list of url.
for url in result.urls:
print(url)
sample code async version
import asyncio
import google_custom_search
google=google_custom_search.custom_search(token="your api_key", engine_id="your engine_id")
async def main():
result=await google.search_async("眠い")
for i in result.titles:
print(i)
for i in result.urls:
print(i)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
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
Built Distribution
Close
Hashes for google-custom-search-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66d986307081c689269bb2deaa334cd69a5522b11bceddbb60ba1e0407e70cc6 |
|
MD5 | b6824cf49cc3230b65c915e92c64e13a |
|
BLAKE2b-256 | 52171b894f01a18f3500f557012394db0cc4e8484c591fd251576093aea438ef |
Close
Hashes for google_custom_search-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49701519b45399fc0d1a46605f1a8eae50df0a408f8b87470e5f0236682ea4c6 |
|
MD5 | 563eef83b7bacd3230f3d70f67ddaa64 |
|
BLAKE2b-256 | 75ff98023fca2a8c453d148e58b85a6cf82ac9604d8eecc7ff44796cce09d3af |