YrNo changed their full page forecast link -> Solution here

Hi Wim,

Have had a problem getting the YrNo full page PDF forecast loading over the last few days, and after looking at their site it seems they have changed over to a new one from the 1st Dec 2020.

I found a link to the ‘Old Site’ and had to change the following line in PWS_frames:

 $frm_src[$frame]        = 'https://retro.yr.no/place/'.$yrno_area.'/forecast.pdf';

and now all works again after adding ‘retro’ in front of the link.

Is there a ‘better’ way this can be achieved, or will this be ok??

The ‘Details’ and ‘Hourly’ forecasts still work OK.

Regards,

Andy

Very strange as I am checking it every other day already for months.
The pdf should be automatically changed by the yr.no site to a new version with a more modern “look”
It works OK at the main test site: https://pwsdashboard.com/pwsWDxx/index.php?frame=yrnoPP
and at a second one België - Vlaanderen YrNo Verwachting

All links like the old ones are replaced with a new one without a understandable location, sadly the new link we can not use as there is no way yet to understand the new numerical code f.i. 2-2792482 for the old Belgium/Flanders/Leuven/

https://www.yr.no/place/Belgium/Flanders/Leuven//forecast.pdf  
https://www.yr.no/en/print/2-2792482/forecast.pdf

I have no idea why your link is not changing to the new format automatically.
If you prefer the old look, you could use the “retro” and not the “www” one. Nice find =D>

I myself have to wait, see and test until January when they move everything to the new format.

Wim

P.S. A few moths ago the yr.no scripts already switched to using the new 2021 data format.
Could you please post the link to your website so i can check?

Hi Wim,

Many thanks for looking into this problem which may be something in my set up, as it doesn’t work within the program if I include the ‘WWW’ in the address within PWS_frames.php (but does if typed in direct
using Microsoft Edge) and I just get the following error message - used to work fine on the old site.

My site is local LAN based: http://17c003459371.drayddns.com:8350/pwsWD/

Regards,

Andy


yr.no.jpg

Thanks for finding the work-around then.
Others will face this problem maybe also as I expect a check by yr.no if the request is legitimate (in their eyes)
I will change the subject of your (first) post so that it may attract other solution seekers also.

Wim

Hi Wim,

Been having a further play here, and followed your example using the new ‘number’ system.

After finding the ‘number’ for my location, the following works fine here, and displays the new format :cheers:

$frm_src[$frame]        = 'https://www.yr.no/en/print/2-2792482//forecast.pdf';

Thanks for your assistance.

Andy

Could you please describe (shortly) how you found that number?
Wim

Hi Wim,

Went to the Yr.No site and did a search for my location - after choosing the correct location a forecast page is displayed with the number being shown.

Seems to be working fine, and gave me a couple of choices for forecast area here.

Regards,

Andy


Thanks, I will update the easyweather and file load scripts this weekend for that.

Site in English Yr

Wim

BUMP !

The old settings in PWS_frames.php:

#
# this one is optionally  used if use yrno as forecast
#
if ( $fct_yrno_block_used == true) {
        $frame                  = 'yrnoPP';
        $frm_ttls[$frame]       = 'YrNo Forecast';  // name in menu
        $frm_src[$frame]        = 'https://www.yr.no/place/'.$yrno_area.'/forecast.pdf';
        $frm_frme[$frame]       = true;
        $frm_hgth[$frame]       = 1500;}

The old complete link after the setting from easyweathersetup
https://www.yr.no/place/Belgium/Flanders/Leuven/forecast.pdf will not work anymore.

Solution 1 change the www to retro

        $frm_src[$frame]        = 'https://retro.yr.no/place/'.$yrno_area.'/forecast.pdf';

That will result in a link Retro.yr.no
Which delivers the old pdf

Solution 2
Visit yr.no/en and browse to your area. In the browser address line you will see a link like this one

https://www.yr.no/en/forecast/daily-table/2-2792482/Belgium/Flanders/Flemish%20Brabant/Leuven

The number to copy is (for my location) 2-2792482
Now change the line in pws frames to

        $frm_src[$frame]        = 'https://www.yr.no/en/print/forecast/2-2792482/';

To be sure make a copy of the script before changing it.
MAKE SURE you leave the quotes and all other characters as they are.

Wim

bump

bump

Many thanks - got it working

I altered the line to https://retro.yr.no/place/‘.$yrno_area.’/forecast.pdf

