URLMonLibrary

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

URLMonLibrary

Peter Kenny-2
Hi All

I am trying to automate the downloading of regularly updated information
from the web. I would like to avoid the complications of using the Internet
Explorer control, so I have been trying to use
URLMonLibrary>>urlDownload:toFile or alternatively IStream class>>onUrl:,
which also uses features of URLMonLibrary. The system seems to work when the
download is from a 'standard' URL, but the input I need to get my data
includes an asp query; the full line is:
'http://www.statistics.gov.uk/STATBASE/tsdataset.asp?vlnk=7174&More=N&All=Y'
Whenever I try this, the call fails in URLMonLibrary with the HRESULT value
16r800C0008 (Unknown facility). The comments in some of the URLMonLibrary
methods say that the HRESULT values are not all documented. Does anyone have
any experience of using such calls, or can say whether the presence of the
asp query will stop it working?

If not, I fear it will be back to the IE control (sigh).

Many thanks

Peter Kenny


Reply | Threaded
Open this post in threaded view
|

Re: URLMonLibrary

Tim M
Are you expecting to get series information on that page? As I just get a
web page where I have to fill in some date, time boxes... which makes me
wonder if you have a cookie or something in your browser and this might be
whats giving you the problem?

Tim

> Hi All
>
> I am trying to automate the downloading of regularly updated
> information from the web. I would like to avoid the complications of
> using the Internet Explorer control, so I have been trying to use
>
URLMonLibrary>>> urlDownload:toFile or alternatively IStream
URLMonLibrary>>> class>>onUrl:,
URLMonLibrary>>>

> which also uses features of URLMonLibrary. The system seems to work
> when the download is from a 'standard' URL, but the input I need to
> get my data includes an asp query; the full line is:
> 'http://www.statistics.gov.uk/STATBASE/tsdataset.asp?vlnk=7174&More=N&
> All=Y' Whenever I try this, the call fails in URLMonLibrary with the
> HRESULT value 16r800C0008 (Unknown facility). The comments in some of
> the URLMonLibrary methods say that the HRESULT values are not all
> documented. Does anyone have any experience of using such calls, or
> can say whether the presence of the asp query will stop it working?
>
> If not, I fear it will be back to the IE control (sigh).
>
> Many thanks
>
> Peter Kenny
>


Reply | Threaded
Open this post in threaded view
|

Re: URLMonLibrary

Peter Kenny-2
I was expecting a series, so clearly there is some problem in my url. I got
there by clicking a button in a previous page, and the page with the series
data has the url I quoted in its title bar. As far as I can see, the site
has not put a cookie in my system. It just seems that the call will not work
if I have an asp in the url. Maybe I will have to use IE, and program it to
simulate a button push.

Thanks

Peter

"macta" <[hidden email]> wrote in message
news:[hidden email]...

> Are you expecting to get series information on that page? As I just get a
> web page where I have to fill in some date, time boxes... which makes me
> wonder if you have a cookie or something in your browser and this might be
> whats giving you the problem?
>
> Tim
>
>> Hi All
>>
>> I am trying to automate the downloading of regularly updated
>> information from the web. I would like to avoid the complications of
>> using the Internet Explorer control, so I have been trying to use
>>
> URLMonLibrary>>> urlDownload:toFile or alternatively IStream
> URLMonLibrary>>> class>>onUrl:,
> URLMonLibrary>>>
>> which also uses features of URLMonLibrary. The system seems to work
>> when the download is from a 'standard' URL, but the input I need to
>> get my data includes an asp query; the full line is:
>> 'http://www.statistics.gov.uk/STATBASE/tsdataset.asp?vlnk=7174&More=N&
>> All=Y' Whenever I try this, the call fails in URLMonLibrary with the
>> HRESULT value 16r800C0008 (Unknown facility). The comments in some of
>> the URLMonLibrary methods say that the HRESULT values are not all
>> documented. Does anyone have any experience of using such calls, or
>> can say whether the presence of the asp query will stop it working?
>>
>> If not, I fear it will be back to the IE control (sigh).
>>
>> Many thanks
>>
>> Peter Kenny
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: URLMonLibrary

Schwab,Wilhelm K
In reply to this post by Peter Kenny-2
Peter,

> Hi All
>
> I am trying to automate the downloading of regularly updated information
> from the web. I would like to avoid the complications of using the Internet
> Explorer control, so I have been trying to use
> URLMonLibrary>>urlDownload:toFile or alternatively IStream class>>onUrl:,
> which also uses features of URLMonLibrary. The system seems to work when the
> download is from a 'standard' URL, but the input I need to get my data
> includes an asp query; the full line is:
> 'http://www.statistics.gov.uk/STATBASE/tsdataset.asp?vlnk=7174&More=N&All=Y'
> Whenever I try this, the call fails in URLMonLibrary with the HRESULT value
> 16r800C0008 (Unknown facility). The comments in some of the URLMonLibrary
> methods say that the HRESULT values are not all documented. Does anyone have
> any experience of using such calls, or can say whether the presence of the
> asp query will stop it working?
>
> If not, I fear it will be back to the IE control (sigh).

Have you tried Steve's HTML client?  The MS binaries have some weird
interactions with IE (e.g on/off line setting), and they of course share
its security problems.  Since you are interested in one site, it would
likely need to be hacked for there to be a risk on the latter, but once
this works you might want to expand to other sites.

Have a good one,

Bill


--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: URLMonLibrary

Peter Kenny-2
"Bill Schwab" <[hidden email]> wrote in message
news:JauAf.4104$[hidden email]...

>
> Have you tried Steve's HTML client?

Thanks for the suggestion, Bill. I will look at it. However, the problem
with the URL that Tim identified (see post above) may mean I have to stick
to IE. The site seems to be designed with manual access in mind, and it
looks as though addressing it just by inputting a URL is difficult.

Thanks again

Peter


Reply | Threaded
Open this post in threaded view
|

Re: URLMonLibrary

Blair McGlashan-3
In reply to this post by Peter Kenny-2
"Peter Kenny" <[hidden email]> wrote in message
news:[hidden email]...
>I was expecting a series, so clearly there is some problem in my url. I got
>there by clicking a button in a previous page, and the page with the series
>data has the url I quoted in its title bar. As far as I can see, the site
>has not put a cookie in my system. It just seems that the call will not
>work if I have an asp in the url. Maybe I will have to use IE, and program
>it to simulate a button push.
>

Sounds like its expecting a postback. The URLMon dll calls you are accessing
are performing an HTTP GET. I think you would be better off using Steve
Warings HTTP client.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: URLMonLibrary

Peter Kenny-2
"Blair McGlashan" <[hidden email]> wrote in message
news:[hidden email]...

> Sounds like its expecting a postback. The URLMon dll calls you are
> accessing are performing an HTTP GET. I think you would be better off
> using Steve Warings HTTP client.
>
Thanks Blair. You are quite right, it does expect a POST. I have installed
Steve Waring's package, and have managed to solve my problem. I couldn't get
the POST to work, but I found another route involving only GET calls. Just
for future reference, could anyone tell me where I went wrong. The method
SptHTTPRequest>>send is described as:
Send the request with no entity (typical for a GET Request).

Since the whole point of POST is to send the entity, how do I do that?

This group really is marvellous! Not only solving my Smalltalk problems, but
diagnosing HTML problems as well - and on a Sunday too!

Thanks to all who posted - and also to Steve for  such a clever package.

Peter