Forum Moderators: phranque

Message Too Old, No Replies

Weather on my site

in Canada

         

wavebird23

6:47 pm on Jun 13, 2004 (gmt 0)

10+ Year Member



I am wondering if there are any services that give current storm conditions for Canada. It must be in celsius. Thanks in advance!

iamlost

7:30 pm on Jun 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Have you checked out:
[weatheroffice.ec.gc.ca ]
Environment Canada allows links to lots of info including city/marine/etc. weather forecasts.

wavebird23

8:21 pm on Jun 13, 2004 (gmt 0)

10+ Year Member



Oops....I forgot to mention that it had to be a script, that would be able to be put on a website.

HughMungus

1:47 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Now that's bizarre. I just looked on weather.com and it appears they cover only the US. WHY? Opportunities lost...

digitalv

2:24 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you know of a site that has the information on it, like a local news site or something, you could always scrape their page. Write a script to retrieve their page then parse it out to get the data you want.

Do two things though:

(1) DON'T do it in real-time - have it run every once in a while and store the data locally so you don't waste their bandwidth, and

(2) Give them credit for providing you with the info.

rogerd

3:30 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Digitalv, I'm neither an IP lawyer nor an expert on Canadian laws, but scraping someone else's site and republishing the info on yours is almost certainly a copyright violation, with or without credit. You'd have to squeeze through some kind of fair use loophole, and I'd say that would be a tight squeeze indeed.

digitalv

4:59 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In this particular case it wouldn't be illegal because you're simply automating a task that you could otherwise do manually.

If you were to visit that site in your web browser, look at the temperature, and update your own database with whatever that number was, you're not stealing copyright-protected material - you're just copying down the current temperature.

If you write a program that does essentially the same thing, no laws have been broken. Your program is visiting their site, looking at the temperature, and updating your database.

moltar

6:33 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just did a little JavaScript like that myself... It all kinda happened to play around. After I included it as a desktop item in Windows.

Weather.ca (TheWeatherNetwork.com) has a little desktop program to show weather updates in the tray. I used socket spying program and identified the way they get the weather data into the program. They have a separate server for XML output of the weather.

The only thing is, each Canadian city is represented as an integer. If need it for one city - it is fairly easy. Just choose that city from the list in the program and look into socket communication - you will see the ID of city in the query to the script, then you could just do the same query, parse XML and have the weather for that city. If you want the weather for all the cities, it will be rather difficult, as you would have to check the ID of each city to find out it's name.

And no, the XML does not return the name of the city, so you would not be able to just run a query from 1 to N IDs and get all the city names. It does return airport code though...

moltar

6:37 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not nearly nice and readable code, but I made it for personal use only... It gets weather for Ottawa Airport. The city ID is bolded.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />


<title></title>

<style type="text/css" media="screen">
body {
padding: 0;
margin: 0;
}
#weather {
width: 200px;
padding: 10px;
float: right;
font-size: 12px;
}
#weather a {
color: black;
}
#weather a:hover {
color: #708090;
}
</style>

<script type="text/javascript" language="javascript">

function get_weather() {
var address = "http://weathereye5.mmtwn.pelmorex.com/PTiWeatherEye/WeatherEye.dll/GetPlaceData?PlaceCode=[b]CAON0512[/b]&UserId=200000&Version=1.0.0.2&PVersion=9&firstCon=0";

var xmlDoc;
var moz = (typeof document.implementation!= 'undefined') && (typeof
document.implementation.createDocument!= 'undefined');
var ie = (typeof window.ActiveXObject!= 'undefined');

if (moz) {
xmlDoc = document.implementation.createDocument("", "", null)
xmlDoc.onload = readXML;
} else if (ie) {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
while(xmlDoc.readyState!= 4) {};
}
xmlDoc.load(address);

var data = xmlDoc.getElementsByTagName("data");
var ObsDescriptionEn = data[0].getElementsByTagName("ObsDescriptionEn");
var ObsTemp = data[0].getElementsByTagName("ObsTemp");
var ObsDate = data[0].getElementsByTagName("ObsDate");
var ObsWdir = data[0].getElementsByTagName("ObsWdir");
var ObsWSpeed = data[0].getElementsByTagName("ObsWSpeed");
var ObsHumid = data[0].getElementsByTagName("ObsHumid");
var ObsPress = data[0].getElementsByTagName("ObsPress");

var weather = '';

// temperature
weather += "<b>Temp:</b> ";
weather += ObsTemp[0].firstChild.nodeValue;
weather += "&deg;C<br />";

// Condition
weather += "<b>Condition:</b> ";
weather += ObsDescriptionEn[0].firstChild.nodeValue;
weather += "<br />";

// Wind
weather += "<b>Wind:</b> ";
weather += ObsWdir[0].firstChild.nodeValue;
weather += " ";
weather += ObsWSpeed[0].firstChild.nodeValue;
weather += " km/h<br />";

// Humidity
weather += "<b>Humidity:</b> ";
weather += ObsHumid[0].firstChild.nodeValue;
weather += "%<br />";

// Pressure
weather += "<b>Pressure:</b> ";
weather += ObsPress[0].firstChild.nodeValue;
weather += " kPa<br />";

// Updated
weather += "<b><a title=\"Click to update data\" href=\"\" onclick=\"write_it(get_weather(), 'weather'); return false;\">Updated</a>:</b> ";
weather += ObsDate[0].firstChild.nodeValue;
weather += "<br />";

return weather;
}

