Skip to content

krishna2206/google-search-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Search Python

A Python package for searching in Google Search. This package provides the ability to search for images, videos, news, and specific file types.

Installation

To install the package, you can use pip:

pip install git+https://github.com/krishna2206/google-search-python

Usage

Here's how you can use the different search modules in this package:

Page Search

from googlesearchpython import PageSearch

# Create a PageSearch object
page_search = PageSearch("query", page=1)

# Print the results
print(page_search.results)

File Search

from googlesearchpython.filesearch.filesearch import FileSearch

# Create a FileSearch object
file_search = FileSearch("query", "filetype", limit=10, page=1)

# Print the results
print(file_search.results)

Note: The "filetype" parameter should be one of the supported file types. Currently, the supported file types are "pdf", "doc", "docx", "xls", "xlsx", "ppt", and "pptx". Please check the constants.py file for the most up-to-date list of supported file types.

News Search

from googlesearchpython import NewsSearch

# Create a NewsSearch object
news_search = NewsSearch("query", page=1)

# Print the results
print(news_search.results)

Image Search

from googlesearchpython import ImageSearch

# Create an ImageSearch object
image_search = ImageSearch("query")

# Getting the next page of results
image_search.next_results()
image_search.next_results()

# Print the results
print(image_search.results)

Dependencies

This package depends on the following Python libraries:

  • requests
  • beautifulsoup4
  • lxml

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

A Python package for searching in Google Search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages