i want to get the innerHTML from the webpage. it is using iframe inside a body content in html document of the page.
here is my code am using however nothing seems to be happening. i am also aware that their must be some issue within the code i have here this is why it is not working as it should.
document.querySelectorAll('"body > iframe"')[0].innerHTML;
i have tried this so far and i am looking up around online to see if i could get this working one way or another.
here is the html part of the code extracted manually from the browser debugger tool.
<body><div id="__next"><div id="main" class="jsx-834240835 desktop-container"><div class="jsx-1905932170 header-container white"><div class="jsx-1905932170 header-content"><div class="jsx-1905932170 hamburger-wrapper"><a href="https://www.tiktok.com/en"><a title="TikTok" class="jsx-3359950850 logo-link">/div><iframe src="https://www.tiktok.com/creator#/upload?lang=en/" style="height: 650px; border-style: none; width: 100%; margin-bottom: -6px;"></iframe><div style="visibility: hidden; position: absolute; bottom: 0px; left: 0px; right: 0px; height: 356px; z-index: -1;"></div><div id="creator-center-footer"><div class="jsx-3176438893 footer-container"><footer class="jsx-3176438893 footer-content-wrapper"><div class="jsx-3176438893 tiktok-logo"><div class="jsx-1929089525 logo-container jsx-997609344"><img src="https://lf16-tiktok-web.ttwstatic.com/obj/tiktok-web/tiktok/web/node/_next/static/images/logo-7328701c910ebbccb5670085d243fc12.svg" title="TikTok" class="jsx-1929089525 logo-icon"><img src="https://lf16-tiktok-web.ttwstatic.com/obj/tiktok-web/tiktok/web/node/_next/static/images/logotext-9b4d14640f93065ec36dab71c806e135.svg" title="TikTok" class="jsx-1929089525 logo-text"></div><strong
breaking up part of the html to this so that you can see more better.
`<iframe src="https:
i tried adding the iframe part of the html element to the javascript code i have above however it doesn't seem to do anyting. am sure am doing something wrong and maybe requires more tweaking to the code.