Skip to main content

hanapin

Simple web search library

Install

$ pip3 install hanapin

Usage

Google

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

Metadata

Release files for hanapin 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hanapin 0.1.6
File Size Uploaded
hanapin-0.1.6.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hanapin 0.1.6
File Interpreter ABI Platform
hanapin-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / hanapin-0.1.6.tar.gz

Download URL hanapin-0.1.6.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9090753dae20775111137bacd336f82a6e62081683f0dfb854f6d151a7be4738
BLAKE2b-256 checksum
How to use checksums
30216b43e40a80e39f37d02b56dbd3f5d7f279a551aa998697c6668f2b3996d6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / hanapin-0.1.6-py3-none-any.whl

Download URL hanapin-0.1.6-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
affa4e7648c48cbb092a97085581be368e6f2c8dec5f84e893b8fa81ea038878
BLAKE2b-256 checksum
How to use checksums
beca9709697273d43775abf53035697a50e5aeb3f4c6b685215d85df9da0dea5
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page