and then had to enter /United_Kingdom/England/Long_Sutton~7301777/ in the setup and it now works perfectly.

Although I might go back to the Wunderground forecast as the top left block just says “Have A Nice Day” (and I assume warnings) instead of a mini forecast

My YrNo Forecast page accessed from the menu is no longer working, and I am wondering whether they might have changed their url structure.

In the setup it states: -

“Go to yr.no website and search for a city nearby your location.
The browser line will show AFTER https://www.yr.no/place/
the area description. For my area it is Belgium/Flanders/Leuven/”

The YrNo url for my town is: -

https://www.yr.no/en/forecast/daily-table/2-2633863/Great%20Britain/England/Dorset/Wimborne%20Minster/

Entering “Great%20Britain/England/Dorset/Wimborne%20Minster/” into the settings returns a “Something went wrong” error when the page is opened. However when I enter Wimborne Minster into the “Search for a location…” box displays the page correctly.

I have noticed this on other pages I have looked at too.

My PWS Dashboard url is https://www.mytempestuk.com/pwsWD/index.php

The temporary fall back to the old PDF seems not to work anymore (or not in your case).

PWS_frames.php line 97 now reads

        $frm_src[$frame]        = 'https://retro.yr.no/place/'.$yrno_area.'/forecast.pdf'  #### 2021-03-27

change that to

https://www.yr.no/en/print/forecast/2-2633863/Great%20Britain/England/Dorset/Wimborne%20Minster

Succes, Wim

P.S. I will add your question to the main yr.no topic about this problem YrNo changed their full page forecast link -> Solution here

Thank you Wim,

Just to clarify, to get this working in PWS_frames.php I had to change: -

$frm_src[$frame]        = 'https://retro.yr.no/place/'.$yrno_area.'/forecast.pdf';  #### 2021-03-27

To: -

$frm_src[$frame]        = 'https://www.yr.no/en/print/forecast/2-2633863/'.$yrno_area.'/forecast.pdf';  #### 2021-03-27

In the setup I left the YrNo location set as “Great%20Britain/England/Dorset/Wimborne%20Minster/”

@ALL
OK, my fault with copy-paste from translate-google. ​I forgot to type the words “the link”.

In PWS_frames.php line 97 which now reads

$frm_src[$frame] = 'https://retro.yr.no/place/'.$yrno_area.'/forecast.pdf';  #### 2021-03-27

change the link [i]Retro.yr.no
to [i]https://www.yr.no/en/print/forecast/2-2633863/Great%20Britain/England/Dorset/Wimborne%20Minster[/i]

The updated line 97 should read

$frm_src[$frame] = 'https://www.yr.no/en/print/forecast/2-2633863/Great%20Britain/England/Dorset/Wimborne%20Minster';  #### 2021-08-25

= = =
The setting for yr.no is not used anymore in this case.
Probably it also works (in most cases) without the country city name as the yr.no server adds the missing parts.
https://www.yr.no/en/print/forecast/2-2633863/

Succes,
Wim

Wim,

I get an error when I select full screen weather forecast from Yr - “This page is closed”
Landing page informs about hitting a legacy forecast that is no longer in use.
Should I just disable full page menu option under Weather forecast block or is there some updates that I’m missing?


Does this help?

Not at all
The page merly says that this page has been replaced by another solution.
This means that the script needs some changes.

Regards

It was the link to the discussion in that page were the solution is.
http://discourse.weather-watch.com/p/547771
Topic labelled YrNo changed their full page forecast link → Solution here
But there are multiple references to this “solution” all scattered around , all with the same recipe for a solutioin.

Cause: Yr.No is/was gradually changing the old-link → temporary “retri”-link → new link with a city number.
These discussion and the latest version of PWS_frames.php have both the old retro and the number link as examples

if ( $fct_yrno_block_used == true) {
        $frame                  = 'yrnoPP';
        $frm_ttls[$frame]       = 'YrNo Forecast';  // name in menu
        $frm_src[$frame]        = 'https://retro.yr.no/place/'.$yrno_area.'/forecast.pdf';  #### 2021-03-27
        $frm_frme[$frame]       = true;  #https://www.yr.no/en/print/forecast/2-2792482/Belgium/Flanders/Flemish%20Brabant/Leuven
        $frm_hgth[$frame]       = 1500;}

The only change i can do, is remopve the link from the PWS_frames script, I doubt that is necessary.

As described, in all the posts, you yourself have to find that number.

Wim

P.s. I will merge your question into the other topic later today