[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] downloading information



PureBytes Links

Trading Reference Links

Hi Anthony,

Attached a Class file you can use to create a VB6 dll.  I tested it using Microsoft word (though not as a dll ofcourse).

 

Keep in mind this is just and example of how to scrape fundamental data from yahoo’s site.  For it to be more practical, it should be more config driven…i.e. define how to scrape using a config file.  That would make it very generic and it could conceivably be used to scrape in site that shows fundamental/financial data in a name/value pair.

 

To use the file in VB6, you will need to reference Microsft MS XML object.

 

If you are able to compile it successfully, let me know.  Here’s the how to test:

 

Sub test()

    Dim oF As New SecurityFundamentals.Fundamentals

   

    oF.setURL ("http://finance.yahoo.com/q/ks?s=")

    oF.setTicker ("YHOO")

    oF.scrapeFundamentals

   

    MsgBox ("Float: " & oF.getFloat & ", OutShares: " & oF.getOutShares)

   

End Sub

 


From: Dimension [mailto:dimension@xxxxxxxxxxxxx]
Sent: Sunday, November 21, 2004 10:02 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] downloading information

 

First I would try to do a proof of  concept, then clean it up and make it more generic..adding a config file.

 

Just try to convert it.  The class and methods are there.

For WebRequest, I think you can use the Inet.ocx to retrieve the HTML.

For regular expression, if there is any such library or com objects available to VB, use that..other wise, you can just do the parsing in using VB, though it would be much slower.

 

I have Office 2003…let me see if I can use the VBA editor convert some of it and you can fill in the rest and compile…give me an hour or so and I’ll get back to you…

 

 

 


From: Anthony Faragasso [mailto:ajf1111@xxxxxxxx]
Sent: Sunday, November 21, 2004 9:50 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] downloading information

 

Dimension,

 

I have VB6...what would have to be done to convert this....

----- Original Message -----

From: Dimension

Sent: Sunday, November 21, 2004 9:32 PM

Subject: RE: [amibroker] downloading information

 

Hi Anthony,

I created a DLL that does this, but as mentioned at the time, it was done with VS2005.NET, which means it is truly beta stuff.  However I did post the source, see attached email, so if someone wants, the can use that as template to create a dll or script that all can use.

 

This can be improved upon greatly to "scrape" data from any site by using a config file to define how to scrape the data and how to retrieve it. 

I was thinking about modifying to include a config file much like this:

 

URL = "" href="">http://finance.yahoo.com/q/ks?s=

DataItem = Float, (<\\s*td[^>]*>Float:.*?\\s*>.*?>)([\\d|\\.].*?[^a-zA-Z])([a-zA-Z]*)<"

DataItem = OutShares, (<\\s*td[^>]*>Shares Outstanding:.*?\\s*>.*?>)([\\d|\\.].*?[^a-zA-Z])([a-zA-Z]*)<"

 

This would tell me how to find and retrieve the float and outstanding shares from the URL specified and I could then access it by called Fundamentals.getData ("Float").  This code could also be converted to Jscript or VBScript I think.

 

I haven’t done any further work on this as I am currently in the process of setting up AB for use with eSignal (moving from DTN)…and I believe they provide fundamental data in their feeds.

 

-----Original Message-----
From: Anthony Faragasso [mailto:ajf1111@xxxxxxxx]
Sent: Sunday, November 21, 2004 9:13 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] downloading information

 

See the attached image...it could be any ticker....I would like to download

some of this data enclosed by the red lines...this is yahoo

finance....anyone know how to do it...or has anyone created a utility to do

it....

 

Can URLget do it....if so ...How ?

 

Thank you

Anthony

 

 

------------------------ Yahoo! Groups Sponsor --------------------~-->

$9.95 domain names from Yahoo!. Register anything.

http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM

--------------------------------------------------------------------~->

 

Check AmiBroker web page at:

http://www.amibroker.com/

 

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html

Yahoo! Groups Links

 

<*> To visit your group on the web, go to:

    http://groups.yahoo.com/group/amibroker/

 

<*> To unsubscribe from this group, send an email to:

    amibroker-unsubscribe@xxxxxxxxxxxxxxx

 

<*> Your use of Yahoo! Groups is subject to:

    http://docs.yahoo.com/info/terms/

 



Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html





Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html






Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html






Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Attachment: Description: Binary data