On Thu, Mar 5, 2009 at 2:21 AM, June Kim <[email protected]> wrote:
> I can think of a few approaches:
>
> 1) wget and save the html as a file and read it in J
> 2) emulate a http agent (using socket)
> 3) use internetexplorer COM object for e.g.
>
>   wd 'pc internetexplorer'
>   wd 'cc x oleautomation:internetexplorer.application'
>   wd 'oleset x base visible 1'
>   wd 'olemethod x base Navigate http://google.com'
>
>   NB. now you may access Document.body or anything (after checking
> readystate of course)


To get the body HTML:

      wd 'oleget x base Document'
      wd 'oleget x temp body'
      wd 'oleget x temp innerHTML'

>
> (i'm not used to J's ole facility, so there might be some rough cuts
> but you got the basic idea)
>
> On Thu, Mar 5, 2009 at 12:01 AM, Tracy Harms <[email protected]> wrote:
>> I'd like to automate capturing web-page source text using J. I can, of
>> course, continue to copy and paste back and forth between my J
>> sessions and a browser, but I'd like to know what would be involved in
>> making a closer connection. What sort of options are there? If there
>> is information on this already on the J wiki, where should I look? I
>> guess what I'm looking for is how to use J as a (simple) web browser.
>>
>> Tracy
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to