Package that stores HTML within a string variable for scraping purposes
Installation
pip3 install fetchhtml
Usage
from fetchhtml import get_html,find_element_by_attribute_value,save_html
Getting HTML of webpage
# Get HTML page of google.com
google_html = get_html("https://www.google.com")
Print HTML out to console
print(google_html)
Find HTML element in HTML
target_id = find_element_by_attribute_value(html, id="gbar")
Print the text of target element
print(target_id[0].text)
Save HTML file
save_html(google_html, "google.html")
Release files for fetchhtml 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fetchhtml-0.6.tar.gz | 1.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fetchhtml-0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / fetchhtml-0.6.tar.gz
| Download URL | fetchhtml-0.6.tar.gz |
|---|---|
| Size | 1.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
762c7e3439e90ca949bb99cd8a4ff5ef823d673de189c8fea3b056096a87a8dc
|
|
BLAKE2b-256 checksum How to use checksums |
4126b3bd53c0fb46804da9db2e1d2c9947dc47734ab4071f08efb78a04250f38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
|
Release files / fetchhtml-0.6-py3-none-any.whl
| Download URL | fetchhtml-0.6-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0279c572669cb4bdc9916b28c74e53f2fbdb1745b49dede2f8ecafebef8451d
|
|
BLAKE2b-256 checksum How to use checksums |
a7e6b69281431f9a7e48d285f19a8f5902a4a567b00398536ff457200430bfe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
|