Simple web search library
Project description
hanapin
Simple web search library
Install
$ pip3 install hanapin
Usage
from hanapin import Google
# you can explicitly add the count result with the `count` argument,
# `search = Google(query="hello", count=1)`
# search results may not yield the exact specified count
search = Google(query="hello")
Bing
from hanapin import Bing
# you can explicitly add the count result with the `count` argument,
# `search = Bing(query="hello", count=1)`
# search results may not yield the exact specified count
search = Bing(query="hello")
DuckDuckGo
from hanapin import DuckDuckGo
# explicitly setting search results count is not applicable,
search = DuckDuckGo(query="hello")
Ask.com
from hanapin import Ask
# explicitly setting search results count is not applicable,
search = Ask(query="hello")
Get search results
Scraped search results are only
the first ones the can be seen from the search engine's results.
- Search results are accesible from the class object's
.results()
function.
for i in search.results():
print(i["title"], "::", i["link"])
Credits
Libraries Used
- BeautifulSoup4
- requests
- lxml
© TheBoringDude | MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hanapin-0.1.6.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file hanapin-0.1.6.tar.gz
.
File metadata
- Download URL: hanapin-0.1.6.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9090753dae20775111137bacd336f82a6e62081683f0dfb854f6d151a7be4738 |
|
MD5 | 9801eed8367f42e4bdf066909a700a91 |
|
BLAKE2b-256 | 30216b43e40a80e39f37d02b56dbd3f5d7f279a551aa998697c6668f2b3996d6 |
File details
Details for the file hanapin-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: hanapin-0.1.6-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | affa4e7648c48cbb092a97085581be368e6f2c8dec5f84e893b8fa81ea038878 |
|
MD5 | aeb1811a98f1506f3d40c2ec40c3931f |
|
BLAKE2b-256 | beca9709697273d43775abf53035697a50e5aeb3f4c6b685215d85df9da0dea5 |