Get html in string from a page
Project description
Generate HTML in string from URL
# One Single Page Websites also work
# Get html from page
from scraping.scraper import PageSources
page = PageSources('url...')
print(page.get_current_html())
# save data in a directory call web_data
from scraping.scraper import PageSources
page = PageSources('https://andycode.ga/contact')
page.get_current_html()
page.save()
# page.save(directory='web_page') default
When create a file it'll get name of hostPage and amount of file in your directory, like:
-> web_data
-hostPage_1.html
-hostPage_2.html
-hostPage_3.html
...
It need a Google Chrome Driver
To check the version you have of Google Chrome, you can do it from the browser information and in the "Help" section:
- Open a window in the browser.
- Go to the three points in the upper right.
- Choose the "Help" option from the drop-down menu.
- Tap on "Google Chrome Information"
Go to https://chromedriver.chromium.org/downloads select your version, system and download
It will be a file like this:
Copy and paste in your root project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scrape-html-0.0.22.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for scrape_html-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 834bf30dd94a6a336109612e0206b4180e39705bfefdb021ec930b340aa9920e |
|
MD5 | 1ee18a8ddcc46b1f6a8be3096f547a1b |
|
BLAKE2b-256 | c999e96a7ef33a41270dbb5a8639f5e5fabc452ccf65d9a07db0ab62e1effe27 |