Browse files

Fixed - BBC has changed its RSS URLs for weather

  • Loading branch information...
1 parent 618069a commit 745649b92e9db370d9b8afebb2da484326d03c4f Ben Cole committed Mar 12, 2013
Showing with 9 additions and 9 deletions.
  1. +9 −9 conkycolors/bin/conkyBBCWeather
View
18 conkycolors/bin/conkyBBCWeather
@@ -10,22 +10,22 @@ UNIT="c"
if [ "$3" == "$UNIT" ]; then
if [ "$1" == "$CUR" ]; then
- curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/ObservationsRSS.xml" | sed -n '/Temperature/p' | sed -e 's/°/ /g' | sed -e 's/%/%/g' | sed 's/^.*Temperature: //' | sed 's/ C.*$//'
+ curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/observations.rss" | sed -n '/Temperature/p' | sed -e 's/°/ /g' | sed -e 's/%/%/g' | sed 's/^.*Temperature: //' | sed 's/ C.*$//'
elif [ "$1" == "$MAX" ]; then
- curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Max Temp: //' | sed 's/ C.*$//'
+ curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Max Temp: //' | sed 's/ C.*$//'
elif [ "$1" == "$MIN" ]; then
- curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Min Temp: //' | sed 's/ C.*$//'
+ curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Min Temp: //' | sed 's/ C.*$//'
elif [ "$1" == "$HUMIDITY" ]; then
- curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Humidity: //' | sed 's/%.*$//'
+ curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Humidity: //' | sed 's/%.*$//'
fi
else
if [ "$1" == "$CUR" ]; then
- curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/ObservationsRSS.xml" | sed -n '/Temperature/p' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Temperature: [0-9]* C (//' | sed 's/ F.*$//'
+ curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/observations.rss" | sed -n '/Temperature/p' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Temperature: [0-9]* C (//' | sed 's/ F.*$//'
elif [ "$1" == "$MAX" ]; then
- curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Max Temp: [0-9]* C (//' | sed 's/ F.*$//'
+ curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Max Temp: [0-9]* C (//' | sed 's/ F.*$//'
elif [ "$1" == "$MIN" ]; then
- curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Min Temp: [0-9]* C (//' | sed 's/ F.*$//'
+ curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Min Temp: [0-9]* C (//' | sed 's/ F.*$//'
elif [ "$1" == "$HUMIDITY" ]; then
- curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/$2/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Humidity: //' | sed 's/%.*$//'
+ curl -s --connect-timeout 30 "http://open.live.bbc.co.uk/weather/feeds/en/$2/3dayforecast.rss" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Humidity: //' | sed 's/%.*$//'
fi
-fi
+fi

0 comments on commit 745649b

Please sign in to comment.