skip to Main Content

Can someone explain why I can see the content of the html block <apec-offres></apec-offres> when I use "Inspect" in Google Chrome but not when I use "View page source"?
Link

(Ultimately I’d like to access the content of this block via a python script)
Thank you.

2

Answers


  1. When using the "Inspect" feature in Google Chrome, you can see the content of the block because it displays the current state of the webpage, including modifications made by JavaScript. On the other hand, the "View page source" option only shows the initial HTML sent from the server, without any subsequent JavaScript modifications. To access the content of this block using a Python script, you would need to employ web scraping techniques or use a library like Selenium to interact with the page and extract the dynamically generated content.

    Login or Signup to reply.
  2. Run this script a few seconds after page load…

     var D=Frame_ID.contentWindow.document, A=D.querySelectorAll('apec-offres')[0], C=A.cloneNode(true);
    
     alert(C.outerHTML.toString());
    

    If you’re now able to see the inner HTML of the custom element then it’s a simple case of dynamic contents loading late, but if not then we have an interesting mystery case! 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search