I know someone posted a fix for Yahoo Weather, but I have extracted better values. So, those who want to use Yahoo weather in their skins or old skins working on Yahoo weather can use this.
This expression will give you the below information.
Code: Select all
(?siU)<h1 class="Fz\(3rem\).*Wob\(ba\)">(.*)</h1>.*<h2 class="D\(b\).*Trsdu\(.3s\)">(.*)</h2>.*<div class="My\(2px\).*Fz\(1.12rem\)">(.*)</p>.*<svg class="arrowUp.*celsius_D\(n\)">(.*)</span>.*<svg class="arrowDown.*celsius_D\(n\)">(.*)</span>.*<div class="temperature-forecast.*celsius_D\(n\)">(.*)</span>.*<dl class="D\(tbc\) W\(60%\).*kilometers_D\(n\)">(.*)</dd>.*<div class="D\(f\) Py\(8px\).*<dd>(.*)</dd>
2 = Country
3 = Weather Condition
4 = Max Temp Fer
5 = Min Temp Fer
6 = Current Temp Fer
7 = Wind Speed mph (direction)
8 = Humidity %
Example:
1 => St. Louis
2 => United States
3 => Rain
4 => 71°
5 => 43°
6 => 59
7 => 9 mph South
8 => 74%
And below expression will give you day-wise weather information.
Code: Select all
(?siU)<tr class="Bdb\ Bds\(d\).*</button>(.*)</td>.*<td class="Ta\(c\) W\(25%\)">.*alt=(.*)>.*<dd class="D\(b\).*W\(25px\)">(.*)</dd>.*<dd class="Pstart\(10px\).*W\(25px\)">(.*)</dd>.*<tr class="Bdb\ Bds\(d\).*</button>(.*)</td>.*<td class="Ta\(c\) W\(25%\)">.*alt=(.*)>.*<dd class="D\(b\).*W\(25px\)">(.*)</dd>.*<dd class="Pstart\(10px\).*W\(25px\)">(.*)</dd>.*<tr class="Bdb\ Bds\(d\).*</button>(.*)</td>.*<td class="Ta\(c\) W\(25%\)">.*alt=(.*)>.*<dd class="D\(b\).*W\(25px\)">(.*)</dd>.*<dd class="Pstart\(10px\).*W\(25px\)">(.*)</dd>.*<tr class="Bdb\ Bds\(d\).*</button>(.*)</td>.*<td class="Ta\(c\) W\(25%\)">.*alt=(.*)>.*<dd class="D\(b\).*W\(25px\)">(.*)</dd>.*<dd class="Pstart\(10px\).*W\(25px\)">(.*)</dd>.*<tr class="Bdb\ Bds\(d\).*</button>(.*)</td>.*<td class="Ta\(c\) W\(25%\)">.*alt=(.*)>.*<dd class="D\(b\).*W\(25px\)">(.*)</dd>.*<dd class="Pstart\(10px\).*W\(25px\)">(.*)</dd>.*<tr class="Bdb\ Bds\(d\).*</button>(.*)</td>.*<td class="Ta\(c\) W\(25%\)">.*alt=(.*)>.*<dd class="D\(b\).*W\(25px\)">(.*)</dd>.*<dd class="Pstart\(10px\).*W\(25px\)">(.*)</dd>
1 => Friday
2 => Thunderstorms
3 => 71°
4 => 43°
5 => Saturday
6 => Sunny
7 => 55°
8 => 35°
9 => Sunday
10 => Sunny
11 => 66°
12 => 50°
13 => Monday
14 => "Mostly Cloudy"
15 => 70°
16 => 61°
17 => Tuesday
18 => Thunderstorms
19 => 80°
20 => 52°
21 => Wednesday
22 => Thunderstorms
23 => 63°
24 => 40°
I have yet to extract the temperature in celsius in this code; if you want it, I can help to fetch those values in celsius too. Plus, If the weather condition has two or more words, e.g. "Mostly Cloudy", "Partly Cloudy", etc., RegExp fetches those weather conditions in quotation marks. So far, I have not found any solution for that. If I find any solution, I will post it here.
Please answer if anyone knows how to fetch weather conditions with two or more words without quotation marks.
Thank you.