Giter VIP home page Giter VIP logo

hanapin's Introduction

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

hanapin's People

Contributors

tbdsux avatar dependabot[bot] avatar

Stargazers

Subrota Halder avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.