Page 1 of 1

Tides

Posted: Sun Sep 29, 2019 9:58 am
by livejerseyweather
Hi all
Not sure if anyone else has issues but it appears I no longer have data for the tide block I am getting a Data N/A on mine and looking at some of yours you appear to have the same? Any ideas?

Thanks

Ethan

Re: Tides

Posted: Sun Sep 29, 2019 9:29 pm
by hcorrin
Hi
mine is the same but it is getting the cache file but it is 145kb it was 79kb so something has changed

Re: Tides

Posted: Thu Oct 03, 2019 9:02 pm
by chrimu
Yepp, same here (N/A)…

Cheers,
Christian

Re: Tides

Posted: Fri Oct 04, 2019 4:04 am
by John B
Indeed, Ethan, you are not alone. :(

Re: Tides

Posted: Sat Oct 05, 2019 3:52 am
by lemimi
Same for me too.
Have a nice day ... Michel

Re: Tides

Posted: Thu Oct 10, 2019 9:09 pm
by meteocaldas
Same problem here :cry:

I have been cheking the link that the tidesBlock.php uses to parse tide times, and it seems ok, but... it has a different "look" from the page that they had when Jachym wrote the script.
This change in page layout is probably the reason why the script isn't working now.

The link to get the tide times is the one we have in settings.php and looks like:
$urlTides = 'https://www.tide-forecast.com/locations/{name of the location-name of country}/tides/latest';

If you put this link on your browser, it will return a valid page and tide times are ok for the referred location, so my conclusion is that the problem is not in the url itself.

I am not an expert and probably I am going to say something ridiculous at any expert eyes, but my idea is :
1- The $urlTides is read in xml and converted to the txt file named cacheTides.txt
2-This file is "parsed" and tide times are then extrated from it.
3- The script was written for a different XML layout and the problem is that current XML layout outputs a cacheTides.txt that can not be parsed with old script.
4 - Unfortunately this process uses XML that is much more difficult for me to understand, compared to a json process, so I am not able to understand how tide times are parsed. Sometimes it is just a matter of changing little things in the original script, but it requires a good knowledge on XML.

In other words, we are totally dependent of the good will of a XML expert to solve the problem :-)

Image

Re: Tides

Posted: Sun Oct 13, 2019 6:19 am
by Jachym
Hi guys,
I looked at the page and I had to delete both the block and the plugin. Even though the URL remained the same, the format of the page is completely different as well as Terms and conditions.

I was unable to find any free API that would provide similar data in a machine-readable format and this page is now copyrighted.

This is unfortunately what happens when you rely on third-party sites. I wish Meteotemplate was self-reliant and I never had to worry about something constantly changing, however this, given the page purpose, will never happen...

Re: Tides

Posted: Sun Oct 13, 2019 11:41 pm
by John B
Thanks, Jáchym, for investigating for us all, 'tis much appreciated, regardless of the disappointing outcome.

Cheers,
John

Re: Tides

Posted: Mon Oct 14, 2019 6:31 am
by lemimi
sniff, sniff,
No problem, I just removed this block.
And a big thank you for all the work done.

Good day everyone ... Michel