Skip to main content

No project description provided

Project description

Package that stores HTML within a string variable for scraping purposes

Installation

pip3 install fetchhtml 

Usage

from fetchhtml import get_html
from fetchhtml import find_element_by_attribute_value
from fetchhtml import 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")

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

fetchhtml-0.4.tar.gz (1.5 kB view hashes)

Uploaded Source

Built Distribution

fetchhtml-0.4-py3-none-any.whl (14.3 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