SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Web Automation

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Web Automation
Author Message
OFM



Joined: 12 Dec 2002
Posts: 5

Post Web Automation Reply with quote

Recently, the ftp data acquisition site has been discontinued. This means we can no longer use FTPGetFile to obtain the file. The data is available through an http site. For example, http://www3.wcc.nrcs.usda.gov/nwcc/sntl-data0000.jsp?site=482&days=7&state=MT Would like to automate this using new JAL. Have looked at WebGetFile and WebGetPageHTML to no success, as we require the output and not the source http. Ideally, would like to capture a text file of the site, similar to saving the web page to a text file in a browser. Possible?

Thu Dec 12, 2002 4:53 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7966

Post Re: Web Automation Reply with quote

Sorry, I didn't get it. Those are the same.

The "source http" is not the source of the script that produces the output but indead the source of the text of the produced page (just if you Save As in the browser and the open the saved file in Notepad).
The file is the same the display of the file differs in the broser and in the Notepad.

WebGetFile can grab any file type including binary files, anything that can be sent to client by a Web server).

: Recently, the ftp data acquisition site has been discontinued. This means we
: can no longer use FTPGetFile to obtain the file. The data is available
: through an http site. For example,
: http://www3.wcc.nrcs.usda.gov/nwcc/sntl-data0000.jsp?site=482&days=7&state=MT
: Would like to automate this using new JAL. Have looked at WebGetFile and
: WebGetPageHTML to no success, as we require the output and not the source
: http. Ideally, would like to capture a text file of the site, similar to
: saving the web page to a text file in a browser. Possible?

Thu Dec 12, 2002 5:18 pm View user's profile Send private message
OFM



Joined: 12 Dec 2002
Posts: 5

Post Re: Web Automation Reply with quote

Thank you for your quick response. The files do download, however in htm format requiring a browser to view. Within the browser, you can then 'save as' text. Is there a way of achieving this with one command in JAL (HTM -> TEXT). The web site is: http://www3.wcc.nrcs.usda.gov/nwcc/sntl-datarpt.jsp?site=482&days=7&state=MT
: Sorry, I didn't get it. Those are the same.

: The "source http" is not the source of the script that produces the
: output but indead the source of the text of the produced page (just if you
: Save As in the browser and the open the saved file in Notepad).
: The file is the same the display of the file differs in the broser and in the
: Notepad.

: WebGetFile can grab any file type including binary files, anything that can
: be sent to client by a Web server).

Fri Dec 13, 2002 12:41 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7966

Post Re: Web Automation Reply with quote

You cannot do it in one line (HTM -> TEXT), but you can write a simple script that uses MS Word or other application to do the HTML to TEXT conversion. See COM automation examples provided in the "Example Jobs.dat" job database file for ideas how you can automate Office applications to do the file conversion job.
You can also use COM automation to control IE Web browser including save as commands, but this can be tricky.

BTW, in order to use data from the download file you still need to parse it even if the file is in TXT format. HTML is still a text file so why to bother converting the file if it can be done in the first place?

: Thank you for your quick response. The files do download, however in htm
: format requiring a browser to view. Within the browser, you can then 'save
: as' text. Is there a way of achieving this with one command in JAL (HTM
: -> TEXT). The web site is:
: http://www3.wcc.nrcs.usda.gov/nwcc/sntl-datarpt.jsp?site=482&days=7&state=MT

Fri Dec 13, 2002 1:26 pm View user's profile Send private message
OFM



Joined: 12 Dec 2002
Posts: 5

Post Re: Web Automation Reply with quote

Thank you SysOp. You run a well thought message board with loads of helpful information. With your help, I have managed to complete my task. We require text, as this is the form we decode data for our near real-time system. Found HTML->TXT converter useful at: http://www.jafsoft.com/detagger/ ; command line orientated and decent price. Again, thank you for your great service in this forum.

: You cannot do it in one line (HTM -> TEXT), but you can write a simple
: script that uses MS Word or other application to do the HTML to TEXT
: conversion. See COM automation examples provided in the "Example
: Jobs.dat" job database file for ideas how you can automate Office
: applications to do the file conversion job.
: You can also use COM automation to control IE Web browser including save as
: commands, but this can be tricky.

: BTW, in order to use data from the download file you still need to parse it
: even if the file is in TXT format. HTML is still a text file so why to
: bother converting the file if it can be done in the first place?

Fri Dec 13, 2002 3:51 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7966

Post Re: Web Automation Reply with quote

You are welcome!

: Thank you SysOp. You run a well thought message board with loads of helpful
: information. With your help, I have managed to complete my task. We
: require text, as this is the form we decode data for our near real-time
: system. Found HTML->TXT converter useful at:
: http://www.jafsoft.com/detagger / ; command line orientated and decent
: price. Again, thank you for your great service in this forum.

Fri Dec 13, 2002 4:52 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.