Skip to main content

No project description provided

Project description

HyperFrame

HyperFrame structures related information in an HTML document by searching for recurrent patterns in its element tree.

An example

Install the package with

pip install html-hyperframe

You can then extract hyperframes from an HTML document with

import requests
from hyperframe import find_and_create_hyperframes

r = requests.get("https://wellhung.co.uk/")
hyperframes = find_and_create_hyperframes(r.content)
hyperframes[22]

...

  (div, class)                                  (div, 0, a, href) (div, 0, a, rel)                 (div, 0, a, title)               (div, 0, a, 0, text) (div, 2, small, class) (div, 2, small, 0, text) (div, 2, small, 1, a, href) (div, 2, small, 1, a, 0, text)
0        title          https://wellhung.co.uk/product/bombshell/         bookmark                          Bombshell                          Bombshell                 artist                       by      /artists/cassandra-yap                  Cassandra Yap
1        title  https://wellhung.co.uk/product/great-vibes-gol...         bookmark  Great Vibes  Gold Chrome Edition  Great Vibes  Gold Chrome Edition                 artist                       by          /artists/ben-rider                      Ben Rider
2        title  https://wellhung.co.uk/product/great-vibes-neo...         bookmark         Great Vibes  Neon Edition         Great Vibes  Neon Edition                 artist                       by          /artists/ben-rider                      Ben Rider
3        title  https://wellhung.co.uk/product/cest-nes-pas-ba...         bookmark              Cest Nes Pas Banana              Cest Nes Pas Banana                 artist                       by               /artists/luap                           LUAP
4        title             https://wellhung.co.uk/product/voyeur/         bookmark                             Voyeur                             Voyeur                 artist                       by      /artists/cassandra-yap                  Cassandra Yap
5        title  https://wellhung.co.uk/product/i-fucking-love-...         bookmark                 I Fucking Love You                 I Fucking Love You                 artist                       by   /artists/carrie-reichardt               Carrie Reichardt
6        title  https://wellhung.co.uk/product/dont-believe-ev...         bookmark  Dont Believe Everything you Think  Dont Believe Everything you Think                 artist                       by   /artists/carrie-reichardt               Carrie Reichardt
7        title            <https://wellhung.co.uk/product/be-kind/>         bookmark                            Be Kind                            Be Kind                 artist                       by   /artists/carrie-reichardt               Carrie Reichardt

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

html_hyperframe-0.2.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

html_hyperframe-0.2.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file html_hyperframe-0.2.0.tar.gz.

File metadata

  • Download URL: html_hyperframe-0.2.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.11.0-1014-azure

File hashes

Hashes for html_hyperframe-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4ed77f59a78b1053dadf6f158cb6d7eabdb82b27d69e7b036e0cc887ddb47e32
MD5 cf37b2ccdf27f5d10b3be2c92d36681d
BLAKE2b-256 dc3fe3d8976beddeaa1d13b73b081e94dd8cf6d4020ec3a8977381613d2e5754

See more details on using hashes here.

File details

Details for the file html_hyperframe-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: html_hyperframe-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.11.0-1014-azure

File hashes

Hashes for html_hyperframe-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35c9797b09adc217954a2c1c0086bb0c5eff761de93c97e144a990a42084a2ba
MD5 483e2496ede36677ed146b60a9b59b70
BLAKE2b-256 958ac66013e2b8cb90639c88565982a5723fff19374ab2f3b2dee429e84caff5

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