PureBytes Links
Trading Reference Links
|
Hi,
You should search for strings in the html file, and then pull the
information you need. Sample: you search for the string by comparing
strings (from the beginning of the file) "Last Trade:" after found
you jump 41 characters to find the price (offset+41) and so on.
Gedi
--- In amibroker@xxxxxxxxxxxxxxx, "mmqp" <mmqp@xxxx> wrote:
> Dave,
>
> Thanks for responding. My application is to download current AB
> ticker stock quote from Yahoo into a file; I then strip all the
HTML
> junks and search for Open,High,Low,Close,Volume informations and
> insert these into AB. Kind of poor man intraday quotes. I had
this
> working with previous Yahoo format (a bit simpler). Now they
> reformatted their quote page therefore I looked for a more robust
> solution. I know you would ask why not use Amiquote; This is just
a
> start for me because I would like to extend the codes for other
datas
> as fundamentals etc. I was hoping Jscript has a function that
> helping me do this.
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx>
> wrote:
> > in my other life as a programmer, I've built a crude version of
> this using
> > regular expressions, but it's not pretty code and doesn't give
you
> pretty
> > results.
> >
> > a lot depends on the context you're in, how complex and how
> consistent the
> > structure of the documents are, and what kind of result you want.
> will this
> > be running in a browser? a known-to-be-recent version of IE, or
any
> random
> > browser that comes across a public web site's front door?
> >
> > if you have to deal with any and all browsers, you're very
limited
> in what
> > you can do. recent browsers, especially IE, have very
sophisticated
> > scripting addressing a very sophisticated document object model,
> and you can
> > do a lot. I'm not big fan of microsoft, and there's certainly
stuff
> that
> > will make you crazy, but that said, it's pretty powerful.
> >
> > are the documents all the same stucturally, but with different
> content? if
> > they were, say, an h1 followed by 3 h2s, each of which has a
> paragraph of
> > text after it, then an hr with some plain text after it, you (or
I,
> if
> > you're not a js guy) could write something to pull out the text
of
> each of
> > those sections and make it a separate paragraph. if you have some
> control
> > over the documents themselves, you can imbed hidden codes to help
> parsing.
> >
> > are you trying to preserver anything about the formatting? if
> you're just
> > grabbing the text, it's easier, but if it needs to end up as a
Word
> file,
> > for instance, life is harder.
> >
> > I guess the short answer (too late...) is that you should post a
> little more
> > about the actual problem you're trying to solve, and we/I'll give
> it a
> > whirl. write me off list if you want; I'm a web/database developer
> > professionally.
> >
> > Dave Merrill
> >
> > > Does anyone know how to strip all the HTML codes using JSCRIPT?
> TIA
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|