Skip to main content

A simple AI (span-marker) powered fandom scraper

Project description

Fandom Scraper

A simple AI (span marker) powered fandom scraper.

[!NOTE]
This package is a part of the Cirilla project

[!IMPORTANT]
In order to use the package an nvidia gpu is required.

Installation

# (recommended)
uv add fandom-scraper

# or
pip install fandom-scraper

Usage

The usage is very simple, the function requires path with so-called seeds to start scraping e.g. examples/witcher_json/witcher_1.json

[
    "Geralt of Rivia", "Triss Merigold", "Vesemir", "Leo", "Lambert", 
    "Eskel", "Alvin", "Shani", "Zoltan Chivay", "Dandelion (Jaskier)", 
    "King Foltest", "Adda the White",

    "Jacques de Aldersberg", "Azar Javed", "Professor (leader of Salamandra)", 
    ...
]

and later uses sugesions provided by an Named Entity Recognition (NER) model. The script saves the scraped pages and instructions into respective folders.

from fandom_scraper import scrape_fandom
in_path = Path("./examples/witcher_json")
out_path = Path("./examples/async_fandom")
instruct_path = Path("./examples/async_fandom_instruct")

scrape_fandom(in_path, out_path, instruct_path)

See examples/async_fandom/ and examples/async_fandom_instruct/ for more examples.

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

fandom_scraper-0.1.31.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.

fandom_scraper-0.1.31-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file fandom_scraper-0.1.31.tar.gz.

File metadata

  • Download URL: fandom_scraper-0.1.31.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for fandom_scraper-0.1.31.tar.gz
Algorithm Hash digest
SHA256 4785f59707198e1d4dda4c19474d4de53f9b147bccd699d2ecd97bb2f2bb2ee5
MD5 4920a521b28f15cd419e955d26e375d0
BLAKE2b-256 0ba754f6acd0f1fcfa381b9a2a92f120f47d0c2b7224c6ea7d3ed52b13b0bf56

See more details on using hashes here.

File details

Details for the file fandom_scraper-0.1.31-py3-none-any.whl.

File metadata

File hashes

Hashes for fandom_scraper-0.1.31-py3-none-any.whl
Algorithm Hash digest
SHA256 507e43bcab288b9337b975af5e1582ca0a850fa73ba6f21dc317afd32964d4b8
MD5 cbe09419126033f272a14f4969cab2e1
BLAKE2b-256 68d29ade3fa444e6b3018b3db01fea000e223e73266554537775e108d34bbff5

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