function write_it(text,id)
{
var x;
var text2;

if (document.getElementById)
{
x = document.getElementById(id);
x.innerHTML = '';
x.innerHTML = text;
}
else if (document.all)
{
x = document.all[id];
x.innerHTML = text;
}
else if (document.layers)
{
x = document.layers[id];
text2 = '<P CLASS="testclass">' + text + '</P>';
x.document.open();
x.document.write(text2);
x.document.close();
}
}

</script>
</head>
<body onload="write_it(get_weather(), 'weather'); setInterval('write_it(get_weather(), \'weather\')', 1000*60*60)">
<div id="container">

<div id="weather"></div>

</div>
</body>
</html>

Marcia

6:38 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is more than likely a violation to scrape content by any means without prior written permission from the site owner.

If they catch it and don't like it they can have the site dumped from search engines or even dropped by their hosting company. Then people whine and wonder why they're victims.

moltar

6:49 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I didn't see anything against using their XML servers to get the data myself for my use in the TOS. They mention that you cannot take data from weather.ca for any other than personal use, but the data in the program is not coming from weather.ca domain/website, some other third party server.

I though know that it is not really ethical to do that kind of thing, but then again, I only do it for personal use, I don't include that into my website, I just have it on my desktop, I don't like their software they use. It takes 8mb of memory just to show temperature...

edit_g

6:49 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In this particular case it wouldn't be illegal because you're simply automating a task that you could otherwise do manually.

Hold your horses there - that's the lamest excuse I've ever heard! That's like saying that I can automatically scrape content from your site and publish it on mine because people can just read it on your site anyhow.

Be careful with this sort of stuff - I've licensed weather information for a good few sites, including content from Weather.com - and you do need to at least approach them!

moltar

6:52 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also place a button [weather.ca] on your website, but it is not customizable.

Brett_Tabke

10:20 am on Jun 14, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Double check their TOS. That sounds illegal to me. Automating a task to put the content in front of you is fine - automating it to redistribute it is not.

