Sign in to follow this  
Followers 0
VinodKP

Grab info from webpage

5 posts in this topic

Hi there, I am new to AutoIt.

I am working on a program to get the current stock quote from a web page. But I am not sure how to do that.

I am looking for the data like "Open", "High", "Low", "Last Price" etc from the webpage "http://www.nseindia.com/marketinfo/equities/quotesearch.jsp?companyname=TCS&submit1=go&series=EQ&flag=0".

I tried to get the data using the below code, but was not successful in that. Can anyone help me in getting these data.

#include <Array.au3>
#include <IE.au3>
;~ $Company_Code = "TCS"
$URL = "http://www.nseindia.com/marketinfo/equities/quotesearch.jsp?companyname=TCS&submit1=go&series=EQ&flag=0"
$oIE = _IECreate($URL,0,1, 1, 1)
$oTable = _IETableGetCollection ($oIE)
$iNumTables = @extended
MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page")
For $i = 0 to $iNumTables - 1
    $oTable = _IETableGetCollection ($oIE, $i)
    $aTableData = _IETableWriteToArray ($oTable, True)
    _ArrayDisplay($aTableData, $i)
Next

Share this post


Link to post
Share on other sites



Problem solved >_

Share this post


Link to post
Share on other sites

Please share your new code,I am learning this too.Thanks!

Share this post


Link to post
Share on other sites

Please share your new code,I am learning this too.Thanks!

Here's the code which I used.

#include <Array.au3>
#include <IE.au3>
$Symbol = "TCS"
$Key = $Symbol & "EQN"
$flag = 0
$URL = "http://www.nseindia.com/marketinfo/equities/cmquote_printer.jsp?key=" & $Key & "&symbol=" & $Symbol & "&flag=" & $flag
$oIE = _IECreate($URL,0,0, 1, 1)
$oTable = _IETableGetCollection ($oIE, 4)
$aTableData = _IETableWriteToArray ($oTable, True)
_ArrayDisplay($aTableData, 4)

Let me know how it went >_<

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hi, Watch this topic. I am planning to build a Stock Watch Application which might be useful to you. Are you willing to join me in developing this application?

http://www.autoitscript.com/forum/index.php?showtopic=99739&st=0&p=715370&#entry715370

Edited by VinodKP

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0