Skip to main content

A simple package for scraping websites and generating responses using Google's Generative AI.

Project description

ai-gemini-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):

bash
pip install ai-scraper

Usage example

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 Distribution

ai_gemini_scraper-0.1.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

ai_gemini_scraper-0.1.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file ai_gemini_scraper-0.1.3.tar.gz.

File metadata

  • Download URL: ai_gemini_scraper-0.1.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ai_gemini_scraper-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8303ac9bc8145e35163f6d8ad0398d0ca4c15fcbbc42cae0596d1c2a1cfe599e
MD5 0c04b81f05512d3ff0be5daf4df4ca35
BLAKE2b-256 d8359309f79ddc691fc34b9ea066b84b96384f659dca06bdf6315c91d3de1b93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ai_gemini_scraper-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4c29a5b0d9d0b183e59935afb80ebae224918f1086d7754b440fcf1c87d0b751
MD5 301cbc57e640452f22d23a01f98c9fe6
BLAKE2b-256 c5595d9ad153ce64c27206985c6fed5b10bce33dd20df04cac66f81e87a550c9

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