The link to the weather channel is incorrect

Bug #1404520 reported by Pat McGowan on 2014-12-20
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Weather App
High
Martin Borho

Bug Description

click the weather channel in the lower right of the app screen.
it is linking to m.m.weather.com so it does not load.
removing the first m. results in success

Related branches

Dario Cavedon (dcavedon) wrote :

Just tried, and I had the same bug (see the attachment).

I'm using mako with Ubuntu 14.10 (r14).

Dario Cavedon (dcavedon) wrote :

The link to Open Weather Map is incorrect too (see attachment), it seems the same problem.

Changed in ubuntu-weather-app:
assignee: nobody → Martin Borho (martin-borho)
status: New → In Progress

Fix committed into lp:ubuntu-weather-app at revision None, scheduled for release in ubuntu-weather-app, milestone alpha-1

Changed in ubuntu-weather-app:
status: In Progress → Fix Committed
dazza5000 (darran-kelinske) wrote :

I think this will still be broken for de.weather.com and any of the other locale specific links:

following the logic I don't think that m.de.weather.com will resolve

    url = "http://m.";
        print("Open link for "+type+" - "+loc_name)
        if(loc_name.search(/^de_/) > -1) {
            url += "de.weather.com/";
            if(type) url += ((type === "10day") ? "10tage/" : "stündlich/");

        } else if(loc_name === "en_US" || loc_name === "en-CA") {
            //url += "www.weather.com/"; //desktop
            url += "weather.com/";
            if(type) url += "weather/"+((type === "10day") ? "tenday/" : "hourbyhour/graph/");

        } else if(loc_name.search(/^en_/) > -1) {
            url += "uk.weather.com/";
            //if(type) url += "weather/"+((type === "10day") ? "10day-" : "hourByHour-"); //desktop
            if(type) url += ((type === "10day") ? "10day/" : "hourly/");

        } else if(loc_name.search(/^fr_/) > -1) {
            url += "fr.weather.com/";
            if(type) url += ((type === "10day") ? "10jours/" : "horaire/");

        } else if(loc_name.search(/^es_/) > -1) {
            //url += "espanol.weather.com/"; //desktop
            // if(type) url += "weather/"+((type === "10day") ? "10day-" : "hourByHour-"); //desktop
            url += "es.weather.com/";
            if(type) url += ((type === "10day") ? "10días/" : "por_hora/");

        } else if(loc_name === "ja_JP") {
            url += "ja.weather.com/";
            if(type) url += ((type === "10day") ? "10日/" : "1時間ごと/");

        } else if(loc_name.search(/^zh_/) > -1) {
            url += "zh.weather.com/";
            if(type) url += ((type === "10day") ? "10天/" : "1時間ごと/");

        } else if(loc_name === "pt_BR") {
            url += "br.weather.com/";
            if(type) url += ((type === "10day") ? "10dias/" : "toda_hora/");

        } else if(loc_name.search(/^pt_/) > -1) {
            url += "pt.weather.com/";
            if(type) url += ((type === "10day") ? "10dias/" : "cadahora/");

        } else if(loc_name === "ru_RU") {
            url += "ru.weather.com/";
            if(type) url += ((type === "10day") ? "10дней/" : "ежечасно/");
        } else {
            //url += "www.weather.com/"; //desktop
            url += "weather.com/";
            if(type) url += "weather/"+((type === "10day") ? "tenday/" : "hourbyhour/graph/");
        }

        if(type) url += serviceId;
        url += "?par=ubuntu"
        print(url)
        Qt.openUrlExternally(url);
    }

if you go to http://m.de.weather.com/10tage/ you will get:

 Herzlich willkommen bei Weather Channel
Damit wir Ihnen die aktuellsten Wetterinformationen bieten können, geben Sie bitte oben im Feld Ihre Postleitzahl oder Ihren Wohnort ein, und wir kümmern uns um alles. Viel Spaß!

Martin Borho (martin-borho) wrote :

Using the links in the app works as expected and you will get send to the specific forecasts of the location, http://de.weather.com/10tage/GMXX0049?par=ubuntu for example. Or http://de.weather.com/st%C3%BCndlich/GMXX0049?par=ubuntu

I do not think, you'll ever get only "http://m.de.weather.com/10tage/ " opened, since:

        if(type) url += serviceId;
        url += "?par=ubuntu"
        print(url)
        Qt.openUrlExternally(url);

Changed in ubuntu-weather-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers