Google Reverse Image Search is an open-source Python library designed for leveraging Google's search by image capabilities to perform reverse image searches programatically. This tool is particularly useful for applications like verifying the source of an image, finding higher resolution versions, or identifying the content and context of an image. It's designed for developers, researchers, and hobbyists who require an automated, programmatic way to perform reverse image searches.
- Automated reverse image searches using Google's search by image feature.
- Customizable search queries, delays and result limits.
- Parses and formats search results, including titles and links.
- Built-in error handling and logging.
Python 3.x
The following Python packages are required:
requests
: For making HTTP requests to Google.beautifulsoup4
library for parsing the results.
Clone the repository and install the required dependencies:
git clone https://github.com/RMNCLDYO/Google-Reverse-Image-Search.git
cd Google-Reverse-Image-Search
pip install -r requirements.txt
from reverse_image_search import GoogleReverseImageSearch
request = GoogleReverseImageSearch()
response = request.response(
query="Example Query",
image_url="https://example.com/image.jpg",
max_results=5
)
print(response)
The response method includes an optional delay
parameter, designed to manage the rate of search requests. This feature is particularly useful to prevent overwhelming the server with rapid successive requests, which could potentially trigger rate limiting or temporary blocking by Google's servers.
The delay
parameter specifies the number of seconds
to wait before making each new page request. This delay is applied only when fetching subsequent pages, not on the first request. It's an optional parameter, and if not set, defaults to 1 second.
To use the delay feature, set the delay
parameter in the response method:
response = request.response(
query="Example Query",
image_url="https://example.com/image.jpg",
max_results=10,
delay=5 # Wait for 5 seconds before each request
)
Contributions are welcome!
Please refer to CONTRIBUTING.md for detailed guidelines on how to contribute to this project.
Encountered a bug? We'd love to hear about it. Please follow these steps to report any issues:
- Check if the issue has already been reported.
- Use the Bug Report template to create a detailed report.
- Submit the report here.
Your report will help us make the project better for everyone.
Got an idea for a new feature? Feel free to suggest it. Here's how:
- Check if the feature has already been suggested or implemented.
- Use the Feature Request template to create a detailed request.
- Submit the request here.
Your suggestions for improvements are always welcome.
Stay up-to-date with the latest changes and improvements in each version:
- CHANGELOG.md provides detailed descriptions of each release.
Your security is important to us. If you discover a security vulnerability, please follow our responsible disclosure guidelines found in SECURITY.md. Please refrain from disclosing any vulnerabilities publicly until said vulnerability has been reported and addressed.
Licensed under the MIT License. See LICENSE for details.