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.

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.

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.45.tar.gz (23.7 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.45-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scraipe-0.1.45.tar.gz
Algorithm Hash digest
SHA256 9b8d5a4b2fac75d558fd4b5da8cfb6e202f7d030b93d9b0da25d98fcf223f668
MD5 4c68e5d2c73f4d9581f291a968fb809e
BLAKE2b-256 f7e37759eab478be371f43a6851ebba8eef1faf7a6e6964b64796dceafff1b68

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for scraipe-0.1.45-py3-none-any.whl
Algorithm Hash digest
SHA256 efeb79057d60bde4d36b84c7a46e4ec1619781b4b5c210bc68ff2aaa28ae3d52
MD5 ac7b2b1adca887fa491577fa145cbedc
BLAKE2b-256 38595dc91755b094a1f7b88fa38bd5d1d21bbffa039c4c591094725552c7a381

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