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
Saving HTML Document in directory
# 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")
# Prints element with attribute ID
print(target_id)
# 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.2.tar.gz
(1.6 kB
view hashes)
Built Distribution
fetchhtml-0.2-py3-none-any.whl
(14.4 kB
view hashes)