The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Slightly OT: Scraping tide info for house intranet page


  • Subject: Re: Slightly OT: Scraping tide info for house intranet page
  • From: "noel_pilot" <HA@xxxxxxxxxxxxxxxxxx>
  • Date: Tue, 27 May 2008 19:34:43 -0000

Hi Ant,
aah I'm clicking a little bit now, so it doesn't go on/in the webpage
at all it's a server side thing, okeydoke a little deep for me! Cheers
for the offer but I think the benefit to be gained as opposed to using
the igoogle widget probably isn't worth it, (as long as when I test it
on my Ipod touch the widget works!!)
Thanks
Noel

--- In ukha_d@xxxxxxx, ant <blowback@...> wrote:
>
> Hi,
>
> Personally I'd run 'em from a cron job once a day or so to generate a
> static page...sounds like you're on windows tho, and that's really not
> my bag. I can prolly cruft up some php for you if that helps?
>
> cheers
>
> ant
>
> On Mon, May 26, 2008 at 4:17 PM, noel_pilot <HA@...> wrote:
> > Hi Ant,
> > Sorry for questions, that sounds perfect, my coding is almost
minimal,
> > can handle html and a tiny bit of php but not dabbled in much
more,
> > have found both ruby and perl extensions for dreamweaver (what
I'd
> > normally use for sites/editing).  Any tips for how I'd get
started
> > with either of your suggestions or any sample reading material
that
> > might get me going!??!
> >
> > Thanks
> >
> > Noel
> >
> >
> > --- In ukha_d@xxxxxxx, ant <blowback@> wrote:
> >>
> >> Gah, GMail's wrapped it. In the perl, the line starting
"print" and
> >> the next line should be joined. Same with the
"Net::" line in the
> >> ruby.
> >>
> >> ant
> >>
> >> On Mon, May 26, 2008 at 2:35 AM, ant <blowback@> wrote:
> >> > here's a bit of perl that will do the job:
> >> >
> >> > #!/usr/bin/perl
> >> > #
> >> > use LWP::Simple;
> >> >
> >> > $url =
> >
"http://www.bbc.co.uk/weather/coast/tides/tides.shtml?date=20080527&loc=0027";;
> >> > $start_delim = "<!-- tide chart stats open
-->";
> >> > $end_delim = "<!-- tide chart stats close
-->";
> >> >
> >> > my $content = get $url;
> >> >
> >> > if(defined($content)) {
> >> >    print "<table>\n$1\n</table>\n"
if($content =~
> >> > /$start_delim(.*?)$end_delim/s);
> >> > }
> >> >
> >> > Or some Ruby to do the same thing:
> >> >
> >> > #!/usr/bin/ruby
> >> > require 'net/http'
> >> >
> >> > url =
> >
URI.parse("http://www.bbc.co.uk/weather/coast/tides/tides.shtml?date=20080527&loc=0027";)
> >> > start_delim = "<!-- tide chart stats open
-->"
> >> > end_delim = "<!-- tide chart stats close
-->"
> >> >
> >> >
Net::HTTP.get(url).scan(/#{start_delim}(.*?)#{end_delim}/m) { x
> >> > print "<table>\n#{x}</table>\n" }
> >> >
> >> >
> >> >
> >> > cheers
> >> >
> >> > ant
> >> >
> >> >
> >> >
> >> > On Sun, May 25, 2008 at 5:14 PM, Wayne <Wayne@>
wrote:
> >> >> If your ok with a bit of coding - you could always
hack it out in
> > real
> >> >> time :)
> >> >>
> >> >> Wayne.
> >> >>
> >> >> James - SJ Computers wrote:
> >> >>> You could use an iframe (Web Page inside another
web page)
> >> >>>
> >> >>> http://www.w3schools.com/TAGS/tag_iframe.asp
> >> >>>
> >> >>> James
> >> >>>
> >> >>> On Sun, May 25, 2008 at 9:33 AM, noel_pilot
<HA@> wrote:
> >> >>>
> >> >>>
> >> >>>>   awesome good find, thanks, will prob use
that altho
> > interested to know
> >> >>>> how I could have scraped the other info if
anyone knows?!?!
> >> >>>>
> >> >>>> --- In ukha_d@xxxxxxx
<ukha_d%40yahoogroups.com>,
> > "brougham Baker"
> >> >>>> <bro-yahoo@> wrote:
> >> >>>>
> >> >>>>> From: "noel_pilot" <HA@>
> >> >>>>>
> >> >>>>>> Someone on here can hopefully help
me, starting to think
> > about a home
> >> >>>>>> intranet page with all useful stuff
on there and one think I
> > like to
> >> >>>>>> know is tides (i kitesurf as often
as possible).
> >> >>>>>>
> >> >>>>>> Easiest source of information for
this purpose I think is the
> > bbc,
> >> >>>>>>
> >> >>>>> There are other sources-
> >> >>>>>
> >> >>>> http://www.googleminiapps.com/tools/tides-gadget/
> >> >>>>
> >> >>>>> for e.g. That looks to have plain text
output.
> >> >>>>>
> >> >>>>> My work mates also use the one on
iGoogle homepage too.
> >> >>>>>
> >> >>>>> Bro
> >> >>>>>
> >> >>>>>
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>
> >> >>>
> >> >>> [Non-text portions of this message have been
removed]
> >> >>>
> >> >>>
> >> >>> ------------------------------------
> >> >>>
> >> >>> **** Sponsored By http://www.Berble.com ****
> >> >>> ****       Computers You Carry          ****
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >> ------------------------------------
> >> >>
> >> >> **** Sponsored By http://www.Berble.com ****
> >> >> ****       Computers You Carry          ****
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >>
> >
> >
> >
> > ------------------------------------
> >
> > **** Sponsored By http://www.Berble.com ****
> > ****       Computers You Carry          ****
> >
> >
> >
> >
> >
> >
>



------------------------------------


UKHA_D Main Index | UKHA_D Thread Index | UKHA_D Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.