I am attempting to get quotes from several swedish lists of stocks like this:
Expand|Select|Wrap|Line Numbers
- data = {
- 'selected': "SEIO"
- }
- urldata = urllib.urlencode(data)
- f = urllib.urlopen("http://fp.ecovision.se/list.aspx?settings=Standard2",urldata)
Looking into the source of the webpage http://fp.ecovision.se/list.aspx?settings=Standard2, I find the following javascript code:
Expand|Select|Wrap|Line Numbers
- <!--
- function __doPostBack(eventTarget, eventArgument) {
- var theform;
- if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
- theform = document.EcovisionForm;
- }
- else {
- theform = document.forms["EcovisionForm"];
- }
- theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
- theform.__EVENTARGUMENT.value = eventArgument;
- theform.submit();
- }
[HTML]<select name="SelectList" onchange="__doPostBack('SelectList','')" language="javascript" id="SelectList" class="efaText">
<option value="OMXSLCAP">SSE Large Cap</option>
<option value="OMXSMCAP">SSE Mid Cap</option>
<option value="OMXSSCAP">SSE Small Cap</option>
<option selected="selected" value="SESHNGEQ">NGM Equity</option>
<option value="SESHTORG">Aktietorget</option>
<option value="SESHNYMA">First North</option>
<option value="SESHNGOT">Nordic OTC</option>
<option value="SEIO">beQuoted inofficiella</option>
<option value="SESHAEUR">Euronoteringar</option>
[/HTML]
I thought I understood the code, but obviously I am too much of a novice especially in javascript. Could anyone help me out? I am just getting started with urllib and this is an ideal exercise since I am interested in stock markets... ;)