I am trying to use the selenium package in python to load up dynamical websites to be saved. But I am having mixed success. I noticed that there is a difference between the pages successfully saved and those not. In the HTML source of the successful ones, I see
<script language="javascript" type="text/javascript">
var PageIsReady = true;
</script>
whereas for the others, the var PageIsReady is false. Is there a way I can trigger off the saving after the variable has turned true?
This stackoverflow question shows how to do the timing out but it looks for the presence of a tag while I want it triggered off the value of a script variable.