I'm using webparser plugin with wxdata.weather.com to get temperature and weather icon. The problem is weather icon code is not provided for my location. However in the today in the next 6 days forecast icon code is provided. So I need help editing regexp to get correct icon code.
If I open the url in chrome the <icon> value is missing under <cc> section. I recon this is the one parsed by the regexp.
I need to add the <icon> value from <dayf> <day d=0 t="Friday" dt="Dec 15"> <part p=d> <icon>.
DBUG (14:29:09.515) System Info\System Info.ini - [mWeatherRSS]: Fetching: http://wxdata.weather.com/wxdata/weather/local/NOXX0218?cc=*&unit=M&dayf=6
DBUG (14:29:09.970) System Info\System Info.ini - [mWeatherRSS]: Index 0: <weather ver="2.0">
<head>
<locale>en_US</locale>
<form>MEDIUM</form>
<ut>C</ut>
<ud>km</ud>
<us>km/h</us>
<up>mb</up>http://wxdata.weather.com/wxdata/weather/local/NOXX0218?cc=*&unit=M&dayf=6
<ur>mm</ur>
</head>
<loc id="NOXX0218">
<dnam>Honningsvag, 20, Norway
DBUG (14:29:09.978) System Info\System Info.ini - [mWeatherRSS]: Index 1: en_US
DBUG (14:29:09.986) System Info\System Info.ini - [mWeatherRSS]: Index 2: C
DBUG (14:29:09.993) System Info\System Info.ini - [mWeatherRSS]: Index 3: km
DBUG (14:29:10.001) System Info\System Info.ini - [mWeatherRSS]: Index 4: km/h
DBUG (14:29:10.009) System Info\System Info.ini - [mWeatherRSS]: Index 5: mb
DBUG (14:29:10.017) System Info\System Info.ini - [mWeatherRSS]: Index 6: mm
DBUG (14:29:10.025) System Info\System Info.ini - [mWeatherRSS]: Index 7: NOXX0218
DBUG (14:29:10.033) System Info\System Info.ini - [mWeatherRSS]: Index 8: Honningsvag, 20, Norway
DBUG (14:29:10.041) System Info\System Info.ini - [mWeatherRSS]: Index 9: 2:29 PM
DBUG (14:29:10.049) System Info\System Info.ini - [mWeatherRSS]: Index 10: 70.98
DBUG (14:29:10.057) System Info\System Info.ini - [mWeatherRSS]: Index 11: 25.97
DBUG (14:29:10.064) System Info\System Info.ini - [mWeatherRSS]: Index 12:
DBUG (14:29:10.072) System Info\System Info.ini - [mWeatherRSS]: Index 13:
DBUG (14:29:10.080) System Info\System Info.ini - [mWeatherRSS]: Index 14: 1
DBUG (14:29:10.087) System Info\System Info.ini - [mWeatherRSS]: Index 15: 12/15/17 2:00 PM CET
DBUG (14:29:10.094) System Info\System Info.ini - [mWeatherRSS]: Index 16: Honningsvag, 20, NO
DBUG (14:29:10.101) System Info\System Info.ini - [mWeatherRSS]: Index 17: -1
DBUG (14:29:10.108) System Info\System Info.ini - [mWeatherRSS]: Index 18: -8
DBUG (14:29:10.115) System Info\System Info.ini - [mWeatherRSS]: Index 19:
DBUG (14:29:10.123) System Info\System Info.ini - [mWeatherRSS]: Index 20:
DBUG (14:29:10.130) System Info\System Info.ini - [mWeatherRSS]: Index 21: 992.89
DBUG (14:29:10.137) System Info\System Info.ini - [mWeatherRSS]: Index 22: falling rapidly
DBUG (14:29:10.144) System Info\System Info.ini - [mWeatherRSS]: Index 23: 35
DBUG (14:29:10.151) System Info\System Info.ini - [mWeatherRSS]: Index 24: N/A
DBUG (14:29:10.159) System Info\System Info.ini - [mWeatherRSS]: Index 25: 180
DBUG (14:29:10.166) System Info\System Info.ini - [mWeatherRSS]: Index 26: S
DBUG (14:29:10.174) System Info\System Info.ini - [mWeatherRSS]: Index 27: 75
DBUG (14:29:10.182) System Info\System Info.ini - [mWeatherRSS]: Index 28:
DBUG (14:29:10.189) System Info\System Info.ini - [mWeatherRSS]: Index 29: 0
DBUG (14:29:10.196) System Info\System Info.ini - [mWeatherRSS]: Index 30: Low
DBUG (14:29:10.203) System Info\System Info.ini - [mWeatherRSS]: Index 31: -5
DBUG (14:29:10.210) System Info\System Info.ini - [mWeatherRSS]: Index 32: 27
DBUG (14:29:10.217) System Info\System Info.ini - [mWeatherRSS]: Index 33: Waning Crescent
Do you know since when the number of the icon is missing? I suppose you shouldn't have to edit the code yet, because many times the provider encounters such problems, but many times these problems gets fixed quickly .
So, I'd wait a few days, to see if they fix the issue.
The icon still doesn't work. I'm not a stranger to coding at all, but for some reason I've never managed to wrap my head around regex. If someone can help me it will be much appreciated.
Here is the complete code used for temperature and icon.
pepperhole wrote:The icon still doesn't work. I'm not a stranger to coding at all, but for some reason I've never managed to wrap my head around regex. If someone can help me it will be much appreciated.
Right now your code returned -1 for the temperature (probably the temperature there, in Celsius degrees). For the icon, it didn't return nothing, but at least the code works, giving no errors at all. Please check if it also does for you.
balala wrote:Right now your code returned -1 for the temperature (probably the temperature there, in Celsius degrees). For the icon, it didn't return nothing, but at least the code works, giving no errors at all. Please check if it also does for you.
Same for me. Index 20 which is the icon is empty. As I wrote in the first post I need to add the icon value from today from the 6 days forecast to the array. Try to open the URL in chrome and you'll see that icon value is present. Here is a screenshot with the icon value at the bottom. With editing the regexp it should be possible to add this to the array. https://imgur.com/a/k7FDM