Skip to main content

HTML for NLP

Project description

HTML for NLP

Installation

pip install git+https://github.com/druskacik/html_for_nlp

Usage

import requests
from html_for_nlp import HTMLDocument

r = requests.get('https://google.com')

doc = HTMLDocument(r.content)

print(doc.full_text)

Output:

<[document]>
Google
Vyhľadávanie
<a>
Obrázky
</a>
<a>
Mapy
</a>
<a>
Play
</a>
<a>
YouTube
</a>
<a>
Správy
</a>
<a>
Gmail
</a>
<a>
Disk
</a>
<a>
Ďalšie
»
</a>
<a>
História hľadania
</a>
|
<a>
Nastavenia
</a>
|
<a>
Prihlásiť sa
</a>
<a>
Rozšírené vyhľadávanie
</a>
<span>
<a>
Reklama
</a>
<a>
Riešenia pre firmy
</a>
<a>
Všetko o Google
</a>
<a>
Google.sk
</a>
<p>
© 2023
</p>
</span>
</[document]>

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_for_nlp-0.0.2.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

html_for_nlp-0.0.2-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page