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,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")
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.6.tar.gz
(1.5 kB
view hashes)
Built Distribution
fetchhtml-0.6-py3-none-any.whl
(14.3 kB
view hashes)