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 C’est N’es Pas Banana C’est N’es 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
Release history Release notifications | RSS feed
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.1.7.tar.gz
(9.0 kB
view hashes)
Built Distribution
Close
Hashes for html_hyperframe-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3892b02f6b3feb3068318c79544c77334dd73c64a5d7571d2f672cebed9aa9c2 |
|
MD5 | 97b9852be948b2c400aeb674b3439153 |
|
BLAKE2b-256 | 17a9ba2b0b36f03f527da78e3c92194dacbd61f0336ff971db801c9ad4a778eb |