Skip to main content

Semantic crawler with knowledge graph builder

Project description

web-crawler

A web-crawler project that I developed when trying to learn more about XPath, which lead to crawlers and data analysis. Made with python.

Features

  • Recursive crawling with depth control
  • Automatic URL normalization
  • Link extraction
  • Summary extraction
  • Async-ready architecture

Installation

pip install web-crawler-engine

### HOW TO USE

from web_crawler import CrawlerEngine

url = "https://en.wikipedia.org/wiki/Artificial_intelligence"

crawler = CrawlerEngine( depth_control=30, #controls how many pages you want to view url=url )

crawler.start_crawl_bfs() #starts crawls crawler.store_data() #stores data in a pages.json crawler.generate_knowledge_graph() #generates a html of a directed graph of pages and their relations


### JSON example

{ "title": "Black hole", "url": "https://en.wikipedia.org/wiki/Black_hole", "summary": "A black hole is an astronomical body so compact that its gravity prevents anything, including light, from escaping. Albert Einstein's theory of general relativity, which describes gravitation as the curvature of spacetime, predicts that any sufficiently compact mass will form a black hole. The boundary of no escape is called the event horizon. In general relativity, crossing a black hole's event horizon seals an object's fate but produces no locally detectable change. General relativity also predicts that every black hole should have a central singularity, where the curvature of spacetime is infinite.", "links": [ "https://en.wikipedia.org/wiki/Astronomical_body", "https://en.wikipedia.org/wiki/Albert_Einstein", "https://en.wikipedia.org/wiki/General_relativity", "https://en.wikipedia.org/wiki/Curved_spacetime", "https://en.wikipedia.org/wiki/Mass", "https://en.wikipedia.org/wiki/Boundary_(topology)", "https://en.wikipedia.org/wiki/Event_horizon", "https://en.wikipedia.org/wiki/Gravitational_singularity", "https://en.wikipedia.org/wiki/Curvature_of_spacetime", "https://en.wikipedia.org/wiki/Gravitational_field" ] },

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

web_crawler_engine-0.1.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

web_crawler_engine-0.1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file web_crawler_engine-0.1.1.tar.gz.

File metadata

  • Download URL: web_crawler_engine-0.1.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for web_crawler_engine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bc4cc3432abfcbf58d5b7c1f329dd92b10af0c74b49c3ad24d6976cb3bdecf4a
MD5 0c0192db1cc1fb4cca5bc500e4395c81
BLAKE2b-256 ade04298992d611f958a782309789f5277e42f436855efd37e23c79bbedce2bf

See more details on using hashes here.

File details

Details for the file web_crawler_engine-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for web_crawler_engine-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fe577d444fcc860cb5881beba860fcb20e836d19829415aabcffbcd5c85fc98
MD5 c9b537cc9928d6dd56e03022d968174b
BLAKE2b-256 4cad51be01dcc308f99b268763616f9396b2e8fb91259859eefbfef6992440d5

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