On the other hand, there are Govt services around the world that do give out free data. The US weather service (NOAA) does give out free forecasts for usage. You can use HamWeather to pull the data off the Noaa server legally. (I don't know ofanything like that in canada)

Larryhat

10:47 am on Jun 14, 2004 (gmt 0)

10+ Year Member



This may seem silly but ...

Depending on the actual location in Canada, could you generate your own weather info? Depending on the season, a simple algorithm might indicate "cold, colder, still colder" .. etc.

Since its all yours, there are no copyright issues. -LH

photon

12:42 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Take a look at the 'Weather Stickers" on WeatherUnderground [weatherunderground.com]. Don't be fooled by their front page. They do offer international (i.e., outside of the U.S.) forecasts as well.

digitalv

1:38 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Guys, you seem to be forgetting that the current temperature is not copyrightable content. You can't go to their site and copy their news articles whether you do it manually or automatically but you CAN copy down the current TEMPERATURE and put it on your site.

How you retrieve it doesn't matter. There are no laws against this. Some may consider it "unethical" to do it without asking, but it is NOT illegal.

Marcia

1:47 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>current temperature is not copyrightable content

The *fact* about the weather isn't what's proprietary BUT the other party's presentation of it certainly is. You cannot just take someone's presentation off their site without their permission. Scraping a site to take what they've put on is taking their presentation and it's not only unethical but if they complain it can have disastrous consequences.

We are not attorneys here, the safest bet is to pursue legal counsel to know for an absolute 100% fact. I for one sure don't want anyone telling me absolutely that something is legal and fine that may not be. If they're wrong I'm left holding the bag - not the person who gave the incorrect information.

The safe way to proceed when something is questionable: when it doubt, leave it out.

encyclo

2:14 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you just want a "Weather Button" for a particular Canadian city?

If you need it in French, try [meteomedia.com...] or in English, [theweathernetwork.com...] (both the same company). Might be just what you need.

digitalv

3:03 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Scraping a site to take what they've put on is taking their presentation and it's not only unethical but if they complain it can have disastrous consequences.

I'm having trouble understanding what part of this you think is wrong. If you were to visit their site in your browser and copy/paste the information into your database so it could be displayed on your own site you're not doing anything wrong. In fact, I don't know of any news source that would even mind - Especially if you went so far as to give them credit for being the "source" of the info.

Doing this is not illegal, unethical, immoral, etc. What I'm having trouble understanding is why you seem to think it magically "becomes" illegal when you write a program to automate what you would otherwise be doing manually. It's not illegal by any means. You're not stealing the radar charts or anything like that, you're taking uncopyrighted PUBLIC INFORMATION. The method you retrieve it makes no difference.

richlowe

4:32 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[hamweather.com...]

[edited by: rogerd at 4:49 pm (utc) on June 14, 2004]
[edit reason] Fixed link [/edit]

lawman

4:53 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hey digitalv, how about entering into a contract with those who want to take your advice whereby you will agree to pay any legal fees they might incur as a result of taking such advice.

digitalv

6:05 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey digitalv, how about entering into a contract with those who want to take your advice whereby you will agree to pay any legal fees they might incur as a result of taking such advice.

Fine with me ... I'm not sure about Canada's laws, but in the US weather is a public service provided by the National Weather Service and funded by the U.S. Government. You are not guilty of any crime if you post the weather on your site regardless of whether you get it there by typing it manually or automating it.

lawman

6:11 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hey DV, you sound a little confused regarding the difference between civil and criminal matters.

Marcia

6:18 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>US weather is a public service provided by the National Weather Service and funded by the U.S. Government.

Exactly. 100% correct - and any web page put up by the US Government is considered to be in the public domain, therefore not protected by copyright law. Not so with any privately owned entity - they are not supported by taxpayers funds.

Lighten up and enjoy life dude, it's OK to be wrong. It happens to even those of us who are exceedingly brilliant. ;)

digitalv

8:49 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok fine, then scrape it from a government weather service instead of a local news channel. Problem solved :P

Marcia

9:00 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>scrape it from a government weather service

Now you're cooking with gas! If there's gonna possibly be any problem, might as well go for the big time and tangle with the Feds. ;)

Another option is that real estate sites often show weather and some get it from commercial sites that let them use it for nothing more than a link back and branding. So those sites get loads of inbound links with anchor text, and then they can sell Page Rank.

Interesting business, isn't it?

yogeniusz

4:41 am on Jun 30, 2004 (gmt 0)

10+ Year Member



Don't know about the US, but in Canada for absolute sure, scraping web content is legal and fair use if credit is given. Any information made freely available on the internet (ie. not protected by usernames or passwords or other authorization schemes) is equivalent to a freely published work, and any published work is subject to fair use (ie... quoting of various parts of it) as long as that use is not substantial duplication without credit fairly given. Copyright notices posted on the internet mean precisely nothing, exactly the same as the so-called "poor man's copyright", unless the associated content is indeed properly copyrighted through a copyright office or other legal entity. Know of many internet publishers who do that? Me neither.

PatrickDeese

4:57 am on Jun 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...in Canada for absolute sure.... Any information made freely available on the internet (ie. not protected by usernames or passwords or other authorization schemes) is equivalent to a freely published work, and any published work is subject to fair use (ie... quoting of various parts of it) as long as that use is not substantial duplication without credit fairly given.
Copyright notices posted on the internet mean precisely nothing, exactly the same as the so-called "poor man's copyright", unless the associated content is indeed properly copyrighted through a copyright office or other legal entity.

IANACIPA I Am Not A Canadian Intellectual Property Attorney

[laws.justice.gc.ca...]

There seems to be a lot of law preserving the rights of publishers and broadcasters.

Are you sure about that? Admittedly I just skimmed this stuff, but I saw enough there to make think that it is protected at the moment of creation.

buckworks

5:23 am on Jun 30, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



in Canada for absolute sure, scraping web content is legal and fair use if credit is given.

WRONG, WRONG, WRONG, WRONG, WRONG!
This 39 message thread spans 2 pages: 39