I'm loading a page using selenium and I want to execute this
<script>
var ep_start = $('#episode_page a.active').attr('ep_start');
var ep_end = $('#episode_page a.active').attr('ep_end');
var id = $("input#movie_id").val();
var default_ep = $("input#default_ep").val();
var alias = $("input#alias_anime").val();
loadListEpisode('#episode_page a.active',ep_start,ep_end,id,default_ep,alias);
</script>
I have no clue how to do it in python, I tried to use the full script
js = '''script'''
browser.execute_script(js)
or just loadListEpisode(...) replacing each one by its equivalent, it's not really working. The script is present on the page so maybe there's a way to directly call it. I tried to extract ep_start, ep_end,.. by hand then doing this
source = BeautifulSoup(...)
var1 = source.find(...)
...
browser.execute_script("loadEpisodeList(var1,var2,...)")
It didn't work too, I don't think it's recognizing them as variables