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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ca7e88b8cad527d8ae41159261e6b4a59055417e887e6603bf741c8b80e3d13 |
|
MD5 | 870e19d3090d0f9d48244596311656d0 |
|
BLAKE2b-256 | 8ee1ad3993657c06397febb68075fa661ee026b5c6c6cf183d8e9003a95489cb |
Close
Hashes for google_custom_search-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fb41a6b8b8ab6080ab4fc4210a8379693cc1af3e5d0969a087318b533172399 |
|
MD5 | db349912ad1f566089f81f27b0367e8f |
|
BLAKE2b-256 | e136aed8310192ec34e570f32f4c14c0853dd51e2b84c9699f7a2190ee9ec9e2 |