A simple package for scraping websites and generating responses using Google's Generative AI.
Project description
ai-scraper
A simple package for scraping websites and generating responses using Google's Generative AI.
Features
- Scrapes a webpage using Selenium with headless Chrome.
- Passes scraped HTML into a Generative AI model along with custom instructions.
- Returns the AI-generated response.
Installation
You can install the package via pip (after publishing to PyPI):
pip install ai-scraper```
## Usage
```from ai_scraper import scrape
response_text = scrape(
google_api_key="YOUR_GOOGLE_API_KEY",
url="https://webscraper.io/test-sites/e-commerce/allinone",
instructions="Return all products names, in JSON."
)
print(response_text)```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 ai_gemini_scraper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_gemini_scraper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b3911bfff01ffb947d9123b3812b07657ffc4fc7bdcaf6deb0f5701d491038e
|
|
| MD5 |
d0aa17330514bf911f230c2f3c0373d6
|
|
| BLAKE2b-256 |
1121bbcc86bd865138e4dfc5186141fc345273d18f16076f5ebc6f32ff3e15a3
|