Skip to main content

AI web scraping workflow.

Project description

Scraipe

pypi versions License: MIT

Scraping and analysis framework. Under development.

Features

  • Versatile Scraping: Leverage custom scrapers that handle Telegram messages, news articles, and links that require multiple ingress rules.
  • LLM Analysis: Process text using OpenAI models with built-in Pydantic validation.
  • Workflow Management: Combine scraping and analysis in a single fault-tolerant workflow--ideal for Jupyter notebooks.
  • High Performance: Asynchronous IO-bound tasks are seamlessly integrated in the synchronous API.
  • Modular: Extend the framework with new scrapers or analyzers as your data sources evolve.
  • Customizable Ingress: Easily define rules to dynamically route different links to their appropriate scrapers.
  • Detailed Logging: Monitor scraping and analysis operations through robust errors for improved debugging and transparency.

Check out the demo.

Help

See documentation for details.

Installation

Ensure you are using Python>=3.10. Install Scraipe and all built-in scrapers/analyzers:

pip install scraipe[extended]

Alternatively, install the core library with:

pip install scraipe

Example

 # Import components from scraipe
 from scraipe.defaults import TextScraper
 from scraipe.defaults import TextStatsAnalyzer
 from scraipe import Workflow

 # Initialize the scraper and analyzer
 scraper = TextScraper()
 analyzer = TextStatsAnalyzer()

 # Create the workflow instance
 workflow = Workflow(scraper, analyzer)

 # List urls to scrape
 urls = [
     "https://example.com",
     "https://rickandmortyapi.com/api/character/1",
     "https://ckaestne.github.io/seai/"
 ]

 # Run the workflow
 workflow.scrape(urls)
 workflow.analyze()

 # Print the results
 results = workflow.export()
 print(results)

Contributing

Contributions are welcome. Please open an issue or submit a pull request for improvements.

Run poetry install --with dev,docs --extras extended to install all dependences for the project.

Maintainer

This project is maintained by nibs.

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

scraipe-0.1.71.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

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

scraipe-0.1.71-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file scraipe-0.1.71.tar.gz.

File metadata

  • Download URL: scraipe-0.1.71.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.9 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for scraipe-0.1.71.tar.gz
Algorithm Hash digest
SHA256 eded3674fd3dbe1ee153def1bc62fc03e67b790404a5f4fd6733a062fdb4e724
MD5 8c085278b73eb25e6706055afeaf6d25
BLAKE2b-256 c4ac8c5189c3d14a95b78f5d983e32228f4b4a27ee575b8eb59dd28a1cbe623b

See more details on using hashes here.

File details

Details for the file scraipe-0.1.71-py3-none-any.whl.

File metadata

  • Download URL: scraipe-0.1.71-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.9 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for scraipe-0.1.71-py3-none-any.whl
Algorithm Hash digest
SHA256 494683ad3f0258cecc75b30508b50cff75a4cbfb60f23f1e7d041d1a12cc6350
MD5 38ca13ab3f481867823d4987b4f89ecc
BLAKE2b-256 cfb4b041293979a93b4e45bc655942226b14d9c35e72d547262c43318b735ce0

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