Skip to main content

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

If you're not sure about the file name format, learn more about wheel file names.

ai_gemini_scraper-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ai_gemini_scraper-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_gemini_scraper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b3911bfff01ffb947d9123b3812b07657ffc4fc7bdcaf6deb0f5701d491038e
MD5 d0aa17330514bf911f230c2f3c0373d6
BLAKE2b-256 1121bbcc86bd865138e4dfc5186141fc345273d18f16076f5ebc6f32ff3e15a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page