A package to scrape Google Images for image relating to a picture or query
Project description
Google Reverse Image Search
Installation
Download the src folder or download from pip with the terminal command (below)
Run the command in your local terminal with a Virtual Environment (https://docs.python.org/3/library/venv.html#creating-virtual-environments)
> python -m venv your_venv_name
# Downloading from GitHub
> pip install -r ./path/to/requirements.txt
# Downloading from pip
> pip install google-reverse-image-search
> playwright install chromium
Note : Only works for Chrome (for now but likely won't change)
Usage
Import all functions from the file with
from google_reverse_image_search import google_reverse_search
Then start anywhere with the three basic functions
print(google_reverse_search.search_with_query(query="your query"))
print(google_reverse_search.search_with_url(url="https://link/to/photo"),num=5)
print(google_reverse_search.search_with_file(file_path="C:/path/to/file",num=20))
Examples
All three functions will return the images in a similar manner
Code
res:dict = google_reverse_search.search_with_query(query="boats",num=3)
print(res)
Results
Formatted for easier reading
Connected...
Navigating...
Getting results...
Formatting results...
{'title': 'boats',
'data': [
{'link': 'https://www.discoverboating.com/sites/default/files/small-boats_1.jpg', 'name': 'The Ultimate Guide to Small Boats | Discover Boating', 'dimensions': [1200, 795]},
{'link': 'https://d1nkxkz7ge96ao.cloudfront.net/eyJidWNrZXQiOiJzbW4tbWFpbi1zaXRlLWJ1Y2tldCIsImtleSI6ImltYWdlc1wvaW1hZ2luXC9McktPcmhFcE5FN0FNV3lFQUxRMUpFOE0wTjVsc1VkekxsNU9ZcEZsLmpwZyIsImVkaXRzIjp7InJlc2l6ZSI6eyJ3aWR0aCI6MjYwMCwiaGVpZ2h0IjoxMzAwLCJmaXQiOiJjb3ZlciJ9fX0=', 'name': "Family-Friendly Offshore Center Consoles & Bay Boats from 20' to 35' | Sportsman Boats", 'dimensions': [2600, 1300]},
{'link': 'https://cdn.britannica.com/27/166127-050-5E3F9372/salmon-fishing-boat-Alaska.jpg', 'name': 'Boat | Definition, History, Types, & Facts | Britannica', 'dimensions': [1600, 1075]}
]
}
Bugs and Issues
Please raise any issues you have on the Issues forum, and I'll take a look and fix it 🙏
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file google-reverse-image-search-0.5.0.tar.gz.
File metadata
- Download URL: google-reverse-image-search-0.5.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a771e10f730e41ec64b0546da328f6d48076536fd6c9f1b90f6cafe87ff7bedc
|
|
| MD5 |
868ba6b6ec8dc12bee0a899ab486c607
|
|
| BLAKE2b-256 |
3b9a7ae1b2c202107761f417f9e18f9ecce7aa7125562e9c84c39aaae27c2d3d
|
File details
Details for the file google_reverse_image_search-0.5.0-py3-none-any.whl.
File metadata
- Download URL: google_reverse_image_search-0.5.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea3181aa850fb23ddd5722a5e317fdfc7ce725ed84e2af6666b8ee1a2444c23
|
|
| MD5 |
73bdefffdeaaa815a1142bb887cbba51
|
|
| BLAKE2b-256 |
ec69402b65500aba7db0458120bc45dcd76ab10d3c837ba7ee21e1f245a30708
|