Skip to main content
added 669 characters in body
Source Link
Jean-Pierre
  • 5.2k
  • 9
  • 15

This url contains raw data:

Import["http://crystalium.materialsvirtuallab.org/crystallium/data/Cu"]

To access the html of the new page, here is a variation of the method provided in a previous answer, targeting polymorph #0 info. Note that I have added a pause to allow time for the script associated with the click to execute (otherwise I get the original html).

session = StartWebSession[]
WebExecute[session, 
 "OpenPage" -> "http://crystalium.materialsvirtuallab.org/"]

cu = WebExecute[session, "LocateElements" -> "CSSSelector" -> "#Cu"]
WebExecute[session, "ClickElement" -> cu]
Pause[2];
html = WebExecute[session, 
  "JavascriptExecute" -> 
   "return document.getElementsByClassName('polymorph')[0].outerHTML;"]

DeleteObject[session]
  

This url contains raw data:

Import["http://crystalium.materialsvirtuallab.org/crystallium/data/Cu"]

This url contains raw data:

Import["http://crystalium.materialsvirtuallab.org/crystallium/data/Cu"]

To access the html of the new page, here is a variation of the method provided in a previous answer, targeting polymorph #0 info. Note that I have added a pause to allow time for the script associated with the click to execute (otherwise I get the original html).

session = StartWebSession[]
WebExecute[session, 
 "OpenPage" -> "http://crystalium.materialsvirtuallab.org/"]

cu = WebExecute[session, "LocateElements" -> "CSSSelector" -> "#Cu"]
WebExecute[session, "ClickElement" -> cu]
Pause[2];
html = WebExecute[session, 
  "JavascriptExecute" -> 
   "return document.getElementsByClassName('polymorph')[0].outerHTML;"]

DeleteObject[session]
  
Source Link
Jean-Pierre
  • 5.2k
  • 9
  • 15

This url contains raw data:

Import["http://crystalium.materialsvirtuallab.org/crystallium/data/Cu"]