1

I am trying to access an element from a website, however, it is not returning the complete element.

<div id="playcontainer" class="play bigger isnd">
   <div id="dooplay_player_response"> <!--  -->
      <div class="pframe">
         <iframe class="metaframe rptss" src="https://startflix.net/embedPlay.php ..."> <!-- I want this -->
         </iframe>
      </div>
   </div>
</div>
//Using mshtml.IHTMLDocument3
IHTMLDocument3 dom3 = (IHTMLDocument3)wb.Document.DomDocument;
IHTMLElement idDoo = dom3.getElementById("dooplay_player_response");

//Using System.Windows.Forms.HtmlElement
HtmlElement target1 = wb.Document.GetElementById("dooplay_player_response");

string idDooOuter = idDoo.outerHTML;
string target1Outer = target1.OuterHtml;

both idDooOuter and target1Outer are not returning descendant elements from dooplay_player_response, which would be class="pframe".

I've tried using FindByClassName() features but I can't access this element. My intention is to get the code inside the iframe. Could someone help me with this problem?

Edit: Obs. I tried using other programming languages, such as Java, Python, javascript (Tampermonkey) and C ++, in all the results were the same, I can't get this element.

Ruben R.
  • 11
  • 3
  • 2
    I don't think you can get the html from the iframe element. If you want to get the html that is in the iframe, copy it's `src` and get HTML directly from the page. – Jamshaid K. Dec 02 '20 at 04:26
  • @JamshaidK. so, this is what I am not able to do, I can find the element `
    `, but I cannot reach the element `
    `, when I execute the `HtmlElement target1 = wb.Document. GetElementById ("dooplay_player_response");` the Children collection returns 0 elements.
    – Ruben R. Dec 03 '20 at 01:14

0 Answers0