POV-Ray : Newsgroups : povray.off-topic : APIs first? : Re: APIs first? Server Time
6 Sep 2024 01:27:06 EDT (-0400)
  Re: APIs first?  
From: Invisible
Date: 2 Apr 2009 04:36:55
Message: <49d47927$1@news.povray.org>
Warp wrote:
> Invisible <voi### [at] devnull> wrote:
>> It's news to me that it's possible to access anything web-based with 
>> something other than a web browser.
> 
>   Why would the http protocol be limited to web browsers?

It isn't. I personally have written a small Haskell program that 
connects to PassMark website, downloads the current benchmark table, and 
gives me a CSV file containing all the current results.

Of course, writing an HTTP client is very nontrivial. If anything 
remotely unusual were to happen, my program would hopelessly fall over. 
More to the point, there's masses of tricky parsing to wade through all 
the presentational HTML to extract the actual raw data I'm after.

(The original plan was to then connect to ebuyer.com and dredge out the 
processor prices and availability - but this turned out to be far too hard.)

The fun part is, if PassMark ever change their presentational HTML (or 
their URLs), my program will spectacularly break.

I wouldn't really call this "interfacing my program to a website". I'd 
call this "a fragile hack which just happens to sort-of work right now".


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.