Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
177
Issues
177
List
Boards
Labels
Milestones
Merge Requests
49
Merge Requests
49
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
5d4a84af
Commit
5d4a84af
authored
Dec 01, 2019
by
Laurent Bachelier
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ilmatieteenlaitos: Fix build with Python 3
Otherwise untested
parent
62b7339f
Pipeline
#2786
passed with stages
in 7 minutes and 21 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
modules/ilmatieteenlaitos/pages.py
modules/ilmatieteenlaitos/pages.py
+7
-6
No files found.
modules/ilmatieteenlaitos/pages.py
View file @
5d4a84af
...
...
@@ -18,13 +18,14 @@
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from
datetime
import
date
from
itertools
import
imap
,
ifilter
from
weboob.browser.pages
import
JsonPage
,
HTMLPage
from
six.moves
import
filter
,
map
from
weboob.browser.elements
import
ItemElement
,
ListElement
,
method
from
weboob.capabilities.weather
import
Forecast
,
Current
,
City
,
Temperature
from
weboob.browser.filters.json
import
Dict
from
weboob.browser.filters.standard
import
Filter
,
CleanText
from
weboob.browser.filters.standard
import
CleanText
,
Filter
from
weboob.browser.pages
import
HTMLPage
,
JsonPage
from
weboob.capabilities.weather
import
City
,
Current
,
Forecast
,
Temperature
class
Id
(
Filter
):
...
...
@@ -100,9 +101,9 @@ class WeatherPage(HTMLPage):
def
info_for_value
(
value
):
return
CleanText
(
value
%
offset
)(
self
)
.
replace
(
u'edeltävän tunnin '
,
u''
)
return
(
"klo
%
s: "
%
hour
)
+
", "
.
join
(
ifilter
(
bool
,
i
map
(
info_for_value
,
values
)))
return
(
"klo
%
s: "
%
hour
)
+
", "
.
join
(
filter
(
bool
,
map
(
info_for_value
,
values
)))
return
u'
\n
'
+
u'
\n
'
.
join
(
ifilter
(
bool
,
i
map
(
descriptive_text_for_hour
,
[
"02"
,
"03"
,
"14"
,
"15"
])))
return
u'
\n
'
+
u'
\n
'
.
join
(
filter
(
bool
,
map
(
descriptive_text_for_hour
,
[
"02"
,
"03"
,
"14"
,
"15"
])))
def
get_station_id
(
self
):
return
CleanText
(
u'//select[@id="observation-station-menu"]/option[@selected="selected"]/@value'
)(
self
.
doc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment