<div dir="ltr"><br clear="all"><div style>Hi Racket users,</div><div style><br></div><div style>I'm trying to extract some information from a webpage.</div><div style>First attempt is to read the complete page</div><div style>
Later i will try to filter the StockPrice and Volume at a certain time</div><div style>The goal is to calculate what direction the StocPrice is moving in</div><div style>multiplied by the number of Stocks that changed owner during vast amounts of time.</div>
<div style>Like if it was a moving/accelerating mass in fysics and you want to know it's momentum</div><div style>The value of this program is void.</div><div style>It's just for fun.</div><div style><br></div><div style>
The first problem I encounter is that reading the webpage stops at the first curly bracket<br></div><div style><br></div><div style><div>#lang racket</div><div>(require net/url)</div><div>(define GLE (get-pure-port (string->url "<a href="http://www.tijd.be/beurzen/Societe_Generale.360017048">http://www.tijd.be/beurzen/Societe_Generale.360017048</a>")))</div>
<div>(define readPage</div><div> (lambda (ticker)</div><div> (read/recursive ticker)))</div><div>(define readMore</div><div> (lambda ()</div><div> (let ([length (pipe-content-length GLE)]) </div><div> (if (< (file-position* GLE) length) ((display (readPage GLE)) (readMore)) (print 'Finished)))))</div>
<div><br></div><div style>(readMore)</div><div style><br></div><div style><br></div><div style>error --> .....ascript>djConfig=. read: unexpected `}'</div><div style><br></div><div style><br></div><div style>Sorry for the naive code, i'm just a beginner.</div>
<div style><br></div><div style>Thanks in advance</div></div><div style> </div><div style>Frank</div></div>