Skip to content

Commit

Permalink
Merge pull request #7 from leunoia/main
Browse files Browse the repository at this point in the history
Updated Readme to explain features more & show functionality
  • Loading branch information
codewithnick authored Oct 1, 2023
2 parents 53da61a + e2bda65 commit 5e728f1
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# searchenginepy

search engine for python (Query and scrape search engines)
Make search engine queries within your python applications. Searchenginepy allows you to query some of the most common search engines.

# How to use?

First install searchenginepy and then import it into your project. After importing, you can make queries on the four support search engines. Once a query has been made, a list of the top results will be returned. Initially it configured to display the top results but you are able to select which page you woud like to see in your list.

## Installation

`pip install searchenginepy`
Expand All @@ -17,6 +19,8 @@ engine=SearchEngine()

## Usage

If you want to use multiple search engine in your project then you can use the SearchEngine() class to access all four available search engines

```
list=engine.search("search query")
```
Expand All @@ -31,6 +35,8 @@ using google to search a query

## Using a specific search engine

You can also create instances of specific search engines to be used throughout your project. This will only give you access to that engine unlike the SearchEngine() class.

### google

```
Expand Down Expand Up @@ -58,6 +64,25 @@ list=Brave().search("search query")
from searchenginepy.DuckDuckGo import DuckDuckGo
list=DuckDuckGo().search("search query")
```
## Example with only HTTPS results

```
from searchenginepy.Google import Google
Google.httpallowed = false
results=Google().search("search query")
```

## Example Specifying page

The page number is set to 1 by default but you can can pass in the desired page after your query as seen below

```
from searchenginepy.Google import Google
results=Google().search("search query", 3)
```


## Supported search engines

Expand Down

0 comments on commit 5e728f1

Please sign in to comment.