Skip to main content

A crawler

Project description

PY_4

This is a website statistics/benchmarking tool which helps to crawl data from websites and generate reports in YAML, HTML, JSON, CSV format. It helps to inmplement a command line utility which gathers statistics of a website.

This utility will also gather a list of broken links, a list of links leading to external websites, and loading time for each web page on the website. The command-line utility will crawl the entire website to collect the statistics and also store them into a local database. It will also provide an option to generate a report on a terminal standard output or an HTML file for the statistics collected.

This utility includes the following modules:

  1. Website Crawler : crawler.py
  2. Statistics Data Model : storage.py
  3. Report Generator : representation.py
  4. Command Line Parser : command_parser.py

Website Crawler

It crawls each page in websites concurrently and handles all the errors and exceptions.

Statistics Data Model

It stores the crawling statistics into an organised format in the database. It provides an abstraction for storing statistics and extracting them for reports.

Report Generator

It helps to generate reports on standard output or to a file. Formats accessible are YAML(default), HTML. It also has a provision to add new report generator components to generate report in JSON formats, CSV formats, etc. as a plugin without affecting other components of the application.

Command Line Parser

It is responsible for parsing command line arguments and generating web response data formats and utility helpers.

It can run as an application, by running the command './website-stats.py' with command-line arguments in windows / mac terminal. It is also be possible to load it as a module within python program using the package website_stats.

Requirements:

pip install pyyaml To generate yaml report

Package

This final build can be used as a standalone installable package or as a developer library that can be loaded as a module and extended in another python application.

You just need to run this command on terminal: pip install pycrawler

You can use this library in your module using the below line: from PY_4 import website_stats

Include this in your main: if name == 'main': website_stats.run()

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

pycrawler_04-0.0.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

pycrawler_04-0.0.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file pycrawler_04-0.0.1.tar.gz.

File metadata

  • Download URL: pycrawler_04-0.0.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for pycrawler_04-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b170fb62c3b927ca7a28fe429d58a56a0dee19cf3d469ccf5fa11c1cedab1989
MD5 14ca75367e2441e1471edf45e71a1594
BLAKE2b-256 09d2e3d4bb93253021a862541a0d4352a797bfc44f8b81d9af5f0f833e6c1161

See more details on using hashes here.

File details

Details for the file pycrawler_04-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pycrawler_04-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for pycrawler_04-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 66aa0d94f213a3907888fb40d1da667fda0f715d36394ca4c02567dda4546cc9
MD5 238f2c768cd0a84b2ca909e7e8825529
BLAKE2b-256 b1c8f50e907178716cced0ce8bdfffd73bf4f19f8bd7cae2d8cf7a7fabea5e7e

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