Simple web search library
$ pip3 install hanapin
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")
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")
from hanapin import DuckDuckGo
# explicitly setting search results count is not applicable,
search = DuckDuckGo(query="hello")
from hanapin import Ask
# explicitly setting search results count is not applicable,
search = Ask(query="hello")
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"])
- BeautifulSoup4
- requests
- lxml