GithubHelp home page GithubHelp logo

shrisharaob / html-cluster Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matiskay/html-cluster

0.0 1.0 0.0 546 KB

A command line tool to cluster html pages based on structural and style similarity.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

html-cluster's Introduction

HTML Cluster

Build Status

A command line tool to cluster html pages based on structural and style similarity. This tool was based on Page Compare.

Install

The quick way:

pip install html-cluster

How it works

  1. Download HTML form a list of files.
html-cluster download-html urls.txt
  1. Create a similarity score file.
html-cluster make-score-similarity-file --structural-weight=0.3
  1. Create the graph dot file
html-cluster make-graph similarity_score.json > graph.dot
  1. Render the image
neato -O -Tpng graph.dot

Splash

We use splash to take screenshots. You can use the following bash script to run it using docker

#!/usr/bin/env bash

echo 'Splash is running on http://127.0.0.1:8050'
docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 scrapinghub/splash

Examples of the images generated by the script

Example 1 using Splash

Example 1

Example 2 using Splash

Example 2

Example 2 without using Splash. Default behaviour

Example 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.