Skip to main content

Get the whole updated HTML source code from every frame (not driver.page_source)

https://stackoverflow.com/a/71763545/15096247

To conclude where as the page source obtained from driver.page_source is more or less is an artist's impression of the DOM Tree, Element.outerHTML gets the serialized HTML fragment describing the element including its descendants.

# Tested with:
# https://github.com/ultrafunkamsterdam/undetected-chromedriver
# Python 3.9.13
# Windows 10

$pip a-selenium-get-source-from-all-frames

from time import sleep
from a_selenium_kill import add_kill_selenium
from auto_download_undetected_chromedriver import download_undetected_chromedriver
import undetected_chromedriver as uc
from a_selenium_get_source_from_all_frames import get_sourcecode_from_all_frames


@add_kill_selenium  # https://github.com/hansalemaos/a_selenium_kill
def get_driver():
    folderchromedriver = "f:\\seleniumdriver2"
    path = download_undetected_chromedriver(
        folder_path_for_exe=folderchromedriver, undetected=True
    )  # https://github.com/hansalemaos/auto_download_undetected_chromedriver
    driver = uc.Chrome(driver_executable_path=path)
    return driver


if __name__ == "__main__":
    folderchromedriver = "f:\\seleniumdriver3"
    path = download_undetected_chromedriver(
        folder_path_for_exe=folderchromedriver, undetected=True
    )
    driver = get_driver()
    driver.get(r"https://demo.guru99.com/test/guru99home/")
    sleep(4)
    source = get_sourcecode_from_all_frames(
        driver,
    )

    
	

Metadata

Release files for a-selenium-get-source-from-all-frames 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for a-selenium-get-source-from-all-frames 0.10
File Size Uploaded Provenance Actions
a_selenium_get_source_from_all_frames-0.10.tar.gz 3.8 kB Without provenance Details for a_selenium_get_source_from_all_frames-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for a-selenium-get-source-from-all-frames 0.10
File Interpreter ABI Platform Actions
a_selenium_get_source_from_all_frames-0.10-py3-none-any.whl Python 3 none any Details for a_selenium_get_source_from_all_frames-0.10-py3-none-any.whl

Total release size: 9.6 kB

Release files / a_selenium_get_source_from_all_frames-0.10.tar.gz

Download URL a_selenium_get_source_from_all_frames-0.10.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e23e83d09827090acfb5c512fd3a71566763033f740ce8bde4fc7943290147d2
BLAKE2b-256 checksum
How to use checksums
47de4d028bef8f2a9e60bec8ef9d0d2df56eaedebfebd55f9a6f943db90a3a6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / a_selenium_get_source_from_all_frames-0.10-py3-none-any.whl

Download URL a_selenium_get_source_from_all_frames-0.10-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72c8c1b9136ad1c1c19aa406e1a69b350a603b30d013ea71cac896d9c04f6941
BLAKE2b-256 checksum
How to use checksums
649b439fe25518e3a500da59684c9bfa6e77323e554f689e6e2d34b6979c1bf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for a-selenium-get-source-from-all-frames 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page