Python: How to execute a JavaScript Function (with lxml)?
<p>I'd like to parse a website where I need to make a JavaScript call before parsing the code, because exeuting the JavaScript function unfolds more informations that I need to parse.</p>

<p>This is the part where the JavaScript gets called:</p>

<pre><code>&lt;a href="javascript:StartUpdate(DIV_TS_4828_5899,41611,5899,';DIV_TS_0_4820;DIV_TS_4820_4828;DIV_TS_4828_5899',0)"&gt;
    &lt;img src="bilder/check_on.png" width="15" height="15"&gt;
&lt;/a&gt;
</code></pre>

<p>Is it possible to execute this JavaScript function via lxml?
It would be the most comfortable for me, because I would also like to parse the website with lxml afterwards.</p>

<p>I know Selenium could do this, but is there a possibility with lxml?</p>

<p>No, it is not possible to execute JavaScript language by using parser of eXtensible Markup Language, even with module for parsing HyperText Markup Language.</p>

<p>You need to use JavaScript interpreter to execute JavaScript code.</p>

<p>If you really don't like Selenium you may try to use <a href="https://code.google.com/archive/p/pyv8/" rel="nofollow">PyV8</a> or <a href="https://pypi.python.org/pypi/PyExecJS" rel="nofollow">PyExecJs</a>.</p>

javascript python lxml