Skip to main content

A semantic web scraping and summarization toolkit.

Project description

vibescraper

vibescraper is a Python utility that generates an AI summary of web results based on a search query.

This is very much a work in progress. The results of each search may vary depending on how well the parser handles the pages. If you find that some results are not sufficient, you can try increasing the number of sites to return in the search api using the domain_count argument in the vibe_search function.

The number of sites will slow the operation down, so you may need to experiment and find the optimal tradeoff that suits your needs, between speed and accuracy of results.

In order to select the search api you need to run the following in your projects python environment: - change-search-api <google/brave>

The output files and folders from the search operations can be used or discarded as you need. In future I may change this so that the datbase can be saved or discarded according to an argument flag in the vibe_search function or as part of another python config script.


How it works

  • Web Search: Searched the web using search engine API.
  • Semantic Chunking: Extracts html from each url in the search results, then divides the html page content into meaningful chunks.
  • Embedding Generation: Generate vector embeddings for each chunk using openai embedding models.
  • Similarity Search: Find the most relevant content chunks for a given search query.
  • AI Summarization: Generates concise summaries of relevant content, then combines all summaries into a combined summary.
  • JSON Export: Saves results and summaries as JSON files for easy inspection or downstream use.

Installation

Install via pip (from PyPI):

pip install vibescraper

Or install locally with Poetry:

poetry install

NOTE: You need either a Beave or Google search API key to use this, as well as an open AI API key.

to import the keys into config.py after installing run: check-api-keys

in your python project env.


Requirements

  • Python 3.12+
  • OpenAI API key (for embedding and summarization)
  • Other dependencies: numpy, requests, beautifulsoup4, pandas, sqlalchemy, openai, tiktoken, google-api-python-client, html5lib

Usage

  • Install the package into your python project, then import the vibe_search function
from vibescraper.vibe_search import vibe_search

ai_summary = await vibe_search(query='What is the state of the software development job market in 2025?', domain_count=10, text_model='gpt-4o')

Environment Variables

You must set your OpenAI API key (and either a Google or Brave yea keys) as environment variables


License

MIT License


Contributing

Pull requests and issues are welcome!


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

vibescraper-0.1.5.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

vibescraper-0.1.5-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file vibescraper-0.1.5.tar.gz.

File metadata

  • Download URL: vibescraper-0.1.5.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.11.0-21-generic

File hashes

Hashes for vibescraper-0.1.5.tar.gz
Algorithm Hash digest
SHA256 2c173d40af94631bea72d06c9f715db170d53387442d9392513474209711e2ce
MD5 4634b6106771786cf7991153d8ac9301
BLAKE2b-256 97eb14c1e58b6239e7df4ef8547a33bd13c2e1566670933225bf3ac34a9754de

See more details on using hashes here.

File details

Details for the file vibescraper-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: vibescraper-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.11.0-21-generic

File hashes

Hashes for vibescraper-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 15c69370d32e2031f4c16ecea651f1f4946bb68dc693fc8e50abdea9de4f2b1c
MD5 d04677dfaeb1ae222bbf8eb52a228334
BLAKE2b-256 58a94e0b1b6425033500e8c86def8931be8bd9ab28eaaedfa250f25d0ef07566

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