Permalink
Browse files

Minor improvments, fixing of typos and problem when UV index is not g…

…iven
  • Loading branch information...
1 parent 27db2cf commit fe6c8ac812eaed1275960781fb29ffa605a96f03 @nicolasH committed Aug 21, 2010
Showing with 13 additions and 4 deletions.
  1. +4 −0 cron.yaml
  2. +5 −1 css/weather.css
  3. +1 −1 me.py
  4. +1 −0 names.txt
  5. +2 −2 weather.py
View
@@ -2,6 +2,10 @@ cron:
- description: regular update
url: /Prevessin
schedule: every 1 hours
+
+- description: regular update
+ url: /Nice
+ schedule: every 1 hours
- description: regular update
url: /Geneva
View
@@ -23,7 +23,6 @@ h3 {
background: white;
padding: 1ex;
margin: 0 auto;
- width: 320px;
}
table {
@@ -74,4 +73,9 @@ td.day {
padding-top: 10px;
padding-bottom: 10px;
margin: -0px;
+}
+.nav{
+ text-align: center;
+ width: 100%;
+
}
View
@@ -101,7 +101,7 @@ def get(self):
def post(self):
userID = users.get_current_user().user_id()
- self.response.out.write('<html><head>'+meta0+'</head><body>You ('+userID +') want to get the weather forecast from : <br/>')
+ self.response.out.write('<html><head>'+weather.head+'</head><body>You ('+userID +') want to get the weather forecast from : <br/>')
url = cgi.escape(self.request.get('url'))
res = urlCode(url)
if res is None :
View
@@ -1,4 +1,5 @@
Prevessin,http://france.meteofrance.com/,france/meteo?PREVISIONS_PORTLET.path=previsionsville/013130,meteo_prevessin.html,
Geneva,http://monde.meteofrance.com/,monde/previsions?MONDE_PORTLET.path=previsionsvilleMonde/06700,meteo_geneva.html,
+Nice,http://france.meteofrance.com/,france/meteo?PREVISIONS_PORTLET.path=previsionsville/060880,meteo_nice.html,
Montpellier,http://france.meteofrance.com/,france/meteo?PREVISIONS_PORTLET.path=previsionsville/341720,meteo_montpellier.html,
Jakarta,http://monde.meteofrance.com/,monde/previsions?MONDE_PORTLET.path=previsionsvilleMonde/96747,meteo_jakarta.html,
View
@@ -247,7 +247,7 @@ def parsePeriod(soup):
line = soup("strong")
period = line[0].contents[0]
periodUV= u''
- if(len(line)>1):
+ if len(line)>1 and len(line[1].contents)>0:
periodUV=line[1].contents[0]
# Temperature
line = soup("em")
@@ -400,7 +400,7 @@ def parseMeteoPageFrance(dico,content,tracking=""):
list.extend(getWeatherContentHTML_france(dico,content))
list.append(foot+"\n<div>\n")
- list.append(u"<div clas=\"nav\">Retourner &agrave <a href=\"/\">la list des villes</a></div>\n")
+ list.append(u"<div class=\"nav\">Retourner &agrave <a href=\"/\">la liste des villes</a></div>\n")
list.append(tracking)
list.append("</body>\n</html>")
return list

0 comments on commit fe6c8ac

Please sign in to comment.