[\d]+)/?.*', url)
- if m:
- video = GDCVaultVideo(int(m.group(1)))
- else:
- raise BrowserUnavailable('Cannot find ID on page with redirection')
- video.url = redir_url
- video.set_empty_fields(NotAvailable)
- # best effort for now
- return video
-
- self.location(url)
- # redirects to /login means the video is not public
- if not self.is_on_page(VideoPage):
- raise BrowserUnavailable('Requires account')
- return self.page.get_video(video)
-
- def search_videos(self, pattern, sortby):
- post_data = {"firstfocus" : "",
- "category" : "free",
- "keyword" : pattern.encode('utf-8'),
- "conference_id" : "", }
- post_data = urlencode(post_data)
- # probably not required
- self.addheaders = [('Referer', 'http://gdcvault.com/'),
- ("Content-Type" , 'application/x-www-form-urlencoded') ]
-
- # is_logged assumes html page
- self.location('http://gdcvault.com/search.php',
- data=post_data, no_login=True)
-
- assert self.is_on_page(SearchPage)
- return self.page.iter_videos()
-
- def latest_videos(self):
- #self.home()
- self.location('/free')
- assert self.is_on_page(IndexPage)
- return self.page.iter_videos()
diff --git a/modules/gdcvault/favicon.png b/modules/gdcvault/favicon.png
deleted file mode 100644
index 70ef33e20bb41c825a43e51a42a0cdfc8c89dd36..0000000000000000000000000000000000000000
Binary files a/modules/gdcvault/favicon.png and /dev/null differ
diff --git a/modules/gdcvault/favicon.xcf b/modules/gdcvault/favicon.xcf
deleted file mode 100644
index 32695aaa5cfdb5863c913b5e077dbbc5859cf43d..0000000000000000000000000000000000000000
Binary files a/modules/gdcvault/favicon.xcf and /dev/null differ
diff --git a/modules/gdcvault/module.py b/modules/gdcvault/module.py
deleted file mode 100644
index 97b639d0fc7b90bb88718fe0aef0cd28e425e29a..0000000000000000000000000000000000000000
--- a/modules/gdcvault/module.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Romain Bignon
-# Copyright(C) 2012 François Revol
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.video import CapVideo, BaseVideo
-from weboob.tools.backend import Module, BackendConfig
-from weboob.capabilities.collection import CapCollection, CollectionNotFound
-from weboob.tools.value import Value, ValueBackendPassword
-
-from .browser import GDCVaultBrowser
-from .video import GDCVaultVideo
-
-
-__all__ = ['GDCVaultModule']
-
-
-class GDCVaultModule(Module, CapVideo, CapCollection):
- NAME = 'gdcvault'
- MAINTAINER = u'François Revol'
- EMAIL = 'revol@free.fr'
- VERSION = '1.4'
- DESCRIPTION = 'Game Developers Conferences Vault video streaming website'
- LICENSE = 'AGPLv3+'
- BROWSER = GDCVaultBrowser
- CONFIG = BackendConfig(Value('username', label='Username', default=''),
- ValueBackendPassword('password', label='Password', default=''))
-
- def create_default_browser(self):
- username = self.config['username'].get()
- if len(username) > 0:
- password = self.config['password'].get()
- else:
- password = None
- return self.create_browser(username, password)
-
- def deinit(self):
- # don't need to logout if the browser hasn't been used.
- if not self._browser:
- return
-
- with self.browser:
- self.browser.close_session()
-
- def get_video(self, _id):
- with self.browser:
- return self.browser.get_video(_id)
-
- SORTBY = ['relevance', 'rating', 'views', 'time']
-
- def search_videos(self, pattern, sortby=CapVideo.SEARCH_RELEVANCE, nsfw=False):
- with self.browser:
- return self.browser.search_videos(pattern, self.SORTBY[sortby])
-
- def fill_video(self, video, fields):
- if fields != ['thumbnail']:
- # if we don't want only the thumbnail, we probably want also every fields
- with self.browser:
- video = self.browser.get_video(GDCVaultVideo.id2url(video.id), video)
- if 'thumbnail' in fields and video.thumbnail:
- with self.browser:
- video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
-
- return video
-
- def iter_resources(self, objs, split_path):
- if BaseVideo in objs:
- collection = self.get_collection(objs, split_path)
- if collection.path_level == 0:
- yield self.get_collection(objs, [u'latest'])
- if collection.split_path == [u'latest']:
- for video in self.browser.latest_videos():
- yield video
-
- def validate_collection(self, objs, collection):
- if collection.path_level == 0:
- return
- if BaseVideo in objs and collection.split_path == [u'latest']:
- collection.title = u'Latest GDCVault videos'
- return
- raise CollectionNotFound(collection.split_path)
-
- OBJECTS = {GDCVaultVideo: fill_video}
diff --git a/modules/gdcvault/pages.py b/modules/gdcvault/pages.py
deleted file mode 100644
index c9ee873a8e1dc3c8cfed5d6957b3d85b4f17c47b..0000000000000000000000000000000000000000
--- a/modules/gdcvault/pages.py
+++ /dev/null
@@ -1,367 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Romain Bignon
-# Copyright(C) 2012 François Revol
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.deprecated.browser import Page
-from weboob.tools.compat import quote
-
-import re
-import datetime
-from dateutil.parser import parse as parse_dt
-
-from weboob.capabilities.base import NotAvailable
-from weboob.capabilities.image import Thumbnail
-from weboob.deprecated.browser import BrokenPageError
-
-#HACK
-from urllib2 import HTTPError
-
-from .video import GDCVaultVideo
-
-#import lxml.etree
-
-# TODO: check title on 1439
-
-
-class IndexPage(Page):
- def iter_videos(self):
- for a in self.parser.select(self.document.getroot(), 'section.conference ul.media_items li.featured a.session_item'):
- href = a.attrib.get('href', '')
- # print href
- m = re.match('/play/(\d+)/.*', href)
- if not m:
- continue
- # print m.group(1)
- video = GDCVaultVideo(m.group(1))
-
- # get title
- try:
- video.title = unicode(self.parser.select(a, 'div.conference_info p strong', 1).text)
- except IndexError:
- video.title = NotAvailable
-
- # get description
- try:
- video.description = unicode(self.parser.select(a, 'div.conference_info p', 1).text)
- except IndexError:
- video.description = NotAvailable
-
- # get thumbnail
- img = self.parser.select(a, 'div.featured_image img', 1)
- if img is not None:
- video.thumbnail = Thumbnail(img.attrib['src'])
- video.thumbnail.url = video.thumbnail.id
- else:
- video.thumbnail = NotAvailable
-
- #m = re.match('id-(\d+)', a.attrib.get('class', ''))
- #if not m:
- # continue
- # FIXME
- yield video
-
-# the search page class uses a JSON parser,
-# since it's what search.php returns when POSTed (from Ajax)
-
-
-class SearchPage(Page):
- def iter_videos(self):
- if self.document is None or self.document['data'] is None:
- raise BrokenPageError('Unable to find JSON data')
- for data in self.document['data']:
- video = GDCVaultVideo.get_video_from_json(data)
- # TODO: split type 4 videos into id and id#slides
- if video is None:
- continue
- yield video
-
-
-class VideoPage(Page):
- def get_video(self, video=None):
- # check for slides id variant
- want_slides = False
- m = re.match('.*#slides', self.url)
- if m:
- want_slides = True
- # not sure it's safe
- self.group_dict['id'] += '#slides'
-
- if video is None:
- video = GDCVaultVideo(self.group_dict['id'])
-
- # the config file has it too, but in CDATA and only for type 4
- obj = self.parser.select(self.document.getroot(), 'title')
- title = None
- if len(obj) > 0:
- try:
- title = unicode(obj[0].text)
- except UnicodeDecodeError as e:
- title = None
-
- if title is None:
- obj = self.parser.select(self.document.getroot(), 'meta[name=title]')
- if len(obj) > 0:
- if 'content' in obj[0].attrib:
- try:
- # FIXME: 1013483 has buggus title (latin1)
- # for now we just pass it as-is
- title = obj[0].attrib['content']
- except UnicodeDecodeError as e:
- # XXX: this doesn't even works!?
- title = obj[0].attrib['content'].decode('iso-5589-15')
-
- if title is not None:
- title = title.strip()
- m = re.match('GDC Vault\s+-\s+(.*)', title)
- if m:
- title = m.group(1)
- video.title = title
-
- #TODO: POST back the title to /search.php and filter == id to get
- # cleaner (JSON) data... (though it'd be much slower)
-
- # try to find an iframe (type 3 and 4)
- obj = self.parser.select(self.document.getroot(), 'iframe')
- if len(obj) == 0:
- # type 1 or 2 (swf+js)
- # find which script element contains the swf args
- for script in self.parser.select(self.document.getroot(), 'script'):
- m = re.match(".*new SWFObject.*addVariable\('type', '(.*)'\).*", unicode(script.text), re.DOTALL)
- if m:
- video.ext = m.group(1)
-
- m = re.match(".*new SWFObject.*addVariable\(\"file\", encodeURIComponent\(\"(.*)\"\)\).*", unicode(script.text), re.DOTALL)
- if m:
- video.url = "http://gdcvault.com%s" % (m.group(1))
- # TODO: for non-free (like 769),
- # must be logged to use /mediaProxy.php
-
- # FIXME: doesn't seem to work yet, we get 2 bytes as html
- # 769 should give:
- # http://twvideo01.ubm-us.net/o1/gdcradio-net/2007/gdc/GDC07-4889.mp3
- # HACK: we use mechanize directly here for now... FIXME
- #print "asking for redirect on '%s'" % (video.url)
- #self.browser.addheaders += [['Referer', 'http://gdcvault.com/play/%s' % self.group_dict['id']]]
- #print self.browser.addheaders
- self.browser.set_handle_redirect(False)
- try:
- self.browser.open_novisit(video.url)
- # headers = req.info()
- # if headers.get('Content-Type', '') == 'text/html' and headers.get('Content-Length', '') == '2':
- # print 'BUG'
-
- #print req.code
- except HTTPError as e:
- #print e.getcode()
- if e.getcode() == 302 and hasattr(e, 'hdrs'):
- #print e.hdrs['Location']
- video.url = unicode(e.hdrs['Location'])
- self.browser.set_handle_redirect(True)
-
- video.set_empty_fields(NotAvailable)
- return video
-
- #XXX: raise error?
- return None
-
- obj = obj[0]
- if obj is None:
- return None
- # type 3 or 4 (iframe)
- # get the config file for the rest
- iframe_url = obj.attrib['src']
-
- # 1015020 has a boggus url
- m = re.match('http:/event(.+)', iframe_url)
- if m:
- iframe_url = 'http://event' + m.group(1)
-
- # print iframe_url
- # 1013798 has player169.html
- # 1012186 has player16x9.html
- # some other have /somethingplayer.html...
- # 1441 has a space in the xml filename, which we must not strip
- m = re.match('(http:.*/)[^/]*player[0-9a-z]*\.html\?.*xmlURL=([^&]+\.xml).*\&token=([^& ]+)', iframe_url)
-
- if not m:
- m = re.match('/play/mediaProxy\.php\?sid=(\d+)', iframe_url)
- if m is None:
- return None
- # TODO: must be logged to use /mediaProxy.php
- # type 3 (pdf slides)
- video.ext = u'pdf'
- video.url = "http://gdcvault.com%s" % (unicode(iframe_url))
-
- # HACK: we use mechanize directly here for now... FIXME
- # print "asking for redirect on '%s'" % (video.url)
- self.browser.set_handle_redirect(False)
- try:
- self.browser.open_novisit(video.url)
- except HTTPError as e:
- if e.getcode() == 302 and hasattr(e, 'hdrs'):
- video.url = unicode(e.hdrs['Location'])
- self.browser.set_handle_redirect(True)
-
- video.set_empty_fields(NotAvailable)
- return video
-
- # type 4 (dual screen video)
-
- # token doesn't actually seem required
- # 1441 has a space in the xml filename
- xml_filename = quote(m.group(2))
- config_url = m.group(1) + xml_filename + '?token=' + m.group(3)
-
- # self.browser.addheaders += [['Referer', 'http://gdcvault.com/play/%s' % self.group_dict['id']]]
- # print self.browser.addheaders
- # TODO: fix for 1015021 & others (forbidden)
- #config = self.browser.openurl(config_url).read()
- config = self.browser.get_document(self.browser.openurl(config_url))
-
- obj = self.parser.select(config.getroot(), 'akamaihost', 1)
- host = obj.text
- if host is None:
- raise BrokenPageError('Missing tag in xml config file')
-
- if host == "smil":
- # the rtmp URL is described in a smil file,
- # with several available bitrates
- obj = self.parser.select(config.getroot(), 'speakervideo', 1)
- smil = self.browser.get_document(self.browser.openurl(obj.text))
- obj = self.parser.select(smil.getroot(), 'meta', 1)
- # TODO: error checking
- base = obj.attrib.get('base', '')
- best_bitrate = 0
- path = None
- obj = self.parser.select(smil.getroot(), 'video')
- # choose the best bitrate
- for o in obj:
- rate = int(o.attrib.get('system-bitrate', 0))
- if rate > best_bitrate:
- path = o.attrib.get('src', '')
- video.url = unicode(base + '/' + path)
-
- else:
- # not smil, the rtmp url is directly here as host + path
- # for id 1373 host is missing '/ondemand'
- # only add it when only a domain is specified without path
- m = re.match('^[^\/]+$', host)
- if m:
- host += "/ondemand"
-
- videos = {}
-
- obj = self.parser.select(config.getroot(), 'speakervideo', 1)
- if obj.text is not None:
- videos['speaker'] = 'rtmp://' + host + '/' + quote(obj.text)
-
- obj = self.parser.select(config.getroot(), 'slidevideo', 1)
- if obj.text is not None:
- videos['slides'] = 'rtmp://' + host + '/' + quote(obj.text)
-
- # print videos
- # XXX
- if 'speaker' in videos:
- video.url = unicode(videos['speaker'])
- elif 'slides' in videos:
- # 1016627 only has slides, so fallback to them
- video.url = unicode(videos['slides'])
-
- if want_slides:
- if 'slides' in videos:
- video.url = unicode(videos['slides'])
- # if video.url is none: raise ? XXX
-
- obj = self.parser.select(config.getroot(), 'date', 1)
- if obj.text is not None:
- # 1016634 has "Invalid Date"
- try:
- video.date = parse_dt(obj.text)
- except ValueError as e:
- video.date = NotAvailable
-
- obj = self.parser.select(config.getroot(), 'duration', 1)
- m = re.match('(\d\d):(\d\d):(\d\d)', obj.text)
- if m:
- video.duration = datetime.timedelta(hours = int(m.group(1)),
- minutes = int(m.group(2)),
- seconds = int(m.group(3)))
-
- obj = self.parser.select(config.getroot(), 'speaker', 1)
- #print obj.text_content()
-
- #self.set_details(video)
-
- video.set_empty_fields(NotAvailable)
- return video
-
- obj = self.parser.select(self.document.getroot(), 'title')
- if len(obj) < 1:
- return None
- title = obj[0].text.strip()
- m = re.match('GDC Vault\s+-\s+(.*)', title)
- if m:
- title = m.group(1)
-
- def set_details(self, v):
- obj = self.parser.select(self.document.getroot(), 'meta[name=available]', 1)
- if obj is not None:
- value = obj.attrib['content']
- m = re.match('(\d\d)-(\d\d)-(\d\d\d\d)\s*(\d\d):(\d\d)', value)
- if not m:
- raise BrokenPageError('Unable to parse datetime: %r' % value)
- day = m.group(1)
- month = m.group(2)
- year = m.group(3)
- hour = m.group(4)
- minute = m.group(5)
- v.date = datetime.datetime(year=int(year),
- month=int(month),
- day=int(day),
- hour=int(hour),
- minute=int(minute))
-
- obj = self.parser.select(self.document.getroot(), 'span.ep_subtitle', 1)
- if obj is not None:
- span = self.parser.select(obj, 'span.ep_date', 1)
- value = span.text
- m = re.match('(\d\d):(\d\d)\s*\/\s*(\d\d):(\d\d)\s*-\s*(\d\d)-(\d\d)-(\d\d\d\d)', value)
- if not m:
- raise BrokenPageError('Unable to parse datetime: %r' % value)
- bhour = m.group(1)
- bminute = m.group(2)
- ehour = m.group(3)
- eminute = m.group(4)
- day = m.group(5)
- month = m.group(6)
- year = m.group(7)
-
- start = datetime.datetime(year=int(year),
- month=int(month),
- day=int(day),
- hour=int(bhour),
- minute=int(bminute))
- end = datetime.datetime(year=int(year),
- month=int(month),
- day=int(day),
- hour=int(ehour),
- minute=int(eminute))
-
- v.duration = end - start
diff --git a/modules/gdcvault/test.py b/modules/gdcvault/test.py
deleted file mode 100644
index 68125d8d86e41cbb282356359c0abac1de44b235..0000000000000000000000000000000000000000
--- a/modules/gdcvault/test.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Romain Bignon
-# Copyright(C) 2012 François Revol
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.test import BackendTest
-#from weboob.capabilities.video import BaseVideo
-
-
-class GDCVaultTest(BackendTest):
- MODULE = 'gdcvault'
-
- # def test_search(self):
- # l = list(self.backend.search_videos('linux'))
- # self.assertTrue(len(l) > 0)
- # v = l[0]
- # self.backend.fillobj(v, ('url',))
- # self.assertTrue(v.url and v.url.startswith('http://'), 'URL for video "%s" not found: %s' % (v.id, v.url))
- # self.backend.browser.openurl(v.url)
-
- # def test_latest(self):
- # l = list(self.backend.iter_resources([BaseVideo], [u'latest']))
- # self.assertTrue(len(l) > 0)
- # v = l[0]
- # self.backend.fillobj(v, ('url',))
- # self.assertTrue(v.url and v.url.startswith('http://'), 'URL for video "%s" not found: %s' % (v.id, v.url))
diff --git a/modules/gdcvault/video.py b/modules/gdcvault/video.py
deleted file mode 100644
index 08d90a79c8a248d1fe01f2d927a4141bef97522c..0000000000000000000000000000000000000000
--- a/modules/gdcvault/video.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Roger Philibert
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.image import Thumbnail
-from weboob.capabilities.video import BaseVideo
-from weboob.capabilities.base import NotAvailable
-
-import re
-from dateutil.parser import parse as parse_dt
-
-
-class GDCVaultVideo(BaseVideo):
- def __init__(self, *args, **kwargs):
- BaseVideo.__init__(self, *args, **kwargs)
- # not always flv...
- self.ext = NotAvailable
-
- @classmethod
- def id2url(cls, _id):
- # attempt to enlarge the id namespace to differentiate
- # videos from the same page
- m = re.match('\d+#speaker', _id)
- if m:
- return u'http://www.gdcvault.com/play/%s#speaker' % _id
- m = re.match('\d+#slides', _id)
- if m:
- return u'http://www.gdcvault.com/play/%s#slides' % _id
- return u'http://www.gdcvault.com/play/%s' % _id
-
- @classmethod
- def get_video_from_json(self, data):
- # session_id is unique per talk
- # vault_media_id is unique per page
- # (but can refer to 2 video files for dual screen)
- # solr_id is "${vault_media_id}.${conference_id}.${session_id}.$vault_media_type_id{}"
-
- # XXX: do we filter them or let people know about them?
- #if 'anchor' in data:
- # if data['anchor']['href'] == '#':
- # # file will not be accessible (not free and not logged in)
- # return None
-
- if 'vault_media_id' not in data:
- return None
- media_id = int(data['vault_media_id'])
- video = GDCVaultVideo(media_id)
-
- # 1013679 has \n in title...
- video.title = unicode(data.get('session_name', '').replace('\n', ''))
-
- # TODO: strip out ,
and other html...
- # XXX: 1013422 has all 3 and !=
- if 'overview' in data:
- video.description = unicode(data['overview'])
- elif 'spell' in data:
- video.description = unicode(data['spell'])
- else:
- video.description = unicode(data.get('description', ''))
-
- if 'image' in data:
- video.thumbnail = Thumbnail(data['image'])
- video.thumbnail.url = video.thumbnail.id
-
- if 'speakers_name' in data:
- video.author = unicode(", ".join(data['speakers_name']))
-
- if 'start_date' in data:
- video.date = parse_dt(data['start_date'])
-
- if 'score' in data:
- video.rating = data['score']
-
- video.set_empty_fields(NotAvailable)
-
- return video
diff --git a/modules/gdfsuez/__init__.py b/modules/gdfsuez/__init__.py
deleted file mode 100644
index d16ad8608eaf02ee32bf652384b570880002332b..0000000000000000000000000000000000000000
--- a/modules/gdfsuez/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .module import GdfSuezModule
-
-__all__ = ['GdfSuezModule']
diff --git a/modules/gdfsuez/browser.py b/modules/gdfsuez/browser.py
deleted file mode 100644
index 713a648124df31d4e8a676bfae2b3a8675b2ccf4..0000000000000000000000000000000000000000
--- a/modules/gdfsuez/browser.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Mathieu Jourdan
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-import StringIO
-from weboob.deprecated.browser import Browser, BrowserIncorrectPassword
-from .pages import LoginPage, HomePage, AccountPage, TimeoutPage, HistoryPage, PdfPage
-
-__all__ = ['GdfSuez']
-
-
-class GdfSuez(Browser):
- PROTOCOL = 'https'
- DOMAIN = 'www.gdfsuez-dolcevita.fr'
- PAGES = {'.*portail/clients.*?_nfpb=true&_pageLabel=page_identification': LoginPage,
- '.*portail/clients.*?_nfpb=true&_pageLabel=page_accueil_compte_en_ligne': HomePage,
- '.*p/visualiser_mes_contrats.*?_nfpb=true': AccountPage,
- '.*p/page_historique_de_mes_factures': HistoryPage,
- '.*clients.*?_nfpb=true&_nfls=false&_pageLabel=page_erreur_timeout_session': TimeoutPage
- }
-
- loginp = '/portailClients/appmanager/portail/clients'
- homep = '/portailClients/appmanager/portail/clients?_nfpb=true&_pageLabel=page_accueil_compte_en_ligne'
- accountp = '/portailClients/client/p/visualiser_mes_contrats?_nfpb=true'
- historyp = '/portailClients/client/p/page_historique_de_mes_factures'
-
- def __init__(self, *args, **kwargs):
- Browser.__init__(self, *args, **kwargs)
-
- def home(self):
- self.location(self.homep)
-
- def is_logged(self):
- if self.is_on_page(LoginPage) or self.is_on_page(TimeoutPage):
- return False
- return True
-
- def login(self):
- assert isinstance(self.username, basestring)
- assert isinstance(self.password, basestring)
- #assert isemail(self.username)
- if not self.is_on_page(LoginPage):
- self.location(self.loginp)
- self.page.login(self.username, self.password)
- if self.is_on_page(LoginPage):
- raise BrowserIncorrectPassword()
-
- def get_subscription_list(self):
- if not self.is_on_page(AccountPage):
- self.location(self.accountp)
- return self.page.get_subscription_list()
-
- def get_subscription(self, id):
- assert isinstance(id, basestring)
- for sub in self.get_subscription_list():
- if sub.id == id:
- return sub
-
- def get_history(self, subscription):
- if not self.is_on_page(HistoryPage):
- self.location(self.historyp)
- return self.page.get_history()
-
- def get_details(self, subscription):
- bills = self.iter_documents()
- id = bills[0].id
- if not self.is_on_page(HistoryPage):
- self.location(self.historyp)
- url = 'https://www.gdfsuez-dolcevita.fr/' + self.get_document(id).url
- response = self.openurl(url)
- pdf = PdfPage(StringIO.StringIO(response.read()))
- for detail in pdf.get_details(subscription.label):
- yield detail
-
- def iter_documents(self):
- if not self.is_on_page(HistoryPage):
- self.location(self.historyp)
- return self.page.get_documents()
-
- def get_document(self, id):
- assert isinstance(id, basestring)
- for b in self.iter_documents():
- if b.id == id:
- return b
diff --git a/modules/gdfsuez/favicon.png b/modules/gdfsuez/favicon.png
deleted file mode 100644
index 0222cea313f76834a03037fa0c69d87970a3a6c5..0000000000000000000000000000000000000000
Binary files a/modules/gdfsuez/favicon.png and /dev/null differ
diff --git a/modules/gdfsuez/module.py b/modules/gdfsuez/module.py
deleted file mode 100644
index 6e43d4a7864a62974f80fe0b547e99a351ca65b1..0000000000000000000000000000000000000000
--- a/modules/gdfsuez/module.py
+++ /dev/null
@@ -1,96 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Mathieu Jourdan
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.capabilities.bill import CapDocument, SubscriptionNotFound,\
- DocumentNotFound, Subscription, Bill
-from weboob.tools.backend import Module, BackendConfig
-from weboob.tools.value import ValueBackendPassword
-from .browser import GdfSuez
-
-__all__ = ['GdfSuezModule']
-
-
-class GdfSuezModule(Module, CapDocument):
- NAME = 'gdfsuez'
- MAINTAINER = u'Mathieu Jourdan'
- EMAIL = 'mathieu.jourdan@gresille.org'
- VERSION = '1.4'
- LICENSE = 'AGPLv3+'
- DESCRIPTION = u'GDF-Suez French energy provider'
- CONFIG = BackendConfig(ValueBackendPassword('login',
- label='Account ID (e-mail)',
- masked=False),
- ValueBackendPassword('password',
- label='Password',
- masked=True)
- )
- BROWSER = GdfSuez
-
- def create_default_browser(self):
- return self.create_browser(self.config['login'].get(),
- self.config['password'].get())
-
- def iter_subscription(self):
- for subscription in self.browser.get_subscription_list():
- yield subscription
-
- def get_subscription(self, _id):
- if not _id.isdigit():
- raise SubscriptionNotFound()
- with self.browser:
- subscription = self.browser.get_subscription(_id)
- if not subscription:
- raise SubscriptionNotFound()
- else:
- return subscription
-
- def iter_documents_history(self, subscription):
- if not isinstance(subscription, Subscription):
- subscription = self.get_subscription(subscription)
- with self.browser:
- for history in self.browser.get_history(subscription):
- yield history
-
- def get_details(self, subscription):
- if not isinstance(subscription, Subscription):
- subscription = self.get_subscription(subscription)
- with self.browser:
- for detail in self.browser.get_details(subscription):
- yield detail
-
- def iter_documents(self, subscription):
- if not isinstance(subscription, Subscription):
- subscription = self.get_subscription(subscription)
- with self.browser:
- for bill in self.browser.iter_documents():
- yield bill
-
- def get_document(self, id):
- with self.browser:
- bill = self.browser.get_document(id)
- if not bill:
- raise DocumentNotFound()
- else:
- return bill
-
- def download_document(self, bill):
- if not isinstance(bill, Bill):
- bill = self.get_document(bill)
- with self.browser:
- return self.browser.readurl(bill.url)
diff --git a/modules/gdfsuez/pages/__init__.py b/modules/gdfsuez/pages/__init__.py
deleted file mode 100644
index f77d26906cd4dbe0712774b44517dd5c5f852a29..0000000000000000000000000000000000000000
--- a/modules/gdfsuez/pages/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Mathieu Jourdan
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from .history import HistoryPage, PdfPage
-from .homepage import LoginPage, HomePage, AccountPage, TimeoutPage
-
-__all__ = ['LoginPage', 'HomePage', 'AccountPage', 'HistoryPage', 'PdfPage', 'TimeoutPage']
diff --git a/modules/gdfsuez/pages/history.py b/modules/gdfsuez/pages/history.py
deleted file mode 100644
index 8a3b77f2749ddea1941b06d1fa47f54cb855ecf9..0000000000000000000000000000000000000000
--- a/modules/gdfsuez/pages/history.py
+++ /dev/null
@@ -1,211 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Mathieu Jourdan
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-import re
-import os
-import subprocess
-import tempfile
-import shutil
-
-from datetime import date
-from decimal import Decimal
-
-from weboob.deprecated.browser import Page
-from weboob.capabilities.base import NotAvailable
-from weboob.capabilities.bill import Detail, Bill
-
-
-class HistoryPage(Page):
-
- def on_loaded(self):
- self.details = []
- self.bills = []
-
- # Latest bill
- div = self.document.xpath('//div[@class="consulter_dernierefacture"]')[0]
- bdate = div.xpath('p[@class="date"]/span[@class="textetertiaire"]')[0].text
- bprice = div.xpath('p[@class="montant"]/span[@class="textetertiaire"]')[0].text
- link = div.xpath('a[@id="display_popin"]')[0].attrib['href']
- mydate = date(*reversed([int(x) for x in bdate.split("/")]))
- price = Decimal(bprice.strip(u' € TTC').replace(',', '.'))
- self.bills.append(self._create_bill(mydate, price, link))
-
- # Previous bills
- table = self.document.xpath('//table[@class="afficher_factures"]')[0]
- for tr in table[0].xpath('//tbody/tr'):
- cells = tr.xpath('td')
- bdate = unicode(cells[0].text.strip())
- mydate = date(*reversed([int(x) for x in bdate.split("/")]))
- bprice = unicode(cells[1].text)
- price = Decimal(bprice.strip(u' €').replace(',', '.'))
- link = cells[3].xpath('a')[0].attrib['href']
- self.bills.append(self._create_bill(mydate, price, link))
-
- def _create_bill(self, date, price, link):
- bill = Bill()
- bill.id = date.__str__().replace('-', '')
- bill.date = date
- bill._price = price
- bill.url = unicode(link)
- bill.format = u'pdf'
- bill.type = u'bill'
- bill.label = unicode(price)
- return bill
-
- def get_details(self):
- return self.details
-
- def get_documents(self):
- return self.bills
-
-
-class PdfPage():
-
- def __init__(self, file):
- self.pdf = file
-
- def _parse_pdf(self):
- pdffile = tempfile.NamedTemporaryFile(bufsize=100000, mode='w', suffix='.pdf')
- temptxt = pdffile.name.replace('.pdf', '.txt')
- cmd = "ebook-convert"
- stdout = open("/dev/null", "w")
- shutil.copyfileobj(self.pdf, pdffile)
- pdffile.flush()
- subprocess.call([cmd, pdffile.name, temptxt], stdout=stdout)
- pdffile.close()
- txtfile = open(temptxt, 'r')
- txt = txtfile.read()
- txtfile.close()
- os.remove(temptxt)
- return txt
-
- def _parse_page(self, page):
-
- # Regexp
- footnote = re.compile(r'\([0-9]\) ') # (f)
- ht = re.compile('HT par mois')
- base = re.compile('la base de')
- enddate = re.compile('\d\d\/\d\d\/\d\d') # YY/MM/DD
- endwithdigit = re.compile('\d+$') # blah blah 42
- textwithcoma = re.compile('([a-z]|\d{4})\,') # blah 2012, blah blah
-
- # Parsing
- details = []
- for title in ['Abonnement',
- 'Consommation',
- 'Contributions et taxes liées à l\'énergie']:
- section = page.split(title, 1)[1].split('Total ')[0]
-
- # When a line holds '(0)', a newline is missing.
- section = re.sub(footnote, '\n', section)
-
- lines = section.split('\n')
- lines = [x for x in lines if len(x) > 0] # Remove empty lines
- detail = None
-
- for line in lines:
- if re.match('[A-Za-z]', line[0]):
-
- # Things we want to merge with the one just before
- if 'facturées' in line:
- # Long lines are sometimes split, so we try to join them
- # That is the case for:
- # 'Déduction du montant des consommations
- # estimées facturées du 00/00/00 au 00/00/00'
- detail.label = detail.label + u' ' + unicode(line, encoding='utf-8')
-
- # Things for which we want a new detail
- else:
- # Entering here, we will instantiate a new detail.
- # We hadn't so before because of fragmented lines.
- if detail is not None and detail.label is not NotAvailable:
- # We have a new element, return the other one
- details.append(detail)
- detail = Detail()
- detail.price = Decimal(0)
-
- # If the coma is not a decimal separator, then
- # this is is probably a loooong sentence.
- # When it comes to jokes, keep it short and sweet.
- line = re.split(textwithcoma, line)[0]
-
- # Things we want for sure
- if re.findall(enddate, line):
- # When a line has been badly split after a date,
- # We want the label to end after the date, and maybe
- # the second part to be the info
- mydate = re.search(enddate, line).group(0)
- mylist = line.rpartition(mydate)
- label = mylist[0] + mylist[1]
- detail.label = unicode(label, encoding='utf-8')
- elif re.findall(endwithdigit, line):
- # What is this stupid number at the end of the line?
- # Line should have been split before the number
- detail.label = unicode(re.split(endwithdigit, line)[0], encoding='utf-8')
- # Things we don't want for sure
- elif ')' in line and '(' not in line:
- # First part of the parenthesis should have been drop before
- # Avoid to create a new empty detail
- detail.label = NotAvailable
- elif re.match(base, line):
- # This string should come always after a date,
- # usually, it will match one of the cases above.
- # Sometimes, it appears on a new line we don't need.
- detail.label = NotAvailable
- elif re.match(ht, line):
- # '00,00 € HT par mois' may have been split after HT
- # We don't need of the second line
- detail.label = NotAvailable
- # Things we probably want to keep
- else:
- # Well, maybe our line is correct, after all.
- # Not much to do.
- detail.label = unicode(line, encoding='utf-8')
- detail.infos = NotAvailable
- elif ' %' in line:
- if isinstance(detail, Detail):
- # Sometimes the vat is not on a new line:
- # '00,00 00,0 %' instead of '00,0 %'
- vat = line.split()[line.count(' ')-1].replace(',', '.')
- detail.infos = unicode('TVA: ' + vat)
- elif ' €' in line:
- price = line.replace(',', '.')
- if isinstance(detail, Detail):
- detail.price = Decimal(price.strip(' €'))
- elif re.match(enddate, line):
- # Line holding dates may have been mixed up
- label = detail.label.split(' au ')[0] + u' au ' + unicode(line, encoding='utf-8')
- detail.label = label
- if detail.label is not NotAvailable:
- # Do not append empty details to the list
- # It seemed easier to create details anyway than dealing
- # with None objects
- details.append(detail)
- return details
-
- def get_details(self, label):
- txt = self._parse_pdf()
- page = None
- if label == u'Gaz naturel':
- page = txt.split('GAZ NATUREL')[1].split('TOTAL GAZ NATUREL TTC')[0]
- elif label == u'Electricité':
- page = txt.split('ELECTRICITE')[1].split('TOTAL ELECTRICITE TTC')[0]
- else:
- pass
- return self._parse_page(page)
diff --git a/modules/gdfsuez/pages/homepage.py b/modules/gdfsuez/pages/homepage.py
deleted file mode 100644
index 8164dbea15ed15b914257f2b11003437c9cd4b6e..0000000000000000000000000000000000000000
--- a/modules/gdfsuez/pages/homepage.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Mathieu Jourdan
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from datetime import date
-
-from weboob.deprecated.browser import Page
-from weboob.capabilities.bill import Subscription
-
-
-class LoginPage(Page):
-
- def login(self, login, password):
- self.browser.select_form('symConnexionForm')
- self.browser["portlet_login_plein_page_3{pageFlow.mForm.login}"] = unicode(login)
- self.browser["portlet_login_plein_page_3{pageFlow.mForm.password}"] = unicode(password)
- self.browser.submit()
-
-
-class HomePage(Page):
-
- def on_loaded(self):
- pass
-
-
-class AccountPage(Page):
-
- def get_subscription_list(self):
- table = self.document.xpath('//table[@id="ensemble_contrat_N0"]')[0]
- if len(table) > 0:
- # some clients may have subscriptions to gas and electricity,
- # but they receive a single bill
- # to avoid "boobill details" and "boobill bills" returning the same
- # table twice, we could return only one subscription for both.
- # We do not, and "boobill details" will take care of parsing only the
- # relevant section in the bill files.
- for line in table[0].xpath('//tbody/tr'):
- cells = line.xpath('td')
- snumber = cells[2].attrib['id'].replace('Contrat_', '')
- slabel = cells[0].xpath('a')[0].text.replace('offre', '').strip()
- d = unicode(cells[3].xpath('strong')[0].text.strip())
- sdate = date(*reversed([int(x) for x in d.split("/")]))
- sub = Subscription(snumber)
- sub._id = snumber
- sub.label = slabel
- sub.subscriber = unicode(cells[1])
- sub.renewdate = sdate
- yield sub
-
-
-class TimeoutPage(Page):
-
- def on_loaded(self):
- pass
diff --git a/modules/gdfsuez/test.py b/modules/gdfsuez/test.py
deleted file mode 100644
index 70f66fd66cf68d145c0dde6dec30313ac3865281..0000000000000000000000000000000000000000
--- a/modules/gdfsuez/test.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Mathieu Jourdan
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-# This is a clone of freemobile/test.py for the gdfsuez module
-from weboob.tools.test import BackendTest
-
-
-class GdfSuezTest(BackendTest):
- MODULE = 'gdfsuez'
-
- def test_gdfsuez(self):
- for subscription in self.backend.iter_subscription():
- list(self.backend.iter_history(subscription.id))
- for bill in self.backend.iter_documents(subscription.id):
- self.backend.download_document(bill.id)
diff --git a/modules/genericnewspaper/module.py b/modules/genericnewspaper/module.py
index 30bcf1e821680ad0d6d6df839f62f6dd199249f1..8e07af9c8b8f3e4840cffd343c7769c77336eb34 100644
--- a/modules/genericnewspaper/module.py
+++ b/modules/genericnewspaper/module.py
@@ -35,7 +35,7 @@ class GenericNewspaperModule(Module):
MAINTAINER = u'Julien Hebert'
DESCRIPTION = u'Generic module that helps to handle newspapers modules'
EMAIL = 'juke@free.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
STORAGE = {'seen': {}}
RSS_FEED = None
diff --git a/modules/github/module.py b/modules/github/module.py
index c8ce8a30eda8a89748492fae05d2c13afb9a620e..c3bdd44092457d0a8b6701d82f98d7b7d713aeaf 100644
--- a/modules/github/module.py
+++ b/modules/github/module.py
@@ -42,7 +42,7 @@ class GithubModule(Module, CapBugTracker):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('username', label='Username', default=''),
ValueBackendPassword('password', label='Password or Personal token', default=''))
diff --git a/modules/gls/module.py b/modules/gls/module.py
index ce19571636fe9a84a219f7d215f8e3717460e043..02f7bd1d0b75576e7296d1de286445a6733a1bca 100644
--- a/modules/gls/module.py
+++ b/modules/gls/module.py
@@ -33,7 +33,7 @@ class GLSModule(Module, CapParcel):
MAINTAINER = u'Matthieu Weber'
EMAIL = 'mweber+weboob@free.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = GLSBrowser
diff --git a/modules/gmf/module.py b/modules/gmf/module.py
index 5762ed8a439012f6c89ca9298cb53ca7df1dd847..e53030aa8a56e8df80c2dc9b09300e3f5388fab3 100644
--- a/modules/gmf/module.py
+++ b/modules/gmf/module.py
@@ -37,7 +37,7 @@ class GmfModule(Module, CapBankWealth):
MAINTAINER = 'Tony Malto'
EMAIL = 'tmalto.bi@gmail.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Numéro de sociétaire', masked=False),
ValueBackendPassword('password', label='Code personnel'))
diff --git a/modules/googletranslate/module.py b/modules/googletranslate/module.py
index 895c95c9e9f862e7515b63074a3dc2b64b781fd0..d3e77f9d6c1a7f996a2348cffba318de320d00fb 100644
--- a/modules/googletranslate/module.py
+++ b/modules/googletranslate/module.py
@@ -33,7 +33,7 @@ __all__ = ['GoogleTranslateModule']
class GoogleTranslateModule(Module, CapTranslate):
MAINTAINER = u'Lucien Loiseau'
EMAIL = 'loiseau.lucien@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
NAME = 'googletranslate'
DESCRIPTION = u'Google translation web service'
diff --git a/modules/groupama/module.py b/modules/groupama/module.py
index 08e1d3c2ae0be34648d2d43bbd9e03db1bef6884..e79729010041dd05408fb25c90d951d388a55366 100644
--- a/modules/groupama/module.py
+++ b/modules/groupama/module.py
@@ -33,7 +33,7 @@ class GroupamaModule(Module, CapBankWealth):
NAME = 'groupama'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'Groupama'
LICENSE = 'AGPLv3+'
CONFIG = BackendConfig(Value('login', label=u'Numéro client'), \
diff --git a/modules/groupamaes/module.py b/modules/groupamaes/module.py
index 9fd02141aafee95438cca43c3ac64045e046aaf7..80aa6edbb2707119cb2ba3b8763eef1e2ea98723 100644
--- a/modules/groupamaes/module.py
+++ b/modules/groupamaes/module.py
@@ -34,7 +34,7 @@ class GroupamaesModule(Module, CapBankPockets):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = GroupamaesBrowser
diff --git a/modules/guerrillamail/module.py b/modules/guerrillamail/module.py
index cf8077ad1b7b3dceca7b7c2f5037305953ddac85..36fb6dbc7d1d9dda6434d5dceaf4d2d28d1f5d02 100644
--- a/modules/guerrillamail/module.py
+++ b/modules/guerrillamail/module.py
@@ -34,7 +34,7 @@ class GuerrillamailModule(Module, CapMessages, CapMessagesPost):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = GuerrillamailBrowser
diff --git a/modules/happn/module.py b/modules/happn/module.py
index 6d6fc5a5478b913a507d375a41af43748e13d763..be1790033d7227949c2026b8d48dae3bcec273f0 100644
--- a/modules/happn/module.py
+++ b/modules/happn/module.py
@@ -189,7 +189,7 @@ class HappnModule(Module, CapMessages, CapMessagesPost, CapDating, CapContact):
MAINTAINER = u'Roger Philibert'
EMAIL = 'roger.philibert@gmail.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('username', label='Facebook email'),
ValueBackendPassword('password', label='Facebook password'),
Value('location', label='Location (example: 49.6008457,6.129709)'),
diff --git a/modules/hds/module.py b/modules/hds/module.py
index 6e91ce0fb8941eb7e338b7b82ba482346b0217f3..60f8dcea0105ea73088aac749385552094392177 100644
--- a/modules/hds/module.py
+++ b/modules/hds/module.py
@@ -31,7 +31,7 @@ class HDSModule(Module, CapMessages):
NAME = 'hds'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u"Histoires de Sexe French erotic novels"
STORAGE = {'seen': []}
diff --git a/modules/hsbc/module.py b/modules/hsbc/module.py
index 5293ea5b6970f77832ca10759996ea1a0229d482..3b8f48c7e343a91685d9ba54a7dfdd7abfe3ade7 100644
--- a/modules/hsbc/module.py
+++ b/modules/hsbc/module.py
@@ -33,7 +33,7 @@ class HSBCModule(Module, CapBankWealth, CapProfile):
NAME = 'hsbc'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = 'HSBC France'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False),
diff --git a/modules/hybride/module.py b/modules/hybride/module.py
index 556c3a0fc403dece866a6b0c0eb7ca0021f8b728..2ca8a1f0b21a12cf93d4db29feb55d681cda97ac 100644
--- a/modules/hybride/module.py
+++ b/modules/hybride/module.py
@@ -33,7 +33,7 @@ class HybrideModule(Module, CapCalendarEvent):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
ASSOCIATED_CATEGORIES = [CATEGORIES.CINE]
BROWSER = HybrideBrowser
diff --git a/modules/ideel/module.py b/modules/ideel/module.py
index 1639320a2e20dd6249161ff412e9d789ffbd6d1d..261b55a029ec9730b88db403f0d026b10e4d5fd7 100644
--- a/modules/ideel/module.py
+++ b/modules/ideel/module.py
@@ -31,7 +31,7 @@ class IdeelModule(Module, CapShop):
NAME = 'ideel'
MAINTAINER = u'Oleg Plakhotniuk'
EMAIL = 'olegus8@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'Ideel'
CONFIG = BackendConfig(
diff --git a/modules/ilmatieteenlaitos/module.py b/modules/ilmatieteenlaitos/module.py
index dc5fb9f93458d831812a2d73f9822badb21ec628..f6466649d691ecd28f853c75fbac49255ceac724 100644
--- a/modules/ilmatieteenlaitos/module.py
+++ b/modules/ilmatieteenlaitos/module.py
@@ -31,7 +31,7 @@ class IlmatieteenlaitosModule(Module, CapWeather):
NAME = 'ilmatieteenlaitos'
MAINTAINER = u'Matthieu Weber'
EMAIL = 'mweber+weboob@free.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Get forecasts from the Ilmatieteenlaitos.fi website'
LICENSE = 'AGPLv3+'
BROWSER = IlmatieteenlaitosBrowser
diff --git a/modules/imdb/module.py b/modules/imdb/module.py
index aa7755de85f4b19c9c0e929dfd738b24971770d1..2e5fc83e073a5fa6bd5f6011d738465e1e6c555b 100644
--- a/modules/imdb/module.py
+++ b/modules/imdb/module.py
@@ -32,7 +32,7 @@ class ImdbModule(Module, CapCinema):
NAME = 'imdb'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Internet Movie Database service'
LICENSE = 'AGPLv3+'
BROWSER = ImdbBrowser
diff --git a/modules/imgur/module.py b/modules/imgur/module.py
index 601022c1dcf36884ca7c0f7ad0806674d83f9081..f8e46baa772be6c2c60382531d2d65d8cc2288cb 100644
--- a/modules/imgur/module.py
+++ b/modules/imgur/module.py
@@ -75,7 +75,7 @@ class ImgurModule(Module, CapPaste, CapGallery, CapImage):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = ImgurBrowser
diff --git a/modules/ina/module.py b/modules/ina/module.py
index b39894e116c7dcb0617b0deb0a68a1a2cc5db102..a8524806e674516072572ec71b739adf4ef7fdad 100644
--- a/modules/ina/module.py
+++ b/modules/ina/module.py
@@ -32,7 +32,7 @@ class InaModule(Module, CapVideo, CapAudio):
NAME = 'ina'
MAINTAINER = u'Christophe Benz'
EMAIL = 'christophe.benz@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'INA French TV video archives'
LICENSE = 'AGPLv3+'
BROWSER = InaBrowser
diff --git a/modules/indeed/module.py b/modules/indeed/module.py
index 3d5f85387e3ee5b23d37e82cd0ef051017a9871f..ffb84ba1e3d8829bd7895b42b67c9804e973fcd3 100644
--- a/modules/indeed/module.py
+++ b/modules/indeed/module.py
@@ -34,7 +34,7 @@ class IndeedModule(Module, CapJob):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = IndeedBrowser
diff --git a/modules/infomaniak/module.py b/modules/infomaniak/module.py
index 1ee118d9338e2a1b8462ae54f6da7dd03c2e342a..4a1c504f2b662dcdacba887ba67fdd419b8d59c5 100644
--- a/modules/infomaniak/module.py
+++ b/modules/infomaniak/module.py
@@ -37,7 +37,7 @@ class InfomaniakModule(Module, CapDocument):
MAINTAINER = 'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Email de connexion', masked=False),
ValueBackendPassword('password', label='Mot de passe'))
diff --git a/modules/ing/module.py b/modules/ing/module.py
index 871a72ef581d4f6ab1e3556480035848485ca53b..6ccab17366f9dc5c5e983f18ce6d4521eced9ad4 100644
--- a/modules/ing/module.py
+++ b/modules/ing/module.py
@@ -41,7 +41,7 @@ class INGModule(Module, CapBankWealth, CapBankTransfer, CapDocument, CapProfile)
NAME = 'ing'
MAINTAINER = u'Florent Fourcot'
EMAIL = 'weboob@flo.fourcot.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = 'ING Direct'
CONFIG = BackendConfig(ValueBackendPassword('login',
diff --git a/modules/inrocks/module.py b/modules/inrocks/module.py
index f41b28ac595cbb135944a45fe24add6bb6373bcf..59fed602b63212358ea01461146e62cfb506e7c2 100644
--- a/modules/inrocks/module.py
+++ b/modules/inrocks/module.py
@@ -28,7 +28,7 @@ from .tools import rssid
class NewspaperInrocksModule(AbstractModule, CapMessages):
MAINTAINER = u'Julien Hebert'
EMAIL = 'juke@free.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
STORAGE = {'seen': {}}
NAME = 'inrocks'
diff --git a/modules/ipapi/module.py b/modules/ipapi/module.py
index d30cf2b9c7a40c29e5373b2084137d19af7fd447..a9a71c2d6e86538305713f9794cc94ce7115fe6f 100644
--- a/modules/ipapi/module.py
+++ b/modules/ipapi/module.py
@@ -31,7 +31,7 @@ class IpapiModule(Module, CapGeolocIp):
NAME = 'ipapi'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u"IP-API Geolocation API"
BROWSER = Browser
diff --git a/modules/ipinfodb/module.py b/modules/ipinfodb/module.py
index 0da0adc68c2cfad766bbf0fd50909cd8827afac7..6b7c92b0128a5297da79da3f856bdf6f4178b0c2 100644
--- a/modules/ipinfodb/module.py
+++ b/modules/ipinfodb/module.py
@@ -31,7 +31,7 @@ class IpinfodbModule(Module, CapGeolocIp):
NAME = 'ipinfodb'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u"IPInfoDB IP addresses geolocation service"
BROWSER = IpinfodbBrowser
diff --git a/modules/itella/module.py b/modules/itella/module.py
index 3539ee7218f539d997b3849a534b74c24eb3a723..13a5fd2e66a64ef2a059e018e738ee38cbe79ff3 100644
--- a/modules/itella/module.py
+++ b/modules/itella/module.py
@@ -33,7 +33,7 @@ class ItellaModule(Module, CapParcel):
MAINTAINER = u'Matthieu Weber'
EMAIL = 'mweber+weboob@free.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = ItellaBrowser
diff --git a/modules/izneo/__init__.py b/modules/izneo/__init__.py
deleted file mode 100644
index 8da0d5594ce092aefcda8c44a0effcf41fde3f39..0000000000000000000000000000000000000000
--- a/modules/izneo/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Roger Philibert
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from .module import IzneoModule
-
-__all__ = ['IzneoModule']
diff --git a/modules/izneo/favicon.png b/modules/izneo/favicon.png
deleted file mode 100644
index c883a32d6046f12c582c8927179825a31cb94f4e..0000000000000000000000000000000000000000
Binary files a/modules/izneo/favicon.png and /dev/null differ
diff --git a/modules/izneo/module.py b/modules/izneo/module.py
deleted file mode 100644
index 03840bb4f5acb3d175b584fce806c8ff45c7af69..0000000000000000000000000000000000000000
--- a/modules/izneo/module.py
+++ /dev/null
@@ -1,96 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Roger Philibert
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-import re
-
-from weboob.capabilities.gallery import CapGallery, BaseGallery, BaseImage
-from weboob.tools.json import json
-from weboob.tools.backend import Module
-from weboob.deprecated.browser import Browser, Page
-
-__all__ = ['IzneoModule']
-
-
-class ReaderV2(Page):
- def get_ean(self):
- return self.document.xpath("//div[@id='viewer']/attribute::rel")[0]
-
- def iter_gallery_images(self, gallery):
- ean = self.get_ean()
- pages = json.load(self.browser.openurl(
- 'http://www.izneo.com/playerv2/ajax.php?ean=%s&action=get_list_jpg'
- % ean))
-
- for page in pages['list']:
- width = 1200 # maximum width
- yield BaseImage(page['page'],
- gallery=gallery,
- url=("http://www.izneo.com/playerv2/%s/%s/%s/%d/%s" %
- (page['expires'], page['token'], ean, width, page['page'])))
-
-
-class IzneoBrowser(Browser):
- PAGES = {r'http://.+\.izneo.\w+/readv2-.+': ReaderV2}
-
- def iter_gallery_images(self, gallery):
- self.location(gallery.url)
- assert self.is_on_page(ReaderV2)
- return self.page.iter_gallery_images(gallery)
-
- def fill_image(self, image, fields):
- if 'data' in fields:
- image.data = self.readurl(self.request_class(
- image.url, None, {'Referer': image.gallery.url}))
-
-
-class IzneoModule(Module, CapGallery):
- NAME = 'izneo'
- MAINTAINER = u'Roger Philibert'
- EMAIL = 'roger.philibert@gmail.com'
- VERSION = '1.4'
- DESCRIPTION = 'Izneo digital comics'
- LICENSE = 'AGPLv3+'
- BROWSER = IzneoBrowser
-
- def iter_gallery_images(self, gallery):
- with self.browser:
- return self.browser.iter_gallery_images(gallery)
-
- def get_gallery(self, _id):
- match = re.match(r'(?:(?:.+izneo.com/)?readv2-)?(\d+-\d+)/?$', _id)
- if match is None:
- return None
-
- _id = match.group(1)
-
- gallery = BaseGallery(_id, url=('http://www.izneo.com/readv2-%s' % _id))
- with self.browser:
- return gallery
-
- def fill_gallery(self, gallery, fields):
- gallery.title = gallery.id
-
- def fill_image(self, image, fields):
- with self.browser:
- self.browser.fill_image(image, fields)
-
- OBJECTS = {
- BaseGallery: fill_gallery,
- BaseImage: fill_image}
diff --git a/modules/jacquieetmichel/__init__.py b/modules/jacquieetmichel/__init__.py
deleted file mode 100644
index c2c25391a84f6bdaab9939445f34faedb66865d8..0000000000000000000000000000000000000000
--- a/modules/jacquieetmichel/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Romain Bignon
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from .module import JacquieEtMichelModule
-
-__all__ = ['JacquieEtMichelModule']
diff --git a/modules/jacquieetmichel/browser.py b/modules/jacquieetmichel/browser.py
deleted file mode 100644
index 21a379bda38f0b9b8a171037f1abc74627c828a2..0000000000000000000000000000000000000000
--- a/modules/jacquieetmichel/browser.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Roger Philibert
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.deprecated.browser import Browser
-from weboob.deprecated.browser.decorators import id2url
-from weboob.tools.compat import quote
-
-from .video import JacquieEtMichelVideo
-from .pages import VideoPage, ResultsPage
-
-
-__all__ = ['JacquieEtMichelBrowser']
-
-
-class JacquieEtMichelBrowser(Browser):
- DOMAIN = u'jacquieetmicheltv.net'
- ENCODING = None
- PAGES = {r'https?://.*jacquieetmicheltv.net/': ResultsPage,
- r'https?://.*jacquieetmicheltv.net/videolist/.*': ResultsPage,
- r'https?://.*jacquieetmicheltv.net/showvideo/(?P\d+)/.*': VideoPage,
- }
-
- @id2url(JacquieEtMichelVideo.id2url)
- def get_video(self, url, video=None):
- self.location(url)
- assert self.is_on_page(VideoPage), 'Should be on video page.'
- return self.page.get_video(video)
-
- def search_videos(self, pattern):
- self.location('/videolist/searchmodevideo/query%s/' % (quote(pattern.encode('utf-8'))))
- assert self.is_on_page(ResultsPage)
- return self.page.iter_videos()
-
- def latest_videos(self):
- self.home()
- assert self.is_on_page(ResultsPage)
- return self.page.iter_videos()
diff --git a/modules/jacquieetmichel/favicon.png b/modules/jacquieetmichel/favicon.png
deleted file mode 100644
index cb8548498dcbd0b26e12b255770a7c0a4d1ee03c..0000000000000000000000000000000000000000
Binary files a/modules/jacquieetmichel/favicon.png and /dev/null differ
diff --git a/modules/jacquieetmichel/module.py b/modules/jacquieetmichel/module.py
deleted file mode 100644
index 77823bcd4d77582f37cf985d88d1a9082d2bc97f..0000000000000000000000000000000000000000
--- a/modules/jacquieetmichel/module.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Roger Philibert
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.capabilities.video import CapVideo, BaseVideo
-from weboob.capabilities.collection import CapCollection, CollectionNotFound
-from weboob.tools.backend import Module
-
-from .browser import JacquieEtMichelBrowser
-from .video import JacquieEtMichelVideo
-
-
-__all__ = ['JacquieEtMichelModule']
-
-
-class JacquieEtMichelModule(Module, CapVideo, CapCollection):
- NAME = 'jacquieetmichel'
- MAINTAINER = u'Roger Philibert'
- EMAIL = 'roger.philibert@gmail.com'
- VERSION = '1.4'
- DESCRIPTION = 'Jacquie et Michel TV'
- LICENSE = 'AGPLv3+'
- BROWSER = JacquieEtMichelBrowser
-
- def get_video(self, _id):
- with self.browser:
- video = self.browser.get_video(_id)
- return video
-
- def search_videos(self, pattern, sortby=CapVideo.SEARCH_RELEVANCE, nsfw=False):
- if not nsfw:
- return iter([])
-
- with self.browser:
- return self.browser.search_videos(pattern)
-
- def fill_video(self, video, fields):
- if fields != ['thumbnail']:
- # if we don't want only the thumbnail, we probably want also every fields
- with self.browser:
- video = self.browser.get_video(JacquieEtMichelVideo.id2url(video.id), video)
- if 'thumbnail' in fields and video.thumbnail:
- with self.browser:
- video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
-
- return video
-
- def iter_resources(self, objs, split_path):
- if BaseVideo in objs:
- collection = self.get_collection(objs, split_path)
- if collection.path_level == 0:
- yield self.get_collection(objs, [u'latest_nsfw'])
- if collection.split_path == [u'latest_nsfw']:
- for video in self.browser.latest_videos():
- yield video
-
- def validate_collection(self, objs, collection):
- if collection.path_level == 0:
- return
- if BaseVideo in objs and collection.split_path == [u'latest_nsfw']:
- collection.title = u'Latest Jacquie & Michel videos (NSFW)'
- return
- raise CollectionNotFound(collection.split_path)
-
- OBJECTS = {JacquieEtMichelVideo: fill_video}
diff --git a/modules/jacquieetmichel/pages.py b/modules/jacquieetmichel/pages.py
deleted file mode 100644
index 834395203169f56f4faf0568719989a6a847c35a..0000000000000000000000000000000000000000
--- a/modules/jacquieetmichel/pages.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Roger Philibert
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-import re
-
-from weboob.capabilities.base import NotAvailable
-from weboob.capabilities.image import Thumbnail
-from weboob.deprecated.browser import Page, BrokenPageError
-from weboob.tools.misc import to_unicode
-
-from .video import JacquieEtMichelVideo
-
-
-class ResultsPage(Page):
- def iter_videos(self):
- for span in self.document.xpath('//ul[@id="list"]/li'):
- a = self.parser.select(span, 'a', 1)
- url = a.attrib['href']
- _id = re.sub(r'/showvideo/(\d+)/.*', r'\1', url)
-
- video = JacquieEtMichelVideo(_id)
-
- url = span.find('.//img').attrib['src']
- video.thumbnail = Thumbnail(url)
- video.thumbnail.url = video.thumbnail.id
-
- title_el = self.parser.select(span, 'h2', 1)
- video.title = to_unicode(title_el.text.strip())
- video.description = self.parser.tocleanstring(span.xpath('.//div[@class="desc"]')[0])
- video.set_empty_fields(NotAvailable, ('url,'))
-
- yield video
-
-
-class VideoPage(Page):
- def get_video(self, video=None):
- _id = to_unicode(self.group_dict['id'])
- if video is None:
- video = JacquieEtMichelVideo(_id)
- title_el = self.parser.select(self.document.getroot(), 'h1', 1)
- video.title = to_unicode(title_el.text.strip())
- video.description = self.document.xpath('//meta[@name="description"]')[0].attrib['content']
-
- for script in self.document.xpath('.//script'):
- if script.text is None:
- continue
- m = re.search('"(http://[^"]+.mp4)"', script.text, re.MULTILINE)
- if m:
- video.url = to_unicode(m.group(1))
- break
-
- if not video.url:
- raise BrokenPageError('Unable to find URL')
-
- video.set_empty_fields(NotAvailable)
-
- return video
diff --git a/modules/jacquieetmichel/test.py b/modules/jacquieetmichel/test.py
deleted file mode 100644
index 9e3b3ee5345e8df1f24ae718751ac8bcb6952338..0000000000000000000000000000000000000000
--- a/modules/jacquieetmichel/test.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Roger Philibert
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.test import BackendTest
-from weboob.capabilities.video import BaseVideo
-
-
-class JacquieEtMichelTest(BackendTest):
- MODULE = 'jacquieetmichel'
-
- def test_search(self):
- self.assertTrue(len(list(self.backend.search_videos('anus', nsfw=False))) == 0)
-
- l = list(self.backend.search_videos('anus', nsfw=True))
- self.assertTrue(len(l) > 0)
- v = l[0]
- self.backend.fillobj(v, ('url',))
- self.assertTrue(v.url and v.url.startswith('http://'), 'URL for video "%s" not found: %s' % (v.id, v.url))
- self.backend.browser.openurl(v.url)
-
- def test_latest(self):
- l = list(self.backend.iter_resources([BaseVideo], [u'latest_nsfw']))
- self.assertTrue(len(l) > 0)
- v = l[0]
- self.backend.fillobj(v, ('url',))
- self.assertTrue(v.url and v.url.startswith('http://'), 'URL for video "%s" not found: %s' % (v.id, v.url))
diff --git a/modules/jacquieetmichel/video.py b/modules/jacquieetmichel/video.py
deleted file mode 100644
index 838f5ad5b4fd076bafdff3f10f579810929f7453..0000000000000000000000000000000000000000
--- a/modules/jacquieetmichel/video.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Roger Philibert
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.video import BaseVideo
-
-
-class JacquieEtMichelVideo(BaseVideo):
- def __init__(self, *args, **kwargs):
- BaseVideo.__init__(self, *args, **kwargs)
- self.ext = u'mp4'
- self.nsfw = True
-
- @classmethod
- def id2url(cls, _id):
- return 'http://jacquieetmicheltv.net/showvideo/%s/t/' % _id
diff --git a/modules/jcvelaux/module.py b/modules/jcvelaux/module.py
index 25cd80495580e2ff34befa2dec720c2c885447dc..592ee0877813c2fa0bbf9770c03539e8163e54f0 100644
--- a/modules/jcvelaux/module.py
+++ b/modules/jcvelaux/module.py
@@ -54,7 +54,7 @@ class jcvelauxModule(Module, CapGauge):
', '.join(CITIES))
MAINTAINER = 'Herve Werner'
EMAIL = 'dud225@hotmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3'
BROWSER = VelibBrowser
diff --git a/modules/jirafeau/module.py b/modules/jirafeau/module.py
index c9c6ffa019dcaf63b15e00047538d5d662ef0911..c77526ba2ec82206e4a21ca329a544567c8f3c6d 100644
--- a/modules/jirafeau/module.py
+++ b/modules/jirafeau/module.py
@@ -42,7 +42,7 @@ class JirafeauModule(Module, CapPaste):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('base_url', label='Base Jirafeau URL',
description='URL of the Jirafeau-based site to use',
diff --git a/modules/journaldesfemmes/module.py b/modules/journaldesfemmes/module.py
index e413219049caf3313931e4a9ab62aad8efac6a2c..6e86629bae400dfd114ae9b341f9751af62184f5 100644
--- a/modules/journaldesfemmes/module.py
+++ b/modules/journaldesfemmes/module.py
@@ -35,7 +35,7 @@ class JournaldesfemmesModule(Module, CapRecipe):
MAINTAINER = 'Phyks (Lucas Verney)'
EMAIL = 'phyks@phyks.me'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = JournaldesfemmesBrowser
diff --git a/modules/jvmalin/__init__.py b/modules/jvmalin/__init__.py
deleted file mode 100644
index 8e89bd6fa4534997c33cac953b9af5d0635b2e36..0000000000000000000000000000000000000000
--- a/modules/jvmalin/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Alexandre Lissy
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from .module import JVMalinModule
-
-__all__ = ['JVMalinModule']
diff --git a/modules/jvmalin/browser.py b/modules/jvmalin/browser.py
deleted file mode 100644
index d01934f73fafce65b32985ac069ff8b33cf8359a..0000000000000000000000000000000000000000
--- a/modules/jvmalin/browser.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Alexandre Lissy
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.deprecated.browser import Browser
-from .pages import RoadmapSearchPage, RoadmapResultsPage, RoadmapPage, RoadmapAmbiguity
-
-
-__all__ = ['JVMalin']
-
-
-class JVMalin(Browser):
- DOMAIN = 'www.jvmalin.fr'
- PAGES = {
- 'http://www\.jvmalin\.fr/Itineraires/Recherche.*': RoadmapSearchPage,
- 'http://www\.jvmalin\.fr/Itineraires/Precision.*': RoadmapResultsPage,
- 'http://www\.jvmalin\.fr/route/vuesearch/result.*': RoadmapPage
- }
-
- def __init__(self, **kwargs):
- Browser.__init__(self, '', **kwargs)
-
- def get_roadmap(self, departure, arrival, filters):
- self.location('/Itineraires/Recherche')
-
- assert self.is_on_page(RoadmapSearchPage)
- self.page.search(departure, arrival, filters.departure_time, filters.arrival_time)
-
- assert self.is_on_page(RoadmapResultsPage)
-
- dest = ''
- try:
- dest = self.page.find_best()
- except RoadmapAmbiguity:
- self.page.resubmit_best_form()
- assert self.is_on_page(RoadmapResultsPage)
- dest = self.page.find_best()
-
- self.location(dest)
-
- roadmap = {}
- roadmap['steps'] = list(self.page.get_steps())
- return roadmap
-
- def is_logged(self):
- """ Do not need to be logged """
- return True
diff --git a/modules/jvmalin/favicon.png b/modules/jvmalin/favicon.png
deleted file mode 100644
index d51f867f111684158b9427d8f24f60cd7e0d6bac..0000000000000000000000000000000000000000
Binary files a/modules/jvmalin/favicon.png and /dev/null differ
diff --git a/modules/jvmalin/module.py b/modules/jvmalin/module.py
deleted file mode 100644
index 3e3092650b7fcc39afb30c3c52b9d3a2c9b0afaf..0000000000000000000000000000000000000000
--- a/modules/jvmalin/module.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Alexandre Lissy
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.capabilities.travel import CapTravel, RoadStep
-from weboob.tools.backend import Module
-
-from .browser import JVMalin
-
-
-__all__ = ['JVMalinModule']
-
-
-class JVMalinModule(Module, CapTravel):
- NAME = 'jvmalin'
- MAINTAINER = u'Alexandre Lissy'
- EMAIL = 'github@lissy.me'
- VERSION = '1.4'
- LICENSE = 'AGPLv3+'
- DESCRIPTION = u"Multimodal public transportation for whole Région Centre, France"
- BROWSER = JVMalin
-
- def iter_roadmap(self, departure, arrival, filters):
- with self.browser:
- roadmap = self.browser.get_roadmap(departure, arrival, filters)
-
- for s in roadmap['steps']:
- step = RoadStep(s['id'])
- step.line = s['line']
- step.start_time = s['start_time']
- step.end_time = s['end_time']
- step.departure = s['departure']
- step.arrival = s['arrival']
- step.duration = s['duration']
- yield step
diff --git a/modules/jvmalin/pages.py b/modules/jvmalin/pages.py
deleted file mode 100644
index 6184405e3e0cffdb33a132d18a4903da7f097c8a..0000000000000000000000000000000000000000
--- a/modules/jvmalin/pages.py
+++ /dev/null
@@ -1,208 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import datetime
-import re
-
-from mechanize import ItemNotFoundError
-
-from weboob.capabilities.travel import RoadmapError
-from weboob.deprecated.browser import Page
-from weboob.tools.misc import to_unicode
-
-
-class RoadmapAmbiguity(RoadmapError):
- def __init__(self, error):
- RoadmapError.__init__(self, error)
-
-
-class RoadmapSearchPage(Page):
- def search(self, departure, arrival, departure_time, arrival_time):
- match = -1
- i = 0
- for form in self.browser.forms():
- try:
- if form.attrs['id'] == 'rech-iti':
- match = i
- except KeyError:
- pass
- i += 1
-
- self.browser.select_form(nr=match)
- self.browser['Departure'] = departure
- self.browser['Destination'] = arrival
-
- time = None
- if departure_time:
- self.browser['sens'] = ['1']
- time = departure_time
- elif arrival_time:
- self.browser['sens'] = ['-1']
- time = arrival_time
-
- if time:
- try:
- self.browser['dateFull'] = '%02d/%02d/%d' % (time.day, time.month, time.year)
- self.browser['hour'] = ['%02d' % time.hour]
- self.browser['minute'] = ['%02d' % (time.minute - (time.minute % 5))]
- except ItemNotFoundError:
- raise RoadmapError('Unable to establish a roadmap with %s time at "%s"' % ('departure' if departure_time else 'arrival', time))
- self.browser.submit()
-
-
-class RoadmapResultsPage(Page):
- def html_br_strip(self, text):
- return "".join([l.strip() for l in text.split("\n")]).strip().replace(' ', '%20')
-
- def find_best(self):
- if len(self.parser.select(self.document.getroot(), 'img.img-error')) > 0:
- if len(self.parser.select(self.document.getroot(), 'form#iti-ambi')) > 0:
- raise RoadmapAmbiguity('Ambigious stop name')
- else:
- raise RoadmapError('Error when submitting form')
-
- best = self.parser.select(self.document.getroot(), 'div.alerte-bloc-important div.bloc-iti')
- if len(best) == 0:
- best = self.parser.select(self.document.getroot(), 'div.bloc-iti')
- if len(best) == 0:
- raise RoadmapError('Unable to get the best roadmap')
-
- link = self.parser.select(best[0], 'a.btn-submit')
- if len(link) == 0:
- raise RoadmapError('Unable to get a link to best roadmap')
-
- return self.html_br_strip(link[0].attrib['href'])
-
- def resubmit_best_form(self):
- if len(self.parser.select(self.document.getroot(), 'img.img-error')) == 0:
- raise RoadmapError('No error reported!')
-
- ambi = None
- i = 0
- for form in self.parser.select(self.document.getroot(), 'form'):
- if 'id' in form.attrib and form.attrib['id'] == 'iti-ambi':
- ambi = form
- break
- i += 1
-
- if ambi is None:
- raise RoadmapError('No ambigous form!')
-
- props = self.parser.select(ambi, 'span.precision-arret input')
- if len(props) == 0:
- props = self.parser.select(ambi, 'span.precision-adresse input')
- if len(props) == 0:
- raise RoadmapError('Nothing to select to get a roadmap')
-
- self.browser.select_form(nr=i)
- propname = props[0].attrib['name']
- propvalue = props[0].attrib['value'].encode('utf-8')
- self.browser[propname] = [ propvalue ]
- self.browser.submit()
-
-
-class RoadmapPage(Page):
- def get_steps(self):
- errors = []
- # for p in self.parser.select(self.document.getroot(), 'p.errors'):
- # if p.text:
- # errors.append(p.text.strip())
-
- if len(errors) > 0:
- raise RoadmapError('Unable to establish a roadmap: %s' % ', '.join(errors))
-
- current_step = None
- i = 0
- for tr in self.parser.select(self.document.getroot(), 'table.itineraire-detail tr'):
- if current_step is None:
- current_step = {
- 'id': i,
- 'start_time': datetime.datetime.now(),
- 'end_time': datetime.datetime.now(),
- 'line': '',
- 'departure': '',
- 'arrival': '',
- 'duration': datetime.timedelta()
- }
-
- if 'class' in tr.attrib:
- if 'bg-ligne' in tr.attrib['class']:
- continue
-
- if 'iti-map' in tr.attrib['class']:
- continue
-
- for td in self.parser.select(tr, 'td'):
- if 'class' not in td.attrib:
- continue
-
- if 'iti-inner' in td.attrib['class']:
- continue
-
- if 'cell-infos' in td.attrib['class']:
- if 'id' in td.attrib:
- if td.attrib['id'].find('MapOpenLink') >= 0:
- hasA = self.parser.select(td, 'a')
- if len(hasA) == 0:
- if len(current_step['line']) > 0 and \
- len(current_step['departure']) > 0 and \
- len(current_step['arrival']) > 0:
- current_step['line'] = to_unicode("%s : %s" %
- (current_step['mode'], current_step['line']))
- del current_step['mode']
- yield current_step
- i += 1
- current_step = None
- continue
-
- if 'cell-horaires' in td.attrib['class']:
- # real start
- for heure in self.parser.select(td, 'span.heure'):
- if heure.attrib['id'].find('FromTime') >= 0:
- current_step['start_time'] = self.parse_time(heure.text)
- if heure.attrib['id'].find('ToTime') >= 0:
- current_step['end_time'] = self.parse_time(heure.text)
- for mode in self.parser.select(td, 'span.mode-locomotion img'):
- current_step['mode'] = mode.attrib['title']
-
- if 'cell-details' in td.attrib['class']:
- # If we get a span, it's a line indication,
- # otherwise check for id containing LibDeparture or
- # LibDestination
- spans = self.parser.select(td, 'span.itineraire-ligne')
- if len(spans) == 1:
- line = self.html_br_strip(spans[0].text, " ").replace('Ligne ', '')
- if line.index('- ') == 0:
- line = re.sub(r'^- ', '', line)
- current_step['line'] = line
-
- elif 'id' in td.attrib:
- stops = self.parser.select(td, 'strong')
- stop = self.html_br_strip(stops[0].text, " ")
-
- if td.attrib['id'].find('LibDeparture') >= 0:
- current_step['departure'] = to_unicode(stop)
-
- if td.attrib['id'].find('LibDestination') >= 0:
- current_step['arrival'] = to_unicode(stop)
-
- duree = self.parser.select(td, 'span.duree strong')
- if len(duree) == 1:
- current_step['duration'] = self.parse_duration(duree[0].text)
-
- def html_br_strip(self, text, joining=""):
- return joining.join([l.strip() for l in text.split("\n")]).strip()
-
- def parse_time(self, time):
- time = self.html_br_strip(time)
- h, m = time.split('h')
- return datetime.time(int(h), int(m))
-
- def parse_duration(self, dur):
- dur = self.html_br_strip(dur)
- m = re.match('(\d+)min', dur)
- if m:
- return datetime.timedelta(minutes=int(m.group(1)))
- m = re.match('(\d+)h(\d+)', dur)
- if m:
- return datetime.timedelta(hours=int(m.group(1)),
- minutes=int(m.group(2)))
diff --git a/modules/jvmalin/test.py b/modules/jvmalin/test.py
deleted file mode 100644
index b0b954ac7567358419c8fe9a7a62c7832baf8b85..0000000000000000000000000000000000000000
--- a/modules/jvmalin/test.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Alexandre Lissy
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-import datetime
-
-from weboob.capabilities.travel import RoadmapFilters
-from weboob.tools.test import BackendTest
-
-
-class JVMalinTest(BackendTest):
- MODULE = 'jvmalin'
-
- def test_roadmap_cities(self):
- filters = RoadmapFilters()
- roadmap = list(self.backend.iter_roadmap('Tours', 'Orléans', filters))
- self.assertTrue(len(roadmap) > 0)
-
- def test_roadmap_stop_intercity(self):
- filters = RoadmapFilters()
- roadmap = list(self.backend.iter_roadmap('Tours Jean-Jaurès', 'Orléans', filters))
- self.assertTrue(len(roadmap) > 0)
-
- def test_roadmap_stop_intracity(self):
- filters = RoadmapFilters()
- roadmap = list(self.backend.iter_roadmap('Tours Jean-Jaurès', 'Polytech Tours', filters))
- self.assertTrue(len(roadmap) > 0)
-
- def test_roadmap_stop_intracity2(self):
- filters = RoadmapFilters()
- roadmap = list(self.backend.iter_roadmap('J.P.Rameau', 'Polytech Tours', filters))
- self.assertTrue(len(roadmap) > 0)
-
- def test_roadmap_names(self):
- filters = RoadmapFilters()
- roadmap = list(self.backend.iter_roadmap('Artannes Mairie', 'Château de Blois', filters))
- self.assertTrue(len(roadmap) > 0)
-
- def test_roadmap_long(self):
- filters = RoadmapFilters()
- roadmap = list(self.backend.iter_roadmap('Chartres', 'Ballan-Miré', filters))
- self.assertTrue(len(roadmap) > 0)
-
- def test_roadmap_departure(self):
- filters = RoadmapFilters()
- filters.departure_time = datetime.datetime.now() + datetime.timedelta(days=1)
- roadmap = list(self.backend.iter_roadmap('Chartres', 'Ballan-Miré', filters))
- self.assertTrue(len(roadmap) > 0)
-
- def test_roadmap_arrival(self):
- filters = RoadmapFilters()
- filters.arrival_time = datetime.datetime.now() + datetime.timedelta(days=1)
- roadmap = list(self.backend.iter_roadmap('Chartres', 'Ballan-Miré', filters))
- self.assertTrue(len(roadmap) > 0)
diff --git a/modules/kickass/module.py b/modules/kickass/module.py
index 3cf4774486b7f7c058a0627181f0368cd50af269..fce01f17ff586a3685b39c02b9070d4668771377 100644
--- a/modules/kickass/module.py
+++ b/modules/kickass/module.py
@@ -33,7 +33,7 @@ class KickassModule(Module, CapTorrent):
NAME = 'kickass'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Kickass Torrents BitTorrent tracker'
LICENSE = 'AGPLv3+'
BROWSER = KickassBrowser
diff --git a/modules/kiwibank/module.py b/modules/kiwibank/module.py
index 37d9048cda4f8082731962d6179e39f2fae1f334..4f43fbb04c01dd2f31211e9869466bfa796f503a 100644
--- a/modules/kiwibank/module.py
+++ b/modules/kiwibank/module.py
@@ -32,7 +32,7 @@ class KiwibankModule(Module, CapBank):
NAME = 'kiwibank'
MAINTAINER = u'Cédric Félizard'
EMAIL = 'cedric@felizard.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'Kiwibank'
CONFIG = BackendConfig(
diff --git a/modules/lacentrale/module.py b/modules/lacentrale/module.py
index 6cdac53de4065ec111d62f99dbf560392fbf55a5..a8671e6a26e96214531b2cf338839d128207d6db 100644
--- a/modules/lacentrale/module.py
+++ b/modules/lacentrale/module.py
@@ -31,7 +31,7 @@ class LaCentraleModule(Module, CapPriceComparison):
NAME = 'lacentrale'
MAINTAINER = u'Vicnet'
EMAIL = 'vo.publique@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Vehicule prices at LaCentrale.fr'
LICENSE = 'AGPLv3+'
BROWSER = LaCentraleBrowser
diff --git a/modules/lameteoagricole/module.py b/modules/lameteoagricole/module.py
index 0a2dea9d7f931239bcd61431187ea628a5e1a252..932cd9d3041f0d97be8043f7d1065e1f7ab5a574 100644
--- a/modules/lameteoagricole/module.py
+++ b/modules/lameteoagricole/module.py
@@ -35,7 +35,7 @@ class LameteoagricoleModule(Module, CapWeather):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = LameteoagricoleBrowser
diff --git a/modules/lampiris/module.py b/modules/lampiris/module.py
index d6d97c4f5c0830496f7a449eb46c4a7f08ea7e23..5c6181e1b8bcb3dd57d260e4ccfb62dc110ad5c9 100644
--- a/modules/lampiris/module.py
+++ b/modules/lampiris/module.py
@@ -37,7 +37,7 @@ class LampirisModule(Module, CapDocument):
MAINTAINER = u'Phyks (Lucas Verney)'
EMAIL = 'phyks@phyks.me'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
Value(
diff --git a/modules/larousse/module.py b/modules/larousse/module.py
index 332fd617e59d00aac6383f8991078f278b14d2e6..be44c87090b95ad3b4916e3fe3b062c3a2af0930 100644
--- a/modules/larousse/module.py
+++ b/modules/larousse/module.py
@@ -33,7 +33,7 @@ class LarousseModule(Module, CapTranslate):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = LarousseBrowser
diff --git a/modules/lcl/module.py b/modules/lcl/module.py
index 8c18a10854ab656031d27a989d794ceefd867161..34d3a9f0daaba201927b2b10362d7a45b295f795 100644
--- a/modules/lcl/module.py
+++ b/modules/lcl/module.py
@@ -57,7 +57,7 @@ class LCLModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapContact,
NAME = 'lcl'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'LCL'
LICENSE = 'AGPLv3+'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False),
diff --git a/modules/ldlc/module.py b/modules/ldlc/module.py
index c72591af01591993af06d8bdac5fb45fc9d71b9e..dcd136c81d6529a1cb400f1285e017d6a8551c64 100644
--- a/modules/ldlc/module.py
+++ b/modules/ldlc/module.py
@@ -35,7 +35,7 @@ class LdlcModule(Module, CapDocument):
MAINTAINER = u'Vincent Paredes'
EMAIL = 'vparedes@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('login', label='Email'),
ValueBackendPassword('password', label='Password'),
Value('website', label='Site web', default='part',
diff --git a/modules/leboncoin/module.py b/modules/leboncoin/module.py
index eaf69a7b7bf9e06f8ad8f416689d512a6f4853bd..4a0cc789b187edf5f336300cb732000a37ea457e 100644
--- a/modules/leboncoin/module.py
+++ b/modules/leboncoin/module.py
@@ -32,7 +32,7 @@ class LeboncoinModule(Module, CapHousing):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = LeboncoinBrowser
diff --git a/modules/leclercmobile/__init__.py b/modules/leclercmobile/__init__.py
deleted file mode 100644
index 709018936ef7df6bd9f37b26e96e7e5c01a0850e..0000000000000000000000000000000000000000
--- a/modules/leclercmobile/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from .module import LeclercMobileModule
-
-__all__ = ['LeclercMobileModule']
diff --git a/modules/leclercmobile/browser.py b/modules/leclercmobile/browser.py
deleted file mode 100644
index e134bd86aa5a10226f40e6bce83f480ec336ac21..0000000000000000000000000000000000000000
--- a/modules/leclercmobile/browser.py
+++ /dev/null
@@ -1,152 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Fourcot Florent
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-import time
-from io import BytesIO
-
-from weboob.deprecated.browser import Browser, BrowserIncorrectPassword
-from .pages import HomePage, LoginPage, HistoryPage, PdfPage
-from weboob.capabilities.bill import Detail
-from weboob.capabilities.base import NotAvailable
-
-
-__all__ = ['Leclercmobile']
-
-
-class Leclercmobile(Browser):
- DOMAIN = 'www.securelmobile.fr'
- PROTOCOL = 'https'
- ENCODING = 'utf-8'
- PAGES = {'.*pgeWERL008_Login.aspx.*': LoginPage,
- '.*EspaceClient/pgeWERL013_Accueil.aspx': HomePage,
- '.*pgeWERL009_ReleveConso.aspx.*': HistoryPage,
- '.*ReleveConso.ashx.*': PdfPage
- }
- accueil = "/EspaceClient/pgeWERL013_Accueil.aspx"
- login = "/EspaceClient/pgeWERL008_Login.aspx"
- conso = "/EspaceClient/pgeWERL009_ReleveConso.aspx"
- bills = '/EspaceClient/pgeWERL015_RecupReleveConso.aspx?m=-'
-
- def __init__(self, *args, **kwargs):
- Browser.__init__(self, *args, **kwargs)
-
- def home(self):
- self.location(self.accueil)
-
- def is_logged(self):
- return not self.is_on_page(LoginPage)
-
- def login(self):
- assert isinstance(self.username, basestring)
- assert isinstance(self.password, basestring)
- assert self.username.isdigit()
-
- if not self.is_on_page(LoginPage):
- self.location(self.login)
-
- form = self.page.login(self.username, self.password)
-
- # Site display a javascript popup to wait
- while self.page.iswait():
- # In this popup can be an error displayed
- if self.page.iserror():
- raise BrowserIncorrectPassword()
- time.sleep(1)
- self.page.next(self.username, form)
-
- # The last document contain a redirect url in the javascript
- self.location(self.page.getredirect())
-
- if self.is_on_page(LoginPage):
- raise BrowserIncorrectPassword()
-
- def viewing_html(self):
- # To prevent unknown mimetypes sent by server, we assume we
- # are always on a HTML document.
- return True
-
- def get_subscription_list(self):
- if not self.is_on_page(HomePage):
- self.location(self.acceuil)
-
- return self.page.get_list()
-
- def get_subscription(self, id):
- assert isinstance(id, basestring)
-
- if not self.is_on_page(HomePage):
- self.location(self.accueil)
-
- l = self.page.get_list()
- for a in l:
- if a.id == id:
- return a
-
- return None
-
- def get_history(self):
- if not self.is_on_page(HistoryPage):
- self.location(self.conso)
- maxid = self.page.getmaxid()
-
- for i in range(maxid + 1):
- response = self.openurl(self.bills + str(i))
- mimetype = response.info().get('Content-Type', '').split(';')[0]
- if mimetype == "application/pdf":
- pdf = PdfPage(BytesIO(response.read()))
- for call in pdf.get_calls():
- call.label = call.label.strip()
- yield call
-
- def get_details(self):
- if not self.is_on_page(HistoryPage):
- self.location(self.conso)
- response = self.openurl(self.bills + "0")
- mimetype = response.info().get('Content-Type', '').split(';')[0]
- if mimetype == "application/pdf":
- pdf = PdfPage(BytesIO(response.read()))
- for detail in pdf.get_details():
- yield detail
-
- def iter_documents(self, parentid):
- if not self.is_on_page(HistoryPage):
- self.location(self.conso)
- return self.page.date_bills(parentid)
-
- def get_document(self, id):
- assert isinstance(id, basestring)
- if not self.is_on_page(HistoryPage):
- self.location(self.conso)
- parentid = id[0:10]
- l = self.page.date_bills(parentid)
- for a in l:
- if a.id == id:
- return a
-
- def get_balance(self):
- if not self.is_on_page(HistoryPage):
- self.location(self.conso)
- detail = Detail()
- detail.label = u"Balance"
- for calls in self.get_history():
- if "Votre solde" in calls.label:
- detail.price = calls.price
- return detail
- detail.price = NotAvailable
- return detail
diff --git a/modules/leclercmobile/favicon.png b/modules/leclercmobile/favicon.png
deleted file mode 100644
index b2d0c897f6c9921696abd59ec8d53e6a91b8c3d4..0000000000000000000000000000000000000000
Binary files a/modules/leclercmobile/favicon.png and /dev/null differ
diff --git a/modules/leclercmobile/module.py b/modules/leclercmobile/module.py
deleted file mode 100644
index c9db7639400b56b240df1483039b58b1691b4ece..0000000000000000000000000000000000000000
--- a/modules/leclercmobile/module.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.bill import CapDocument, SubscriptionNotFound,\
- DocumentNotFound, Subscription, Bill
-from weboob.tools.backend import Module, BackendConfig
-from weboob.tools.value import ValueBackendPassword
-
-from .browser import Leclercmobile
-
-
-__all__ = ['LeclercMobileModule']
-
-
-class LeclercMobileModule(Module, CapDocument):
- NAME = 'leclercmobile'
- MAINTAINER = u'Florent Fourcot'
- EMAIL = 'weboob@flo.fourcot.fr'
- VERSION = '1.4'
- LICENSE = 'AGPLv3+'
- DESCRIPTION = 'Leclerc Mobile website'
- CONFIG = BackendConfig(ValueBackendPassword('login',
- label='Account ID',
- masked=False,
- regexp='^(\d{10}|)$'),
- ValueBackendPassword('password',
- label='Password')
- )
- BROWSER = Leclercmobile
-
- def create_default_browser(self):
- return self.create_browser(self.config['login'].get(),
- self.config['password'].get())
-
- def iter_subscription(self):
- for subscription in self.browser.get_subscription_list():
- yield subscription
-
- def get_subscription(self, _id):
- if not _id.isdigit():
- raise SubscriptionNotFound()
- with self.browser:
- subscription = self.browser.get_subscription(_id)
- if subscription:
- return subscription
- else:
- raise SubscriptionNotFound()
-
- def iter_documents_history(self, subscription):
- with self.browser:
- for history in self.browser.get_history():
- if history.label != "Votre solde":
- yield history
-
- def get_document(self, id):
- with self.browser:
- bill = self.browser.get_document(id)
- if bill:
- return bill
- else:
- raise DocumentNotFound()
-
- def iter_documents(self, subscription):
- if not isinstance(subscription, Subscription):
- subscription = self.get_subscription(subscription)
-
- with self.browser:
- for bill in self.browser.iter_documents(subscription.id):
- yield bill
-
- # The subscription is actually useless, but maybe for the futur...
- def get_details(self, subscription):
- with self.browser:
- for detail in self.browser.get_details():
- yield detail
-
- def download_document(self, bill):
- if not isinstance(bill, Bill):
- bill = self.get_document(bill)
-
- with self.browser:
- return self.browser.readurl(bill.url)
-
- def get_balance(self, subscription):
- if not isinstance(subscription, Subscription):
- subscription = self.get_subscription(subscription)
- with self.browser:
- balance = self.browser.get_balance()
- balance.label = u"Balance %s" % subscription.id
- balance.id = "%s-balance" % subscription.id
- balance.currency = u'EUR'
- return balance
diff --git a/modules/leclercmobile/pages/__init__.py b/modules/leclercmobile/pages/__init__.py
deleted file mode 100644
index 05e6c00e302cafe739bc396e5fbafa73fe34f08c..0000000000000000000000000000000000000000
--- a/modules/leclercmobile/pages/__init__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from .homepage import HomePage
-from .history import HistoryPage, PdfPage
-from .login import LoginPage
-
-__all__ = ['LoginPage', 'HomePage', 'HistoryPage', 'PdfPage']
diff --git a/modules/leclercmobile/pages/history.py b/modules/leclercmobile/pages/history.py
deleted file mode 100644
index c824b77441cbbaafc33fef021ead20a855370fc2..0000000000000000000000000000000000000000
--- a/modules/leclercmobile/pages/history.py
+++ /dev/null
@@ -1,181 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-import re
-import os
-import subprocess
-import tempfile
-import shutil
-
-from datetime import datetime, date, time
-from decimal import Decimal
-
-from weboob.deprecated.browser import Page
-from weboob.capabilities.bill import Detail, Bill
-
-
-def _get_date(detail):
- return detail.datetime
-
-
-class PdfPage():
- def __init__(self, file):
- self.pdf = file
-
- def _parse_pdf(self):
- pdffile = tempfile.NamedTemporaryFile(bufsize=100000, mode='w', suffix='.pdf')
- temptxt = pdffile.name.replace('.pdf', '.txt')
- cmd = "ebook-convert"
- stdout = open("/dev/null", "w")
- shutil.copyfileobj(self.pdf, pdffile)
- pdffile.flush()
- subprocess.call([cmd, pdffile.name, temptxt], stdout=stdout)
- pdffile.close()
- txtfile = open(temptxt, 'r')
- txt = txtfile.read()
- txtfile.close()
- os.remove(temptxt)
- return txt
-
- def get_details(self):
- txt = self._parse_pdf()
- page = txt.split('CONSOMMATION')[2].split('ACTIVITE DETAILLEE')[0]
- lines = page.split('\n')
- lines = [x for x in lines if len(x) > 0] # Remove empty lines
- details = []
- detail = None
- lines.pop(-1) # Line to describes pictures
- twolines = False
- for line in lines:
- if "Votre consommation" in line:
- line = line.split(": ", 1)[1]
- if twolines:
- twolines = False
- detail.infos = unicode(line, encoding='utf-8')
- elif re.match('[A-Za-z]', line[0]):
- # We have a new element, return the other one
- if detail is not None:
- details.append(detail)
- detail = Detail()
- split = re.split("(\d)", line, maxsplit=1)
- detail.price = Decimal(0)
- if len(split) > 2:
- detail.infos = unicode(split[1] + split[2], encoding='utf-8')
- else:
- twolines = True
- if '€' in line:
- specialprice = split[1] + split[2]
- detail.price = Decimal(specialprice.replace('€', ''))
- detail.label = unicode(split[0], encoding='utf-8')
- elif '€' in line:
- detail.price = Decimal(line.replace('€', ''))
- else:
- detail.infos = unicode(line, encoding='utf-8')
- details.append(detail)
- return details
-
- # Standard pdf text extractor take text line by line
- # But the position in the file is not always the "real" position to display...
- # It produce some unsorted and unparsable data
- # Example of bad software: pdfminer and others python tools
- # This is why we have to use "ebook-convert" from calibre software,
- # it is the only one to 'reflow" text and give some relevant results
- # The bad new is that ebook-convert doesn't support simple use with stdin/stdout
- def get_calls(self):
- txt = self._parse_pdf()
- pages = txt.split("DEBIT")
- pages.pop(0) # remove headers
- details = []
- for page in pages:
- page = page.split('RÉGLO MOBILE')[0].split('N.B. Prévoir')[0] # remove footers
- lines = page.split('\n')
- lines = [x for x in lines if len(x) > 0] # Remove empty lines
- numitems = (len(lines) + 1) / 4 # Each line has five columns
- lines.pop(0) # remove the extra € symbol
- modif = 0
- i = 0
- while i < numitems:
- if modif != 0:
- numitems = ((len(lines) + 1 + modif) / 4)
- base = i * 4 - modif
- dateop = base
- corres = base + 1
- duree = base + 2
- price = base + 3
- if "Changement vers le Forfait" in lines[base]:
- modif += 1
- i += 1
- continue
- # Special case with 5 columns, the operation date is not in the first one
- if len(re.split("(\d+\/\d+\/\d+)", lines[dateop])) < 2:
- lines[base + 1] = lines[base] + " " + lines[base + 1]
- dateop = base + 1
- corres = base + 2
- duree = base + 3
- price = base + 4
- modif -= 1
- detail = Detail()
- splits = re.split("(\d+\/\d+\/\d+)", lines[dateop])
- mydate = date(*reversed([int(x) for x in splits[1].split("/")]))
- mytime = time(*[int(x) for x in splits[2].split(":")])
- detail.datetime = datetime.combine(mydate, mytime)
- if lines[corres] == '-':
- lines[corres] = ""
- if lines[duree] == '-':
- lines[duree] = ''
- detail.label = unicode(splits[0], encoding='utf-8', errors='replace') + u" " + lines[corres] + u" " + lines[duree]
- # Special case with only 3 columns, we insert a price
- if "Activation de votre ligne" in detail.label or u"Résiliation" in detail.label:
- lines.insert(price, '0')
- try:
- detail.price = Decimal(lines[price].replace(',', '.'))
- except:
- # In some special cases, there are no price column. Try to detect it
- if "Inclus" not in lines[price]:
- modif += 1
- detail.price = Decimal(0)
-
- details.append(detail)
- i += 1
- return sorted(details, key=_get_date, reverse=True)
-
-
-class HistoryPage(Page):
- def on_loaded(self):
- pass
-
- def getmaxid(self):
- max = 1
- while len(self.document.xpath('//li[@id="liMois%s"]' % max)) > 0:
- max += 1
- return max - 1
-
- def date_bills(self, parentid):
- max = 1
- while len(self.document.xpath('//li[@id="liMois%s"]' % max)) > 0:
- li = self.document.xpath('//li[@id="liMois%s"]' % max)[0]
- max += 1
- link = li.xpath('a')[0]
- bill = Bill()
- bill.url = unicode(link.attrib['href'])
- bill.label = unicode(link.text)
- bill.format = u"pdf"
- bill.type = u"bill"
- bill.id = parentid + bill.label.replace(' ', '')
- yield bill
diff --git a/modules/leclercmobile/pages/homepage.py b/modules/leclercmobile/pages/homepage.py
deleted file mode 100644
index c3002a5ac28a10cc9be764e46a0a8a9ed874c579..0000000000000000000000000000000000000000
--- a/modules/leclercmobile/pages/homepage.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.capabilities.bill import Subscription
-from weboob.deprecated.browser import Page
-
-
-class HomePage(Page):
- def on_loaded(self):
- pass
-
- def get_list(self):
- l = []
- phone = unicode(self.document.xpath('//span[@id="ctl00_ctl00_cMain_cEspCli_lblMsIsdn"]')[0].text.replace(' ', ''))
- self.browser.logger.debug('Found ' + phone + ' has phone number')
- phoneplan = unicode(self.document.xpath('//span[@id="ctl00_ctl00_cMain_cEspCli_aoaOffreActuelle_aooOffreEtOptions"]/dl/dd/span')[0].text)
- self.browser.logger.debug('Found ' + phoneplan + ' has subscription type')
-
- subscription = Subscription(phone)
- subscription.label = phone + ' - ' + phoneplan
-
- l.append(subscription)
-
- return l
diff --git a/modules/leclercmobile/pages/login.py b/modules/leclercmobile/pages/login.py
deleted file mode 100644
index 4f60ba05c579d5dd602a201bd7ab09a5d6ff209b..0000000000000000000000000000000000000000
--- a/modules/leclercmobile/pages/login.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-import StringIO
-
-from mechanize import TextControl
-
-from weboob.deprecated.browser import Page
-
-
-class LoginPage(Page):
- def on_loaded(self):
- pass
-
- def login(self, login, password):
- form = list(self.browser.forms())[0]
- self.browser.select_form("aspnetForm")
- self.browser.set_all_readonly(False)
- self.browser.controls.append(TextControl('text', '__ASYNCPOST', {'value': "true"}))
- self.browser['__EVENTTARGET'] = "ctl00$cMain$lnkValider"
- self.browser['ctl00$cMain$ascSaisieMsIsdn$txtMsIsdn'] = login.encode('iso-8859-1')
- self.browser['ctl00$cMain$txtMdp'] = password.encode('iso-8859-1')
- self.browser.submit(nologin=True)
- return form
-
- def iswait(self):
- spanwait = self.document.xpath('//span[@id="ctl00_ascAttente_timerAttente"]')
- return len(spanwait) > 0
-
- def iserror(self):
- error = self.document.xpath('//span[@id="ctl00_cMain_ascLibErreur_lblErreur"]')
- return len(error) > 0
-
- def getredirect(self):
- string = StringIO.StringIO()
- self.document.write(string)
- try:
- redirect = string.getvalue().split('pageRedirect')[1].split('|')[2]
- except:
- redirect = ''
- return redirect
-
- def next(self, login, form):
- self.browser.form = form
- string = StringIO.StringIO()
- self.document.write(string)
- controlvalue = string.getvalue().split('__EVENTVALIDATION')[1].split('|')[1]
- state = string.getvalue().split('__VIEWSTATE')[1].split('|')[1]
- self.browser.controls.append(TextControl('text', 'ctl00$objScriptManager', {'value': "ctl00$ascAttente$panelAttente|ctl00$ascAttente$timerAttente"}))
- self.browser['__VIEWSTATE'] = state
- self.browser['__EVENTTARGET'] = "ctl00$ascAttente$timerAttente"
- self.browser['__EVENTVALIDATION'] = controlvalue
- self.browser['ctl00$cMain$ascSaisieMsIsdn$txtMsIsdn'] = login.encode('iso-8859-1')
- self.browser['ctl00$cMain$txtMdp'] = ""
- self.browser.submit(nologin=True)
diff --git a/modules/leclercmobile/test.py b/modules/leclercmobile/test.py
deleted file mode 100644
index c9276354bacad4f0dff4cf892246b9eadab3c649..0000000000000000000000000000000000000000
--- a/modules/leclercmobile/test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012-2013 Fourcot Florent
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.test import BackendTest
-
-
-class LeclercMobileTest(BackendTest):
- MODULE = 'leclercmobile'
-
- def test_list(self):
- """
- Test listing of subscriptions .
- No support of multi-account on the website, we could assume to
- have only one subscription.
- Check the balance if the subscription is ok.
- """
- subscriptions = list(self.backend.iter_subscription())
- self.assertTrue(len(subscriptions) == 1, msg="Account listing failed")
- self.assertTrue(self.backend.get_balance(subscriptions[0]) > 0,
- msg="Get balance failed")
-
- def test_downloadbills(self):
- """
- Iter all bills and try to download it.
- """
- for subscription in self.backend.iter_subscription():
- for bill in self.backend.iter_documents(subscription.id):
- self.backend.download_document(bill.id)
-
- def test_history(self):
- for subscription in self.backend.iter_subscription():
- self.assertTrue(len(list(self.backend.iter_documents_history(subscription))) > 0)
-
- def test_details(self):
- for subscription in self.backend.iter_subscription():
- details = list(self.backend.get_details(subscription))
- self.assertTrue(len(details) > 5, msg="Not enough details")
- total = 0
- for d in details:
- total += d.price
- self.assertTrue(total > 0, msg="Parsing of price failed")
diff --git a/modules/lefigaro/module.py b/modules/lefigaro/module.py
index c15228c260145b1490279afba94228b13721cbc5..d2f9c0685e0d1421850fd6803e79ab6065a102fd 100644
--- a/modules/lefigaro/module.py
+++ b/modules/lefigaro/module.py
@@ -32,7 +32,7 @@ from .tools import rssid
class NewspaperFigaroModule(AbstractModule, CapMessages):
MAINTAINER = u'Julien Hebert'
EMAIL = 'juke@free.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
STORAGE = {'seen': {}}
NAME = 'lefigaro'
diff --git a/modules/liberation/module.py b/modules/liberation/module.py
index 9a0265667a28ccb0606cb483cdd62661a228a376..6838cadef521c4e6b82fdd4e6a66f201c3def81c 100644
--- a/modules/liberation/module.py
+++ b/modules/liberation/module.py
@@ -30,7 +30,7 @@ from .tools import rssid, url2id
class NewspaperLibeModule(AbstractModule, CapMessages):
MAINTAINER = u'Florent Fourcot'
EMAIL = 'weboob@flo.fourcot.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
STORAGE = {'seen': {}}
NAME = 'liberation'
diff --git a/modules/limetorrents/module.py b/modules/limetorrents/module.py
index 9c46e09fd74c183b6d3b7f63868cb7418aa87497..e0de83324dcbafa542ec2be195055eaaadba503f 100644
--- a/modules/limetorrents/module.py
+++ b/modules/limetorrents/module.py
@@ -31,7 +31,7 @@ class LimetorrentsModule(Module, CapTorrent):
NAME = 'limetorrents'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'eneiluj@posteo.net'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Limetorrents BitTorrent tracker'
LICENSE = 'AGPLv3+'
BROWSER = LimetorrentsBrowser
diff --git a/modules/linebourse/module.py b/modules/linebourse/module.py
index 37dcbbb69ab54a631e877dca2d33ef3b0423c60f..4d20700077467b226e1d6dcb967823d24ba06431 100644
--- a/modules/linebourse/module.py
+++ b/modules/linebourse/module.py
@@ -35,6 +35,6 @@ class LinebourseModule(Module, CapBank):
MAINTAINER = u'Vincent Ardisson'
EMAIL = 'vardisson@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = LinebourseBrowser
diff --git a/modules/linuxjobs/module.py b/modules/linuxjobs/module.py
index e19e2ae256fba6ec1f3625e5567816bcc67bf487..45e952e5dc5bd8c7b557d3b39caae1764a346a1d 100644
--- a/modules/linuxjobs/module.py
+++ b/modules/linuxjobs/module.py
@@ -33,7 +33,7 @@ class LinuxJobsModule(Module, CapJob):
MAINTAINER = u'François Revol'
EMAIL = 'revol@free.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = LinuxJobsBrowser
diff --git a/modules/logicimmo/module.py b/modules/logicimmo/module.py
index b0c9910563f7d5a68e9001681e568544491c2a5f..af4d94725d1942ff6b92af301ed310307bc3cc8a 100644
--- a/modules/logicimmo/module.py
+++ b/modules/logicimmo/module.py
@@ -42,7 +42,7 @@ class LogicimmoModule(Module, CapHousing):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = LogicimmoBrowser
diff --git a/modules/lolix/module.py b/modules/lolix/module.py
index a73aaba880350edb784cb728dd46aff3894ff4de..a6289a32a8ee720890d7e93c2aca5ec76b24ac34 100644
--- a/modules/lolix/module.py
+++ b/modules/lolix/module.py
@@ -33,7 +33,7 @@ class LolixModule(Module, CapJob):
DESCRIPTION = u'Lolix French free software employment website'
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
BROWSER = LolixBrowser
diff --git a/modules/lutim/module.py b/modules/lutim/module.py
index 83d3e152df12b77be19b1d0dd16a0db41cbad9ee..607870aeca203b9f3b3c6339c7da7ce85682ce0a 100644
--- a/modules/lutim/module.py
+++ b/modules/lutim/module.py
@@ -38,7 +38,7 @@ class LutimModule(Module, CapPaste):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = LutimBrowser
diff --git a/modules/lyricsdotcom/module.py b/modules/lyricsdotcom/module.py
index 6dd504ae1f848292f577e5eb354e8b7a5912e94e..76530899c60a823b1ea19f43276bfe3d38802982 100644
--- a/modules/lyricsdotcom/module.py
+++ b/modules/lyricsdotcom/module.py
@@ -31,7 +31,7 @@ class LyricsdotcomModule(Module, CapLyrics):
NAME = 'lyricsdotcom'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'eneiluj@gmx.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Lyrics.com lyrics website'
LICENSE = 'AGPLv3+'
BROWSER = LyricsdotcomBrowser
diff --git a/modules/lyricsmode/module.py b/modules/lyricsmode/module.py
index ed3bb0e585ca2afcb17727406e484e12ae821776..4095d0a02a5ed677352e0d963a214b590a70d794 100644
--- a/modules/lyricsmode/module.py
+++ b/modules/lyricsmode/module.py
@@ -31,7 +31,7 @@ class LyricsmodeModule(Module, CapLyrics):
NAME = 'lyricsmode'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'eneiluj@gmx.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Lyricsmode.com lyrics website'
LICENSE = 'AGPLv3+'
BROWSER = LyricsmodeBrowser
diff --git a/modules/lyricsplanet/module.py b/modules/lyricsplanet/module.py
index d121b180e27af03eca1b28a02c4c4f4cf52cd2a5..a00820c6eec0c946abe10ce7d396f0c1eba89dc9 100644
--- a/modules/lyricsplanet/module.py
+++ b/modules/lyricsplanet/module.py
@@ -29,7 +29,7 @@ class LyricsplanetModule(Module, CapLyrics):
NAME = 'lyricsplanet'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'eneiluj@gmx.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Lyricsplanet.com song lyrics website'
LICENSE = 'AGPLv3+'
BROWSER = LyricsplanetBrowser
diff --git a/modules/mailinator/module.py b/modules/mailinator/module.py
index 7e98fd1f0f68f1f55fb3f389df5255eb8235e050..55cb27f4a074c518d616559a2ecffa66fc5a8c41 100644
--- a/modules/mailinator/module.py
+++ b/modules/mailinator/module.py
@@ -36,7 +36,7 @@ class MailinatorModule(Module, CapMessages):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = MailinatorBrowser
diff --git a/modules/manpower/module.py b/modules/manpower/module.py
index 24cde3692bc993dc39a5594e0f6f6ef3d8012fa9..dde5be52e094333057b73397e1199195a62c2caa 100644
--- a/modules/manpower/module.py
+++ b/modules/manpower/module.py
@@ -35,7 +35,7 @@ class ManpowerModule(Module, CapJob):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = ManpowerBrowser
diff --git a/modules/mareeinfo/module.py b/modules/mareeinfo/module.py
index 1dec6421de3fe24a892b5d6afbbe6237f0abe13e..770c6d42484ad7cd74ecfc7223b9eab4ba5732ac 100644
--- a/modules/mareeinfo/module.py
+++ b/modules/mareeinfo/module.py
@@ -33,7 +33,7 @@ class MareeinfoModule(Module, CapGauge):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = MareeinfoBrowser
diff --git a/modules/marmiton/module.py b/modules/marmiton/module.py
index d830ee54f824ff9309546ffcdddf88a419e0c785..8c0b76a1c9ec9c62bcc65702c07803b834bb8f3e 100644
--- a/modules/marmiton/module.py
+++ b/modules/marmiton/module.py
@@ -31,7 +31,7 @@ class MarmitonModule(Module, CapRecipe):
NAME = 'marmiton'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'Marmiton French recipe website'
LICENSE = 'AGPLv3+'
BROWSER = MarmitonBrowser
diff --git a/modules/materielnet/module.py b/modules/materielnet/module.py
index 24a64ec4768ae63a1cb75ab372878d8013809d02..7f96ceceb172646861d396d858780d793b06f312 100644
--- a/modules/materielnet/module.py
+++ b/modules/materielnet/module.py
@@ -35,7 +35,7 @@ class MaterielnetModule(Module, CapDocument):
MAINTAINER = u'Edouard Lambert'
EMAIL = 'elambert@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Email', regex='.+@.+'),
ValueBackendPassword('password', label='Mot de passe'))
diff --git a/modules/mediawiki/module.py b/modules/mediawiki/module.py
index 1473564d6c03e90872f7ddedafb951ede845d317..7b1d1c6daece95dd645f9a48a24d87535bc12d44 100644
--- a/modules/mediawiki/module.py
+++ b/modules/mediawiki/module.py
@@ -42,7 +42,7 @@ class MediawikiModule(Module, CapContent, CapImage, CapGallery):
NAME = 'mediawiki'
MAINTAINER = u'Clément Schreiner'
EMAIL = 'clemux@clemux.info'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = 'Wikis running MediaWiki, like Wikipedia'
CONFIG = BackendConfig(Value('url', label='URL of the Mediawiki website', default='https://en.wikipedia.org/', regexp='https?://.*'),
diff --git a/modules/meslieuxparis/module.py b/modules/meslieuxparis/module.py
index e71ebecc0cd8a24fa0b5f3dcaab162c6b3857f4c..329b2c6c1ed97235c3e4fa599642058eba2fb7f8 100644
--- a/modules/meslieuxparis/module.py
+++ b/modules/meslieuxparis/module.py
@@ -35,7 +35,7 @@ class MeslieuxparisModule(Module, CapDirectory):
MAINTAINER = 'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = MeslieuxparisBrowser
diff --git a/modules/meteofrance/module.py b/modules/meteofrance/module.py
index fe2e4231f087ff5334bf1932deb066bae603449a..d2eee92a9b842d8ca47bdb83087037917a96b2ec 100644
--- a/modules/meteofrance/module.py
+++ b/modules/meteofrance/module.py
@@ -31,7 +31,7 @@ class MeteofranceModule(Module, CapWeather):
NAME = 'meteofrance'
MAINTAINER = u'Cedric Defortis'
EMAIL = 'cedric@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Get forecasts from the MeteoFrance website'
LICENSE = 'AGPLv3+'
BROWSER = MeteofranceBrowser
diff --git a/modules/minutes20/module.py b/modules/minutes20/module.py
index d23474ce7bc832673150242593515ff0028b2079..ae3b03c80d65abdde5cc16b77cf784d1af142b9a 100644
--- a/modules/minutes20/module.py
+++ b/modules/minutes20/module.py
@@ -27,7 +27,7 @@ from .tools import rssid
class Newspaper20minutesModule(AbstractModule, CapMessages):
MAINTAINER = u'Julien Hebert'
EMAIL = 'juke@free.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
STORAGE = {'seen': {}}
NAME = 'minutes20'
diff --git a/modules/monster/module.py b/modules/monster/module.py
index 25a1779286528cac0d969dbbe66f24d2bae943bd..476750514a883ac6676cbb66e0f94b622a4bfd23 100644
--- a/modules/monster/module.py
+++ b/modules/monster/module.py
@@ -34,7 +34,7 @@ class MonsterModule(Module, CapJob):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = MonsterBrowser
diff --git a/modules/myedenred/module.py b/modules/myedenred/module.py
index c67d5aaaa040b447dc0c3c3f027ae3018d84b113..4ffbc227ecd77aea839a97b8b7c0b12d092a536a 100644
--- a/modules/myedenred/module.py
+++ b/modules/myedenred/module.py
@@ -37,7 +37,7 @@ class MyedenredModule(Module, CapBank):
MAINTAINER = 'Théo Dorée'
EMAIL = 'tdoree@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Adresse email', masked=False),
ValueBackendPassword('password', label='Mot de passe'))
diff --git a/modules/myfoncia/module.py b/modules/myfoncia/module.py
index 1943c6db30e75b6dda36cb796b397473f4dd10be..cc6b4bfe85b1f2bb7184270f5c96cf2305581ed1 100644
--- a/modules/myfoncia/module.py
+++ b/modules/myfoncia/module.py
@@ -38,7 +38,7 @@ class MyFonciaModule(Module, CapDocument):
MAINTAINER = u'Phyks (Lucas Verney)'
EMAIL = 'phyks@phyks.me'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
Value(
'login',
diff --git a/modules/myhabit/module.py b/modules/myhabit/module.py
index dcce608f5138dc66aa923986ac77dda3161431ae..2b2c831e046810be5f01ef400b267cde1ea8f015 100644
--- a/modules/myhabit/module.py
+++ b/modules/myhabit/module.py
@@ -31,7 +31,7 @@ class MyHabitModule(Module, CapShop):
NAME = 'myhabit'
MAINTAINER = u'Oleg Plakhotniuk'
EMAIL = 'olegus8@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'MYHABIT'
CONFIG = BackendConfig(
diff --git a/modules/n26/module.py b/modules/n26/module.py
index 9a17c7e6754c94c780caba1edec709da3a0bf9bb..3448e045b4b6be9906b094df4983fb2c2bdfdbf5 100644
--- a/modules/n26/module.py
+++ b/modules/n26/module.py
@@ -33,7 +33,7 @@ class Number26Module(Module, CapBank):
MAINTAINER = u'Benjamin Bouvier'
EMAIL = 'public@benj.me'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = Number26Browser
diff --git a/modules/nalo/module.py b/modules/nalo/module.py
index d1aefccbb5424e08e2b60eb0d4b53c1ec49d9a0f..682b21061db6ddfa43b40beee37ef0f5fc15c241 100644
--- a/modules/nalo/module.py
+++ b/modules/nalo/module.py
@@ -35,7 +35,7 @@ class NaloModule(Module, CapBankWealth):
MAINTAINER = 'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = NaloBrowser
diff --git a/modules/nectarine/module.py b/modules/nectarine/module.py
index eb197044e8367e628aa2997f104228776d53f3b1..22558d8ceb8927dd1ba6feda18e3d0ba0dd1a488 100644
--- a/modules/nectarine/module.py
+++ b/modules/nectarine/module.py
@@ -28,7 +28,7 @@ class NectarineModule(Module, CapRadio, CapCollection):
NAME = 'nectarine'
MAINTAINER = u'Thomas Lecavelier'
EMAIL = 'thomas-weboob@lecavelier.name'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'Nectarine Demoscene Radio'
# License of your module
LICENSE = 'AGPLv3+'
diff --git a/modules/nettokom/__init__.py b/modules/nettokom/__init__.py
deleted file mode 100644
index c994d9617b5dd4205e0df3192ea8ec87a0e919e1..0000000000000000000000000000000000000000
--- a/modules/nettokom/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from .module import NettoKomModule
-
-__all__ = ['NettoKomModule']
diff --git a/modules/nettokom/browser.py b/modules/nettokom/browser.py
deleted file mode 100644
index 1eded0f01dd653373971056399618ff3c786ffda..0000000000000000000000000000000000000000
--- a/modules/nettokom/browser.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Fourcot Florent
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.deprecated.browser import Browser, BrowserIncorrectPassword
-from .pages import HomePage, LoginPage, HistoryPage, DetailsPage, BillsPage
-
-__all__ = ['Nettokom']
-
-
-class Nettokom(Browser):
- DOMAIN = 'konto.nettokom.de'
- PROTOCOL = 'https'
- ENCODING = None # refer to the HTML encoding
- PAGES = {'.*login.html.*': LoginPage,
- '.*start.html': HomePage,
- '.*guthabenverbrauch.html': DetailsPage,
- '.*/verbindungsnachweis/.*': HistoryPage,
- '.*verbindungsnachweis.html': BillsPage
- }
-
- def __init__(self, *args, **kwargs):
- Browser.__init__(self, *args, **kwargs)
-
- def home(self):
- self.location('/start.html')
-
- def is_logged(self):
- return not self.is_on_page(LoginPage)
-
- def login(self):
- assert isinstance(self.username, basestring)
- assert isinstance(self.password, basestring)
- assert self.username.isdigit()
-
- if not self.is_on_page(LoginPage):
- self.location('/login.html')
-
- self.page.login(self.username, self.password)
-
- if self.is_on_page(LoginPage):
- raise BrowserIncorrectPassword()
-
- def get_subscription_list(self):
- if not self.is_on_page(HomePage):
- self.location('/start.html')
-
- return self.page.get_list()
-
- def get_subscription(self, id):
- assert isinstance(id, basestring)
-
- if not self.is_on_page(HomePage):
- self.location('/start.html')
-
- l = self.page.get_list()
- for a in l:
- if a.id == id:
- return a
-
- return None
-
- def get_history(self):
- if not self.is_on_page(HistoryPage):
- self.location('/verbindungsnachweis/alle-verbindungen.html')
- return self.page.get_calls()
-
- def get_details(self):
- if not self.is_on_page(DetailsPage):
- self.location('/guthabenverbrauch.html')
- return self.page.get_details()
-
- def iter_documents(self, parentid):
- if not self.is_on_page(BillsPage):
- self.location('/verbindungsnachweis.html')
- return self.page.date_bills()
-
- def get_document(self, id):
- assert isinstance(id, basestring)
-
- if not self.is_on_page(BillsPage):
- self.location('/verbindungsnachweis.html')
- l = self.page.date_bills()
- for a in l:
- if a.id == id:
- return a
-
-# Todo : url depends of file format
-# def download_document(self, id):
-# assert isinstance(id, basestring)
-# date = id.split('.')[1]
-#
-# return self.readurl('/moncompte/ajax.php?page=facture&mode=html&date=' + date)
diff --git a/modules/nettokom/favicon.png b/modules/nettokom/favicon.png
deleted file mode 100644
index 55bfe52a7f9a341d9809ad520ad207fd683db7c4..0000000000000000000000000000000000000000
Binary files a/modules/nettokom/favicon.png and /dev/null differ
diff --git a/modules/nettokom/module.py b/modules/nettokom/module.py
deleted file mode 100644
index 38b2bd14e0e741d93889e04f531d7eee94ba5832..0000000000000000000000000000000000000000
--- a/modules/nettokom/module.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.bill import CapDocument, Subscription, SubscriptionNotFound, Detail
-from weboob.tools.backend import Module, BackendConfig
-from weboob.tools.value import ValueBackendPassword
-
-from .browser import Nettokom
-
-
-__all__ = ['NettoKomModule']
-
-
-class NettoKomModule(Module, CapDocument):
- NAME = 'nettokom'
- MAINTAINER = u'Florent Fourcot'
- EMAIL = 'weboob@flo.fourcot.fr'
- VERSION = '1.4'
- LICENSE = 'AGPLv3+'
- DESCRIPTION = 'Nettokom website'
- CONFIG = BackendConfig(ValueBackendPassword('login',
- label='Account ID (phone number)',
- masked=False,
- regexp='^(\d{8,13})$'),
- ValueBackendPassword('password',
- label='Password')
- )
- BROWSER = Nettokom
-
- def create_default_browser(self):
- return self.create_browser(self.config['login'].get(),
- self.config['password'].get())
-
- def iter_subscription(self):
- for subscription in self.browser.get_subscription_list():
- yield subscription
-
- def get_subscription(self, _id):
- with self.browser:
- subscription = self.browser.get_subscription(_id)
- if subscription:
- return subscription
- else:
- raise SubscriptionNotFound()
-
- def iter_documents_history(self, subscription):
- with self.browser:
- for history in self.browser.get_history():
- yield history
-
- # The subscription is actually useless, but maybe for the futur...
- def get_details(self, subscription):
- with self.browser:
- for detail in self.browser.get_details():
- yield detail
-
- def get_balance(self, subscription):
- if not isinstance(subscription, Subscription):
- subscription = self.get_subscription(subscription)
- balance = Detail()
- balance.id = "%s-balance" % subscription.id
- balance.price = subscription._balance
- balance.label = u"Balance %s" % subscription.id
- balance.currency = u'EUR'
- return balance
diff --git a/modules/nettokom/pages/__init__.py b/modules/nettokom/pages/__init__.py
deleted file mode 100644
index 996912ad066ae617e7c4b2d6b53944a978eae1a1..0000000000000000000000000000000000000000
--- a/modules/nettokom/pages/__init__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from .homepage import HomePage
-from .history import HistoryPage, DetailsPage, BillsPage
-from .login import LoginPage
-
-__all__ = ['LoginPage', 'HomePage', 'HistoryPage', 'DetailsPage', 'BillsPage']
diff --git a/modules/nettokom/pages/history.py b/modules/nettokom/pages/history.py
deleted file mode 100644
index dc25b9f38680e9f87caced3dbb382613d57b7649..0000000000000000000000000000000000000000
--- a/modules/nettokom/pages/history.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from datetime import datetime, date, time
-from decimal import Decimal
-
-from weboob.deprecated.browser import Page
-from weboob.capabilities.bill import Detail
-
-
-class DetailsPage(Page):
-
- def on_loaded(self):
- self.details = []
- table = self.document.xpath('//table[@id="reportTable"]')
-
- if len(table) > 0:
- for tr in table[0].xpath('tbody/tr'):
- detail = Detail()
- # Skip global category
- if tr.find('td/a') is not None:
- continue
- if tr.attrib["class"] == "totalAmount":
- continue
- tds = tr.xpath('td')
- detail.label = unicode(tds[0].text.strip())
- detail.infos = unicode(tds[1].text.strip())
- detail.price = Decimal(tds[2].text.split(' ')[0].replace(',', '.'))
-
- self.details.append(detail)
-
- def get_details(self):
- return self.details
-
-
-def _get_date(detail):
- return detail.datetime
-
-
-class BillsPage(Page):
- def on_loaded(self):
- pass
-
-
-class HistoryPage(Page):
-
- def on_loaded(self):
- self.calls = []
- for tr in self.document.xpath('//tr'):
- try:
- attrib = tr.attrib["class"]
- except:
- continue
- if attrib == "even" or attrib == "odd":
- label = u''
- tddate = tr.find('td[@class="middle nowrap"]')
- for td in tr.xpath('td[@class="long"]'):
- label += unicode(td.text.strip()) + u' '
- tdprice = tr.xpath('td[@class="price"]')
- label += u'(' + unicode(tdprice[0].text.strip()) + u')'
- price = Decimal(tdprice[1].text.strip().replace(',', '.'))
- detail = Detail()
- mydate = date(*reversed([int(x) for x in tddate.text.strip().split(' ')[0].split(".")]))
- mytime = time(*[int(x) for x in tddate.text.strip().split(' ')[1].split(":")])
- detail.datetime = datetime.combine(mydate, mytime)
- detail.label = label
- detail.price = price
-
- self.calls.append(detail)
-
- def get_calls(self):
- return sorted(self.calls, key=_get_date, reverse=True)
diff --git a/modules/nettokom/pages/homepage.py b/modules/nettokom/pages/homepage.py
deleted file mode 100644
index 0851c73971f36b9416a4f4486deb2d5a624ae1b7..0000000000000000000000000000000000000000
--- a/modules/nettokom/pages/homepage.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.capabilities.bill import Subscription
-from weboob.tools.capabilities.bank.transactions import FrenchTransaction
-from weboob.deprecated.browser import Page
-from datetime import date
-from decimal import Decimal
-
-
-class HomePage(Page):
- def on_loaded(self):
- pass
-
- def get_list(self):
- l = []
- divabo = self.document.xpath('//div[@id="accountSummary"]')[0]
- owner = divabo.xpath('a/h3')[0].text
- phone = divabo.xpath('dl/dd')[0].text
- credit = divabo.xpath('dl/dd')[1].text
- expiredate = divabo.xpath('dl/dd')[2].text
- phoneplan = divabo.xpath('dl/dd')[3].text
- self.browser.logger.debug('Found ' + owner + ' as subscriber')
- self.browser.logger.debug('Found ' + phone + ' as phone number')
- self.browser.logger.debug('Found ' + credit + ' as available credit')
- self.browser.logger.debug('Found ' + expiredate + ' as expire date ')
- self.browser.logger.debug('Found %s as subscription type', phoneplan)
-
- subscription = Subscription(phone)
- subscription.label = unicode(u'%s - %s - %s - %s' %
- (phone, credit, phoneplan, expiredate))
- subscription.subscriber = unicode(owner)
- expiredate = date(*reversed([int(x) for x in expiredate.split(".")]))
- subscription.validity = expiredate
- subscription._balance = Decimal(FrenchTransaction.clean_amount(credit))
-
- l.append(subscription)
-
- return l
diff --git a/modules/nettokom/pages/login.py b/modules/nettokom/pages/login.py
deleted file mode 100644
index f4a9218c099ec2cf7de536a4b919f7435db70bf5..0000000000000000000000000000000000000000
--- a/modules/nettokom/pages/login.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2012 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.deprecated.browser import Page
-
-
-class LoginPage(Page):
- def on_loaded(self):
- pass
-
- def login(self, login, password):
- self.browser.select_form(nr=0)
- self.browser.set_all_readonly(False)
- self.browser['number'] = login.encode('iso-8859-1')
- self.browser['password'] = password.encode('iso-8859-1')
- self.browser.submit(nologin=True)
diff --git a/modules/nettokom/test.py b/modules/nettokom/test.py
deleted file mode 100644
index 8b962c21b819b1d888c48452c4dfdb6ffea96c78..0000000000000000000000000000000000000000
--- a/modules/nettokom/test.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013-2014 Florent Fourcot
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.test import BackendTest
-
-
-class NettokomTest(BackendTest):
- MODULE = 'nettokom'
-
- def test_details(self):
- for subscription in self.backend.iter_subscription():
- details = list(self.backend.get_details(subscription))
- self.assertTrue(len(details) > 1, msg="Not enough details")
-
- def test_history(self):
- for subscription in self.backend.iter_subscription():
- self.assertTrue(len(list(self.backend.iter_documents_history(subscription))) > 0)
-
- def test_list(self):
- """
- Test listing of subscriptions.
- """
- subscriptions = list(self.backend.iter_subscription())
- self.assertTrue(len(subscriptions) > 0, msg="Account listing failed")
diff --git a/modules/newsfeed/module.py b/modules/newsfeed/module.py
index 033dd23feb1f454c5b23a9b3d3758074aafc236f..e8fa3228066f2af0f4572b52463bceb1acc42795 100644
--- a/modules/newsfeed/module.py
+++ b/modules/newsfeed/module.py
@@ -31,7 +31,7 @@ class NewsfeedModule(Module, CapMessages):
NAME = 'newsfeed'
MAINTAINER = u'Clément Schreiner'
EMAIL = "clemux@clemux.info"
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = "Loads RSS and Atom feeds from any website"
LICENSE = "AGPLv3+"
CONFIG = BackendConfig(Value('url', label="Atom/RSS feed's url", regexp='https?://.*'))
diff --git a/modules/nihonnooto/__init__.py b/modules/nihonnooto/__init__.py
deleted file mode 100644
index 9da0a9089d3ef442e31145873bbb9bcc24008ec3..0000000000000000000000000000000000000000
--- a/modules/nihonnooto/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .module import NihonNoOtoModule
-
-__all__ = ['NihonNoOtoModule']
diff --git a/modules/nihonnooto/browser.py b/modules/nihonnooto/browser.py
deleted file mode 100644
index 9baa089aec68a8f9d57a43985616ad3afd0842b2..0000000000000000000000000000000000000000
--- a/modules/nihonnooto/browser.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# * -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Thomas Lecavelier
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.deprecated.browser import Browser
-from .pages import LivePage, ProgramPage
-
-__all__ = ['NihonNoOtoBrowser']
-
-
-class NihonNoOtoBrowser(Browser):
- DOMAIN = 'www.nihon-no-oto.com'
- PROTOCOL = 'http'
- ENCODING = 'utf-8'
- USER_AGENT = Browser.USER_AGENTS['desktop_firefox']
- PAGES = {
- 'http://www\.nihon-no-oto\.com/': LivePage,
- 'http://www\.nihon-no-oto\.com/app/playlist.php': ProgramPage,
- }
-
- def home(self):
- self.location('/')
-
- assert self.is_on_page(LivePage)
-
- def iter_radios_list(self):
- self.location('/')
-
- assert self.is_on_page(LivePage)
- return self.page.iter_radios_list()
-
- def get_current_emission(self):
- self.location('/app/playlist.php')
- assert self.is_on_page(ProgramPage)
- return self.page.get_current_emission()
diff --git a/modules/nihonnooto/favicon.png b/modules/nihonnooto/favicon.png
deleted file mode 100644
index 312fff79f60601900d2f0ba6d34ab06d6c7b26de..0000000000000000000000000000000000000000
Binary files a/modules/nihonnooto/favicon.png and /dev/null differ
diff --git a/modules/nihonnooto/module.py b/modules/nihonnooto/module.py
deleted file mode 100644
index 81223e2d2fdb06375bb07c0602df8888bfcc7c4b..0000000000000000000000000000000000000000
--- a/modules/nihonnooto/module.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright(C) 2013 Thomas Lecavelier
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.capabilities.radio import CapRadio, Radio
-from weboob.capabilities.collection import CapCollection
-from weboob.tools.backend import Module
-from .browser import NihonNoOtoBrowser
-
-__all__ = ['NihonNoOtoModule']
-
-
-class NihonNoOtoModule(Module, CapRadio, CapCollection):
- NAME = 'nihonnooto'
- MAINTAINER = u'Thomas Lecavelier'
- EMAIL = 'thomas-weboob@lecavelier.name'
- VERSION = '1.4'
- DESCRIPTION = u'« Le son du Japon » french operated web radio, diffusing japanese music'
- # License of your module
- LICENSE = 'AGPLv3+'
-
- BROWSER = NihonNoOtoBrowser
- _RADIOS = {'nihonnooto': (u'Nihon no OTO', True) }
-
- def iter_resources(self, objs, split_path):
- if Radio in objs:
- self._restrict_level(split_path)
- for radio in self.browser.iter_radios_list():
- self.browser.get_current_emission()
- radio.current = self.browser.get_current_emission()
- yield radio
-
- def iter_radios_search(self, pattern):
- for radio in self.browser.iter_radios_list():
- if pattern.lower() in radio.title.lower() or pattern.lower() in radio.description.lower():
- self.browser.get_current_emission()
- radio.current = self.browser.get_current_emission()
-
- yield radio
-
- def get_radio(self, radio):
- if not isinstance(radio, Radio):
- for rad in self.browser.iter_radios_list():
- if rad.id == radio:
- return rad
- return None
-
- def fill_radio(self, radio, fields):
- if 'current' in fields:
- return self.get_radio(radio.id)
- return radio
-
- OBJECTS = {Radio: fill_radio}
diff --git a/modules/nihonnooto/pages.py b/modules/nihonnooto/pages.py
deleted file mode 100644
index 06b6e58c8c795e3579121501263e3cdc2f0d03cd..0000000000000000000000000000000000000000
--- a/modules/nihonnooto/pages.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# * -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Thomas Lecavelier
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.deprecated.browser import Page
-from weboob.capabilities.radio import Radio
-from weboob.capabilities.audiostream import BaseAudioStream
-from weboob.tools.capabilities.streaminfo import StreamInfo
-
-
-class LivePage(Page):
- def iter_radios_list(self):
- radio = Radio('nihon')
- radio.title = u'Nihon no Oto'
- radio.description = u'Nihon no Oto: le son du Japon'
- radio.streams = []
-
- index = -1
-
- for el in self.document.xpath('//source'):
- index += 1
- mime_type = unicode(el.attrib['type'])
- stream_url = unicode(el.attrib['src'])
- stream = BaseAudioStream(index)
- stream.bitrate = 128
- if (mime_type == u'audio/mpeg'):
- stream.format = u'mp3'
- elif (mime_type == u'audio/ogg'):
- stream.format = u'vorbis'
- stream.title = radio.title + ' ' + mime_type
- stream.url = stream_url
- radio.streams.append(stream)
-
- yield radio
-
-
-class ProgramPage(Page):
- def get_current_emission(self):
- current = StreamInfo(0)
- two_or_more = unicode(self.document.xpath('//p')[0].text).split('/////')[0].split(' - ')
- # Consider that if String(' - ') appears it'll be in title rather in the artist name
- if len(two_or_more) > 2:
- current.who = two_or_more.pop(0)
- current.what = ' - '.join(two_or_more)
- else:
- current.who, current.what = two_or_more
- return current
diff --git a/modules/nihonnooto/test.py b/modules/nihonnooto/test.py
deleted file mode 100644
index 93d3e6b5246facba5ea0aca80603a6cad520c713..0000000000000000000000000000000000000000
--- a/modules/nihonnooto/test.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Thomas Lecavelier
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.test import BackendTest
-
-
-class NihonNoOtoTest(BackendTest):
- MODULE = 'nihonnooto'
-
- def test_nihonnooto(self):
- l = list(self.backend.iter_radios_search(''))
- self.assertTrue(len(l) > 0)
diff --git a/modules/nova/module.py b/modules/nova/module.py
index 9b3743d6ab24e492ecc8c253606f9315ddab855a..e8d9a7962ce7e28d9bd586ba240fc5c2723952fd 100644
--- a/modules/nova/module.py
+++ b/modules/nova/module.py
@@ -34,7 +34,7 @@ class NovaModule(Module, CapRadio, CapCollection):
NAME = 'nova'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'Nova French radio'
LICENSE = 'AGPLv3+'
BROWSER = APIBrowser
diff --git a/modules/okc/module.py b/modules/okc/module.py
index 17bf27861d5f6b0be7ae8c386bc54a040a4f2152..4f63c17336c7ed84c7d12ab34480b01b4a7945f9 100644
--- a/modules/okc/module.py
+++ b/modules/okc/module.py
@@ -95,7 +95,7 @@ class OkCModule(Module, CapMessages, CapContact, CapMessagesPost, CapDating):
NAME = 'okc'
MAINTAINER = u'Roger Philibert'
EMAIL = 'roger.philibert@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'OkCupid'
CONFIG = BackendConfig(Value('username', label='Username'),
diff --git a/modules/oney/module.py b/modules/oney/module.py
index 59e936acc1c655c8fa6eb77a90f8cb11994bb5c6..716b2e0219e69d67ead0a78d948637acc5fd6a7e 100644
--- a/modules/oney/module.py
+++ b/modules/oney/module.py
@@ -33,7 +33,7 @@ class OneyModule(Module, CapBank):
NAME = 'oney'
MAINTAINER = u'Vincent Paredes'
EMAIL = 'vparedes@budget-insight.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = 'Oney'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False),
diff --git a/modules/onlinenet/module.py b/modules/onlinenet/module.py
index 51e242192a6808f8b40a0311df4fcdf373c6613c..c2b0d4c0e167cb6fb996a5a7bdaa8307c2d4b7b2 100644
--- a/modules/onlinenet/module.py
+++ b/modules/onlinenet/module.py
@@ -35,7 +35,7 @@ class OnlinenetModule(Module, CapDocument):
MAINTAINER = u'Edouard Lambert'
EMAIL = 'elambert@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('login', label='Identifiant'),
ValueBackendPassword('password', label='Mot de passe'))
diff --git a/modules/opacwebaloes/__init__.py b/modules/opacwebaloes/__init__.py
deleted file mode 100644
index 4994110be06a12164757b55ba0bbfb88dbe1fbfb..0000000000000000000000000000000000000000
--- a/modules/opacwebaloes/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Jeremy Monnet
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from .module import AloesModule
-
-__all__ = ['AloesModule']
diff --git a/modules/opacwebaloes/browser.py b/modules/opacwebaloes/browser.py
deleted file mode 100644
index fc2ed81c6c5e78fbcf3f2bfdc6dd7766a81011f2..0000000000000000000000000000000000000000
--- a/modules/opacwebaloes/browser.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2012 Jeremy Monnet
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.deprecated.browser import Browser, BrowserIncorrectPassword
-
-from .pages import LoginPage, HomePage, RentedPage, HistoryPage, BookedPage
-
-
-__all__ = ['AloesBrowser']
-
-
-# Browser
-class AloesBrowser(Browser):
- PROTOCOL = 'http'
- ENCODING = 'utf-8'
- USER_AGENT = Browser.USER_AGENTS['desktop_firefox']
- #DEBUG_HTTP = True
- DEBUG_HTTP = False
- PAGES = {
- 'http://.*/index.aspx': LoginPage,
- 'http://.*/index.aspx\?IdPage=1': HomePage,
- 'http://.*/index.aspx\?IdPage=45': RentedPage,
- 'http://.*/index.aspx\?IdPage=429': HistoryPage,
- 'http://.*/index.aspx\?IdPage=44': BookedPage
- }
-
- def __init__(self, baseurl, *args, **kwargs):
- self.BASEURL = baseurl
- Browser.__init__(self, *args, **kwargs)
-
- def is_logged(self):
-
- return self.page \
- and not self.page.document.getroot().xpath('//input[contains(@id, "ctl00_ContentPlaceHolder1_ctl00_ctl08_ctl00_TextSaisie")]')
- #return True
-
- def login(self):
- assert isinstance(self.username, basestring)
- assert isinstance(self.password, basestring)
- if not self.is_on_page(HomePage):
- self.location('%s://%s/index.aspx'
- % (self.PROTOCOL, self.BASEURL),
- no_login=True)
- if not self.page.login(self.username, self.password) or \
- not self.is_logged() or \
- (self.is_on_page(LoginPage) and self.page.is_error()):
- raise BrowserIncorrectPassword()
-
- def get_rented_books_list(self):
- if not self.is_on_page(RentedPage):
- self.location('%s://%s/index.aspx?IdPage=45'
- % (self.PROTOCOL, self.BASEURL)
- )
- return self.page.get_list()
-
- def get_booked_books_list(self):
- if not self.is_on_page(BookedPage):
- self.location('%s://%s/index.aspx?IdPage=44'
- % (self.PROTOCOL, self.BASEURL))
- return self.page.get_list()
diff --git a/modules/opacwebaloes/favicon.png b/modules/opacwebaloes/favicon.png
deleted file mode 100644
index beb49765fedb9f26637f9ee95ec30d7b77b1fdc5..0000000000000000000000000000000000000000
Binary files a/modules/opacwebaloes/favicon.png and /dev/null differ
diff --git a/modules/opacwebaloes/module.py b/modules/opacwebaloes/module.py
deleted file mode 100644
index 5f1571e937e6ad333a66d4431d3267a71aecf711..0000000000000000000000000000000000000000
--- a/modules/opacwebaloes/module.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2012 Jeremy Monnet
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.library import CapBook
-from weboob.tools.backend import Module, BackendConfig
-from weboob.tools.value import ValueBackendPassword, Value
-
-from .browser import AloesBrowser
-
-
-__all__ = ['AloesModule']
-
-
-class AloesModule(Module, CapBook):
- NAME = 'opacwebaloes'
- MAINTAINER = u'Jeremy Monnet'
- EMAIL = 'jmonnet@gmail.com'
- VERSION = '1.4'
- DESCRIPTION = 'Aloes Library software'
- LICENSE = 'AGPLv3+'
- CONFIG = BackendConfig(Value('login', label='Account ID', regexp='^\d{1,8}\w$'),
- ValueBackendPassword('password', label='Password of account'),
- Value('baseurl', label='Base URL')
- )
- BROWSER = AloesBrowser
-
- def create_default_browser(self):
- return self.create_browser(self.config['baseurl'].get(),
- self.config['login'].get(),
- self.config['password'].get())
-
- def iter_rented(self):
- for book in self.browser.get_rented_books_list():
- yield book
-
- def iter_booked(self):
- for book in self.browser.get_booked_books_list():
- yield book
-
- def iter_books(self):
- for book in self.iter_booked():
- yield book
- for book in self.iter_rented():
- yield book
-
- def get_book(self, _id):
- raise NotImplementedError()
-
- def search_books(self, _string):
- raise NotImplementedError()
diff --git a/modules/opacwebaloes/pages.py b/modules/opacwebaloes/pages.py
deleted file mode 100644
index f05b6226dce4a1eec8ddb47bf74f9ee971766166..0000000000000000000000000000000000000000
--- a/modules/opacwebaloes/pages.py
+++ /dev/null
@@ -1,117 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2012 Jeremy Monnet
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from datetime import date
-
-from mechanize import TextControl
-
-from weboob.capabilities.library import Book
-from weboob.deprecated.browser import BrowserUnavailable, Page
-
-
-class SkipPage(Page):
- pass
-
-
-class HomePage(Page):
- pass
-
-
-def txt2date(s):
- return date(*reversed([int(x) for x in s.split(' ')[-1].split('/')]))
-
-
-class RentedPage(Page):
- # TODO, table limited to 20 items, need to use pagination
- def get_list(self):
- for book in self.iter_books('//tr[contains(@id, "ctl00_ContentPlaceHolder1_ctl00_ctl07_COMPTE_PRET_1_1_GrillePrets_ctl00__")]', 1):
- book.late = False
- yield book
-
- for book in self.iter_books('//tr[contains(@id, "ctl00_ContentPlaceHolder1_ctl00_ctl08_COMPTE_RETARD_0_1_GrilleRetards_ctl00__")]', 0):
- book.late = True
- yield book
-
- def iter_books(self, el, start):
- for tr in self.document.getroot().xpath(el):
- book = Book(tr[start].text)
- book.name = tr[start+3].text
- book.author = tr[start+4].text
- book.date = txt2date(tr[start+5].text)
- yield book
-
-
-class HistoryPage(Page):
- pass
-
-
-class BookedPage(Page):
- # TODO, table limited to 20 items, need to use pagination
- def get_list(self):
- for tr in self.document.getroot().xpath('//tr[contains(@id, "ctl00_ContentPlaceHolder1_ctl00_ctl09_COMPTE_INFOS_0_GrilleInfos_ctl00__0")]'):
- username=tr[1].text+"_"+tr[0].text
-
- for i, tr in enumerate(self.document.getroot().xpath('//tr[contains(@id, "ctl00_ContentPlaceHolder1_ctl00_ctl10_COMPTE_RESA_1_1_GrilleResas_ctl00__")]')):
- book = Book('%s%d' % (username, i))
- # if all the books booked are available, there are only 7 columns.
- # if (at least ?) one book is still not available, yous can cancel, and the first column does contain the checkbox. So 8 columns.
- if (len(tr) == 7):
- start = 2
- if (len(tr) == 8):
- start = 3
- book.name = tr[start].text
- book.author = tr[start+1].text
- book.date = txt2date(tr[start+3].text)
- book.late = False
- yield book
-
-
-class LoginPage(Page):
- def login(self, login, passwd):
- self.browser.select_form(predicate=lambda x: x.attrs.get('id','')=='aspnetForm')
- self.browser.form.set_all_readonly(False)
- self.browser['ctl00$ContentPlaceHolder1$ctl00$ctl04$ctl00$TextSaisie'] = login
- self.browser['ctl00$ContentPlaceHolder1$ctl00$ctl04$ctl00$TextPass'] = passwd
- self.browser['ctl00_ScriptManager1_TSM']="%3B%3BSystem.Web.Extensions%2C%20Version%3D1.0.61025.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D31bf3856ad364e35%3Afr-FR%3A1f0f78f9-0731-4ae9-b308-56936732ccb8%3Aea597d4b%3Ab25378d2%3BTelerik.Web.UI%2C%20Version%3D2009.3.1314.20%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D121fae78165ba3d4%3Afr-FR%3Aec1048f9-7413-49ac-913a-b3b534cde186%3A16e4e7cd%3Aed16cbdc%3Af7645509%3A24ee1bba%3A19620875%3A874f8ea2%3A33108d14%3Abd8f85e4"
- self.browser.controls.append(TextControl('text', 'RadAJAXControlID', {'value': ''}))
- self.browser['RadAJAXControlID']="ctl00_ContentPlaceHolder1_ctl00_ctl04_ctl00_RadAjaxPanelConnexion"
- self.browser.controls.append(TextControl('text', 'ctl00$ScriptManager1', {'value': ''}))
- self.browser['ctl00$ScriptManager1']="ctl00$ContentPlaceHolder1$ctl00$ctl04$ctl00$ctl00$ContentPlaceHolder1$ctl00$ctl04$ctl00$RadAjaxPanelConnexionPanel|"
- self.browser.controls.append(TextControl('text', '__EVENTTARGET', {'value': ''}))
- self.browser.controls.append(TextControl('text', '__EVENTARGUMENT', {'value': ''}))
- self.browser.controls.append(TextControl('text', 'ctl00$ContentPlaceHolder1$ctl00$ctl04$ctl00$btnImgConnexion.x', {'value': ''}))
- self.browser['ctl00$ContentPlaceHolder1$ctl00$ctl04$ctl00$btnImgConnexion.x']="76"
- self.browser.controls.append(TextControl('text', 'ctl00$ContentPlaceHolder1$ctl00$ctl04$ctl00$btnImgConnexion.y', {'value': ''}))
- self.browser['ctl00$ContentPlaceHolder1$ctl00$ctl04$ctl00$btnImgConnexion.y']="10"
-
- try:
- self.browser.submit()
- except BrowserUnavailable:
- # Login is not valid
- return False
- return True
-
- def is_error(self):
- for text in self.document.find('body').itertext():
- text=text.strip()
- # Login seems valid, but password does not
- needle='Echec lors de l\'authentification'
- if text.startswith(needle.decode('utf-8')):
- return True
- return False
diff --git a/modules/openedx/module.py b/modules/openedx/module.py
index eff87555af52b0a30085e1a4178e9c050c787492..b8bb976cc45a7351d8b3e09428803c7468681b70 100644
--- a/modules/openedx/module.py
+++ b/modules/openedx/module.py
@@ -35,7 +35,7 @@ class OpenEDXModule(Module, CapMessages):
MAINTAINER = u'Simon Lipp'
EMAIL = 'laiquo@hwold.net'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('username', label='Username', default=''),
ValueBackendPassword('password', label='Password', default=''),
diff --git a/modules/opensubtitles/module.py b/modules/opensubtitles/module.py
index e06233744768cdd4b46f6023032de96791b64e2d..752552e769933160e19c107ea60eeffc770da1cd 100644
--- a/modules/opensubtitles/module.py
+++ b/modules/opensubtitles/module.py
@@ -32,7 +32,7 @@ class OpensubtitlesModule(Module, CapSubtitle):
NAME = 'opensubtitles'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Opensubtitles subtitle website'
LICENSE = 'AGPLv3+'
BROWSER = OpensubtitlesBrowser
diff --git a/modules/orange/module.py b/modules/orange/module.py
index ca948d6c29d8f706de54bb65352ac615fcb7a38c..be0647335726e144d8e068eef5f2e94914c96e32 100644
--- a/modules/orange/module.py
+++ b/modules/orange/module.py
@@ -35,7 +35,7 @@ class OrangeModule(Module, CapAccount, CapDocument, CapProfile):
NAME = 'orange'
MAINTAINER = 'Florian Duguet'
EMAIL = 'florian.duguet@budget-insight.com'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Orange French mobile phone provider'
LICENSE = 'AGPLv3+'
CONFIG = BackendConfig(Value('login', label='Login'),
diff --git a/modules/ouifm/module.py b/modules/ouifm/module.py
index 3a65e17ff4eb3d64a884f446375c2b933a13a0e8..5dd01672afdeb8aa8e912e8f84764270bd6be2ce 100644
--- a/modules/ouifm/module.py
+++ b/modules/ouifm/module.py
@@ -34,7 +34,7 @@ class OuiFMModule(Module, CapRadio, CapCollection):
NAME = 'ouifm'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'OÜI FM French radio'
LICENSE = 'AGPLv3+'
BROWSER = APIBrowser
diff --git a/modules/ovh/module.py b/modules/ovh/module.py
index be327a30cf582522d4d7402eb09af4dd3513b21e..e395489723bf6a89f0e659e71f0190e9ac246251 100644
--- a/modules/ovh/module.py
+++ b/modules/ovh/module.py
@@ -35,7 +35,7 @@ class OvhModule(Module, CapDocument):
MAINTAINER = u'Vincent Paredes'
EMAIL = 'vparedes@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('login', label='Account ID'),
ValueBackendPassword('password', label='Password'),
Value('pin_code', label='Code PIN / Email', required=False, default=''))
diff --git a/modules/pagesjaunes/module.py b/modules/pagesjaunes/module.py
index d733d0b3927725862b003c926ec072f1e578bd27..d393bf2184ff119c696cf8db0e118edd5bed2c74 100644
--- a/modules/pagesjaunes/module.py
+++ b/modules/pagesjaunes/module.py
@@ -35,7 +35,7 @@ class PagesjaunesModule(Module, CapDirectory):
MAINTAINER = 'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = PagesjaunesBrowser
diff --git a/modules/pap/module.py b/modules/pap/module.py
index cf947957b898eaa1be7eab4762b86776aaa77bda..f7aaab96ffa954aebe2ec31927f15cafb9c961ac 100644
--- a/modules/pap/module.py
+++ b/modules/pap/module.py
@@ -32,7 +32,7 @@ class PapModule(Module, CapHousing):
NAME = 'pap'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'French housing website'
LICENSE = 'AGPLv3+'
BROWSER = PapBrowser
diff --git a/modules/pariskiwi/module.py b/modules/pariskiwi/module.py
index b3458ac7de0e8c11660b3d84852c828ddd21e104..0723cbb057ecb869c42f37c2e92a25605f2999ef 100644
--- a/modules/pariskiwi/module.py
+++ b/modules/pariskiwi/module.py
@@ -34,7 +34,7 @@ class ParisKiwiModule(Module, CapCalendarEvent):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = ParisKiwiBrowser
diff --git a/modules/paroles2chansons/module.py b/modules/paroles2chansons/module.py
index c1a7ff5d5328b643cb090c33e51534fc06477f9c..ec80ba8c5fdd6b764a80cbdeedb3e3e9f00fe67d 100644
--- a/modules/paroles2chansons/module.py
+++ b/modules/paroles2chansons/module.py
@@ -29,7 +29,7 @@ class Paroles2chansonsModule(Module, CapLyrics):
NAME = 'paroles2chansons'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'eneiluj@gmx.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Paroles2chansons.com song lyrics website'
LICENSE = 'AGPLv3+'
BROWSER = Paroles2chansonsBrowser
diff --git a/modules/parolesmania/module.py b/modules/parolesmania/module.py
index 2177ebcaa3d5ee7309203754b35f5d7457454149..e4df5f2c1b02bcd176066abdf89666b022906744 100644
--- a/modules/parolesmania/module.py
+++ b/modules/parolesmania/module.py
@@ -31,7 +31,7 @@ class ParolesmaniaModule(Module, CapLyrics):
NAME = 'parolesmania'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'eneiluj@gmx.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Paroles Mania lyrics website'
LICENSE = 'AGPLv3+'
BROWSER = ParolesmaniaBrowser
diff --git a/modules/parolesmusique/module.py b/modules/parolesmusique/module.py
index 7c48091250e50e4e7a9a07a1aee6083a251151a8..3ae3c33d2a57b96a2af23dc92c8a2cc4644707b2 100644
--- a/modules/parolesmusique/module.py
+++ b/modules/parolesmusique/module.py
@@ -29,7 +29,7 @@ class ParolesmusiqueModule(Module, CapLyrics):
NAME = 'parolesmusique'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'eneiluj@gmx.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'paroles-musique lyrics website'
LICENSE = 'AGPLv3+'
BROWSER = ParolesmusiqueBrowser
diff --git a/modules/parolesnet/module.py b/modules/parolesnet/module.py
index 08ef23dabbc4d120cfc9dfc336cc4b97ac169970..91f3ba0c124f020b4023a1a1546dac5537c28fd0 100644
--- a/modules/parolesnet/module.py
+++ b/modules/parolesnet/module.py
@@ -29,7 +29,7 @@ class ParolesnetModule(Module, CapLyrics):
NAME = 'parolesnet'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'paroles.net lyrics website'
LICENSE = 'AGPLv3+'
BROWSER = ParolesnetBrowser
diff --git a/modules/pastealacon/module.py b/modules/pastealacon/module.py
index b35353682b46e427510b5256cabe45c57331d7ac..bb1e1e6cb83a1e777251a35854e106f5dfcccabf 100644
--- a/modules/pastealacon/module.py
+++ b/modules/pastealacon/module.py
@@ -31,7 +31,7 @@ class PastealaconModule(Module, BasePasteModule):
NAME = 'pastealacon'
MAINTAINER = u'Laurent Bachelier'
EMAIL = 'laurent@bachelier.name'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'Paste à la con text sharing tool'
LICENSE = 'AGPLv3+'
BROWSER = PastealaconBrowser
diff --git a/modules/pastebin/module.py b/modules/pastebin/module.py
index e31d131c1a847159248261dec5751db508b3e4c7..332f7a516a8c3453b8adc55c3f81c805a174e1cf 100644
--- a/modules/pastebin/module.py
+++ b/modules/pastebin/module.py
@@ -30,7 +30,7 @@ class PastebinModule(Module, BasePasteModule):
NAME = 'pastebin'
MAINTAINER = u'Laurent Bachelier'
EMAIL = 'laurent@bachelier.name'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Pastebin text sharing service'
LICENSE = 'AGPLv3+'
BROWSER = PastebinBrowser
diff --git a/modules/paypal/module.py b/modules/paypal/module.py
index df82f34042c0a0cd744563414ddf7c93e5a19c06..d9c9f40acdf81af31d8ea68d3dd0430a8f620b32 100644
--- a/modules/paypal/module.py
+++ b/modules/paypal/module.py
@@ -32,7 +32,7 @@ class PaypalModule(Module, CapBank):
NAME = 'paypal'
MAINTAINER = u'Laurent Bachelier'
EMAIL = 'laurent@bachelier.name'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'PayPal'
CONFIG = BackendConfig(ValueBackendPassword('login', label='E-mail', masked=False),
diff --git a/modules/peertube/module.py b/modules/peertube/module.py
index f6177b9329641751b25d19fa5ceda5c243ceeeba..7136e16c9a56da2e08cb300c5312b3044737e3ad 100644
--- a/modules/peertube/module.py
+++ b/modules/peertube/module.py
@@ -35,7 +35,7 @@ class PeertubeModule(Module, CapVideo):
MAINTAINER = 'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
Value('url', label='Base URL of the PeerTube instance'),
diff --git a/modules/phpbb/module.py b/modules/phpbb/module.py
index 827115f84c4a7918b3fb4ec2e09f7be9280d7796..221a82e6d5c12adc38d12f8ad1519ab1523ddee4 100644
--- a/modules/phpbb/module.py
+++ b/modules/phpbb/module.py
@@ -34,7 +34,7 @@ class PhpBBModule(Module, CapMessages, CapMessagesPost):
NAME = 'phpbb'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = "phpBB forum"
CONFIG = BackendConfig(Value('url', label='URL of forum', regexp='https?://.*'),
diff --git a/modules/piratebay/module.py b/modules/piratebay/module.py
index 5733c2b8412a7d67603fe5ad3d60caca4b181f9a..1d43a301459b6bae74d5abb8b886e72f8c96d0eb 100644
--- a/modules/piratebay/module.py
+++ b/modules/piratebay/module.py
@@ -31,7 +31,7 @@ class PiratebayModule(Module, CapTorrent):
NAME = 'piratebay'
MAINTAINER = u'Laurent Bachelier'
EMAIL = 'laurent@bachelier.name'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'The Pirate Bay BitTorrent tracker'
LICENSE = 'AGPLv3+'
BROWSER = PiratebayBrowser
diff --git a/modules/pixabay/module.py b/modules/pixabay/module.py
index 14ccd434ce24c0a53e09eb3691aac0cacad67c08..9386a429fc935a31b2836c60024353d78bcab4b5 100644
--- a/modules/pixabay/module.py
+++ b/modules/pixabay/module.py
@@ -48,7 +48,7 @@ class PixabayModule(Module, CapImage):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = PixabayBrowser
diff --git a/modules/pixtoilelibre/module.py b/modules/pixtoilelibre/module.py
index 26c556d9b1612ae8f29708df068f72cacfc73b9e..f4bdbeef5b78f2c781fde9b9e3cd16d6848b0531 100644
--- a/modules/pixtoilelibre/module.py
+++ b/modules/pixtoilelibre/module.py
@@ -42,7 +42,7 @@ class PixtoilelibreModule(Module, CapPaste):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = PixtoilelibreBrowser
diff --git a/modules/playme/module.py b/modules/playme/module.py
index ed24cc1173cab5896d716045a24eb312e9c00b4e..fe01f6e7f3ee14c243cfe0e156a336b28b7e1213 100644
--- a/modules/playme/module.py
+++ b/modules/playme/module.py
@@ -89,7 +89,7 @@ class PlayMeModule(Module, CapMessages, CapMessagesPost, CapDating, CapAccount):
MAINTAINER = u'Roger Philibert'
EMAIL = 'roger.philibert@gmail.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('username', label='Facebook email'),
ValueBackendPassword('password', label='Facebook password'))
diff --git a/modules/podnapisi/module.py b/modules/podnapisi/module.py
index 835ddd05a808af68bf3a50c19782322a6047a07e..03118aa42e27ed7f6d9e2add0865b8eb73450230 100644
--- a/modules/podnapisi/module.py
+++ b/modules/podnapisi/module.py
@@ -32,7 +32,7 @@ class PodnapisiModule(Module, CapSubtitle):
NAME = 'podnapisi'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Podnapisi movies and tv series subtitle website'
LICENSE = 'AGPLv3+'
BROWSER = PodnapisiBrowser
diff --git a/modules/poivy/module.py b/modules/poivy/module.py
index 3e7c25d38e311abcac6397c139847c04a53cdcf9..9c3d6e336a87935344020a69512136ddf97afc5e 100644
--- a/modules/poivy/module.py
+++ b/modules/poivy/module.py
@@ -33,7 +33,7 @@ class PoivyModule(Module, CapDocument):
NAME = 'poivy'
MAINTAINER = u'Florent Fourcot'
EMAIL = 'weboob@flo.fourcot.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = 'Poivy website'
CONFIG = BackendConfig(ValueBackendPassword('login',
diff --git a/modules/popolemploi/module.py b/modules/popolemploi/module.py
index 4a3be094125d8ca939d6002c339248fc07c2363a..e6ed965daeab90d4ffd78c58c95d7b8c4bd6acbf 100644
--- a/modules/popolemploi/module.py
+++ b/modules/popolemploi/module.py
@@ -35,7 +35,7 @@ class PopolemploiModule(Module, CapJob):
DESCRIPTION = u'Pole Emploi website'
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = PopolemploiBrowser
diff --git a/modules/pornhub/module.py b/modules/pornhub/module.py
index 74b032023c9dd09febeae475219dd739fc59103c..6b1f85c5fce6a0fb2a128f82067737de56e016f4 100644
--- a/modules/pornhub/module.py
+++ b/modules/pornhub/module.py
@@ -32,7 +32,7 @@ class PornhubModule(Module, CapVideo, CapCollection):
NAME = 'pornhub'
MAINTAINER = u'Roger Philibert'
EMAIL = 'roger.philibert@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Pornhub pornographic video streaming website'
LICENSE = 'AGPLv3+'
BROWSER = PornhubBrowser
diff --git a/modules/pradoepargne/module.py b/modules/pradoepargne/module.py
index 9a36e45adc5ba9ac58d824a034524ca2a5baf223..f65ccfd9cae5f08bdd2f75917d8c03b691fb6426 100644
--- a/modules/pradoepargne/module.py
+++ b/modules/pradoepargne/module.py
@@ -35,7 +35,7 @@ class PradoepargneModule(Module, CapBankPockets):
MAINTAINER = u'Edouard Lambert'
EMAIL = 'elambert@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
ValueBackendPassword('login', label='Identifiant', masked=False),
ValueBackendPassword('password', label='Mot de passe'))
diff --git a/modules/presseurop/module.py b/modules/presseurop/module.py
index 3481623e0aa6e0ec4f789b633be4a1db0aed4b03..5b4711f528cb67552b9d2c475c3ee0d195449433 100644
--- a/modules/presseurop/module.py
+++ b/modules/presseurop/module.py
@@ -31,7 +31,7 @@ from weboob.tools.newsfeed import Newsfeed
class NewspaperPresseuropModule(AbstractModule, CapMessages):
MAINTAINER = u'Florent Fourcot'
EMAIL = 'weboob@flo.fourcot.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
STORAGE = {'seen': {}}
NAME = 'presseurop'
diff --git a/modules/prixcarburants/module.py b/modules/prixcarburants/module.py
index 2c54b197eee3e571ad5eef8b8d6d13bbc434b749..737cccef70f6f6e3ed96ddb144edadc7cc875d7e 100644
--- a/modules/prixcarburants/module.py
+++ b/modules/prixcarburants/module.py
@@ -32,7 +32,7 @@ class PrixCarburantsModule(Module, CapPriceComparison):
NAME = 'prixcarburants'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'French governement website to compare fuel prices'
LICENSE = 'AGPLv3+'
BROWSER = PrixCarburantsBrowser
diff --git a/modules/radiofrance/module.py b/modules/radiofrance/module.py
index 260b5c5a201290ec1a90388c529745df7f5aa4ba..6b2dd20e1ec442b1151ad955e507772ace1709c8 100644
--- a/modules/radiofrance/module.py
+++ b/modules/radiofrance/module.py
@@ -39,7 +39,7 @@ class RadioFranceModule(Module, CapRadio, CapCollection, CapAudio):
NAME = 'radiofrance'
MAINTAINER = u'Laurent Bachelier'
EMAIL = 'laurent@bachelier.name'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'Radios of Radio France: Inter, Info, Bleu, Culture, Musique, FIP, Le Mouv\''
LICENSE = 'AGPLv3+'
BROWSER = RadioFranceBrowser
diff --git a/modules/ratp/module.py b/modules/ratp/module.py
index f4a71877df66e8b4ce9cb9fb96707b2a449ccd36..aeb1bf7864dd8a542eeb5c70f14179bb6b7d4dd4 100644
--- a/modules/ratp/module.py
+++ b/modules/ratp/module.py
@@ -40,7 +40,7 @@ class RATPModule(Module, CapGauge):
MAINTAINER = u'Phyks (Lucas Verney)'
EMAIL = 'phyks@phyks.me'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = RATPBrowser
diff --git a/modules/razibus/module.py b/modules/razibus/module.py
index f10193090a02b8c6b1c7372aba489d7085cb0214..eeb346c65f092e4551e06d47b79494501ce9bf2d 100644
--- a/modules/razibus/module.py
+++ b/modules/razibus/module.py
@@ -35,7 +35,7 @@ class RazibusModule(Module, CapCalendarEvent):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
ASSOCIATED_CATEGORIES = [CATEGORIES.CONCERT]
BROWSER = RazibusBrowser
diff --git a/modules/reddit/module.py b/modules/reddit/module.py
index f111dbae59db4f5b180bb55dfc13410f828ff70e..a50df2568a5083e0547756878696d5ee06c0fac5 100644
--- a/modules/reddit/module.py
+++ b/modules/reddit/module.py
@@ -44,7 +44,7 @@ class RedditModule(Module, CapImage, CapCollection, CapMessages):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
Value('subreddit', label='Name of the sub-reddit', regexp='[^/]+', default='pics'),
)
diff --git a/modules/redmine/module.py b/modules/redmine/module.py
index 90ada5c8ed78e56ec1eed342233c86bcac2c0959..20ab3eb483805fbe3038112db3cf39547396dd10 100644
--- a/modules/redmine/module.py
+++ b/modules/redmine/module.py
@@ -38,7 +38,7 @@ class RedmineModule(Module, CapContent, CapBugTracker, CapCollection):
NAME = 'redmine'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'The Redmine project management web application'
LICENSE = 'AGPLv3+'
CONFIG = BackendConfig(Value('url', label='URL of the Redmine website', regexp=r'https?://.*'),
diff --git a/modules/regionsjob/module.py b/modules/regionsjob/module.py
index 3a95ca36e31e811a2578338c6584aa9528506174..540a7340f80adfc62431eadeb77dd3654f65edc8 100644
--- a/modules/regionsjob/module.py
+++ b/modules/regionsjob/module.py
@@ -34,7 +34,7 @@ class RegionsjobModule(Module, CapJob):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = RegionsjobBrowser
diff --git a/modules/relaiscolis/module.py b/modules/relaiscolis/module.py
index d1060d9f30e1c4bd6bd718b23f146fb050d7de06..224e48c06e1eae7e1318069c6a2e6ca9250bf76f 100644
--- a/modules/relaiscolis/module.py
+++ b/modules/relaiscolis/module.py
@@ -36,7 +36,7 @@ class RelaiscolisModule(Module, CapParcel):
MAINTAINER = 'Mickaël Thomas'
EMAIL = 'mickael9@gmail.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
Value('last_name', label='Last name'),
Value('merchant', label='Merchant (leave blank)', default=''),
diff --git a/modules/residentadvisor/module.py b/modules/residentadvisor/module.py
index 66e70a6349450e09f1bb842bfaafcc9ece58f734..ca3cbada2f002838379f96f2e91a851cb81df8ed 100644
--- a/modules/residentadvisor/module.py
+++ b/modules/residentadvisor/module.py
@@ -37,7 +37,7 @@ class ResidentadvisorModule(Module, CapCalendarEvent):
MAINTAINER = u'Alexandre Morignot'
EMAIL = 'erdnaxeli@cervoi.se'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = ResidentadvisorBrowser
diff --git a/modules/rmll/module.py b/modules/rmll/module.py
index e82ed00b3c191add5abc792cddc42f2789b23469..de3ade0fb57899c911825aef51ba37ff4de05b05 100644
--- a/modules/rmll/module.py
+++ b/modules/rmll/module.py
@@ -32,7 +32,7 @@ class RmllModule(Module, CapVideo, CapCollection):
NAME = 'rmll'
MAINTAINER = u'Guyou'
EMAIL = 'guilhem.bonnefille@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Videos from RMLL'
LICENSE = 'AGPLv3+'
diff --git a/modules/s2e/module.py b/modules/s2e/module.py
index ed12168c20c0d4e2fa7bcea64135b6d8d6cdaed5..a8957bc9aee20dd18d1534f1f1a356da2eda3b3c 100644
--- a/modules/s2e/module.py
+++ b/modules/s2e/module.py
@@ -29,7 +29,7 @@ class S2eModule(Module, CapBankPockets):
MAINTAINER = u'Edouard Lambert'
EMAIL = 'elambert@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
def get_account(self, _id):
return find_object(self.browser.iter_accounts(), id=_id, error=AccountNotFound)
diff --git a/modules/sachsen/module.py b/modules/sachsen/module.py
index 969c8bb935cc617cc49c7855abc97d6f18da9eb3..5cf8ee9134c8b138ee2d4cdb2267f7e63847bd46 100644
--- a/modules/sachsen/module.py
+++ b/modules/sachsen/module.py
@@ -31,7 +31,7 @@ class SachsenLevelModule(Module, CapGauge):
NAME = 'sachsen'
MAINTAINER = u'Florent Fourcot'
EMAIL = 'weboob@flo.fourcot.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u"Level of Sachsen river"
BROWSER = SachsenBrowser
diff --git a/modules/seloger/module.py b/modules/seloger/module.py
index d224c03463b3a15f375e039c5cdf6f079f592ad7..81e2323e1e3899799d9c937f022ea19b21d658e1 100644
--- a/modules/seloger/module.py
+++ b/modules/seloger/module.py
@@ -31,7 +31,7 @@ class SeLogerModule(Module, CapHousing):
NAME = 'seloger'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'French housing website'
LICENSE = 'AGPLv3+'
ICON = 'http://static.poliris.com/z/portail/svx/portals/sv6_gen/favicon.png'
diff --git a/modules/senscritique/module.py b/modules/senscritique/module.py
index 00cdb448092277ef936ce50f78cca0bae5893ca6..10be67d58d810160798b6b0330befa755f1c5b7c 100644
--- a/modules/senscritique/module.py
+++ b/modules/senscritique/module.py
@@ -32,7 +32,7 @@ class SenscritiqueModule(Module, CapCalendarEvent):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
ASSOCIATED_CATEGORIES = [CATEGORIES.TELE]
BROWSER = SenscritiqueBrowser
diff --git a/modules/sfr/__init__.py b/modules/sfr/__init__.py
deleted file mode 100644
index 1b5ffb1af9bfbbf37e7ee7e3b5b6ad5b486d8e09..0000000000000000000000000000000000000000
--- a/modules/sfr/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .module import SfrModule
-
-__all__ = ['SfrModule']
diff --git a/modules/sfr/browser.py b/modules/sfr/browser.py
deleted file mode 100644
index bfc21ffd25fabc56cf2f1d8c306225a82e37d880..0000000000000000000000000000000000000000
--- a/modules/sfr/browser.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Christophe Benz
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.compat import quote_plus
-
-from .pages.compose import ClosePage, ComposePage, ConfirmPage, SentPage
-from .pages.login import LoginPage
-
-from weboob.deprecated.browser import Browser, BrowserIncorrectPassword
-
-
-__all__ = ['SfrBrowser']
-
-
-class SfrBrowser(Browser):
- DOMAIN = 'www.sfr.fr'
- PAGES = {
- 'http://messagerie-.+.sfr.fr/webmail/close_xms_tab.html': ClosePage,
- 'http://www.sfr.fr/xmscomposer/index.html\?todo=compose': ComposePage,
- 'http://www.sfr.fr/xmscomposer/mc/envoyer-texto-mms/confirm.html': ConfirmPage,
- 'https://www.sfr.fr/cas/login\?service=.*': LoginPage,
- 'http://www.sfr.fr/xmscomposer/mc/envoyer-texto-mms/send.html': SentPage,
- }
-
- def get_nb_remaining_free_sms(self):
- if not self.is_on_page(ComposePage):
- self.home()
- return self.page.get_nb_remaining_free_sms()
-
- def home(self):
- self.location('http://www.sfr.fr/xmscomposer/index.html?todo=compose')
-
- def is_logged(self):
- return 'loginForm' not in [form.name for form in self.forms()]
-
- def login(self):
- service_url = 'http://www.sfr.fr/xmscomposer/j_spring_cas_security_check'
- self.location('https://www.sfr.fr/cas/login?service=%s' % quote_plus(service_url), no_login=True)
- self.page.login(self.username, self.password)
- if not self.is_logged():
- raise BrowserIncorrectPassword()
-
- def post_message(self, message):
- if not self.is_on_page(ComposePage):
- self.home()
- self.page.post_message(message)
- if self.is_on_page(ConfirmPage):
- self.page.confirm()
- assert self.is_on_page(ClosePage) or self.is_on_page(SentPage)
diff --git a/modules/sfr/favicon.png b/modules/sfr/favicon.png
deleted file mode 100644
index a1ef62f8b3078a07b3f13a780be1f94f6ad0d2a3..0000000000000000000000000000000000000000
Binary files a/modules/sfr/favicon.png and /dev/null differ
diff --git a/modules/sfr/module.py b/modules/sfr/module.py
deleted file mode 100644
index c85af633d092efc9876e12924d2fbbaa70321649..0000000000000000000000000000000000000000
--- a/modules/sfr/module.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Christophe Benz
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.messages import CantSendMessage, CapMessages, CapMessagesPost
-from weboob.capabilities.account import CapAccount, StatusField
-from weboob.tools.backend import Module, BackendConfig
-from weboob.tools.value import Value, ValueBackendPassword
-
-from .browser import SfrBrowser
-
-
-__all__ = ['SfrModule']
-
-
-class SfrModule(Module, CapAccount, CapMessages, CapMessagesPost):
- NAME = 'sfr'
- MAINTAINER = u'Christophe Benz'
- EMAIL = 'christophe.benz@gmail.com'
- VERSION = '1.4'
- DESCRIPTION = 'SFR French mobile phone provider'
- LICENSE = 'AGPLv3+'
- CONFIG = BackendConfig(Value('login', label='Login'),
- ValueBackendPassword('password', label='Password'))
- BROWSER = SfrBrowser
- ACCOUNT_REGISTER_PROPERTIES = None
-
- def create_default_browser(self):
- return self.create_browser(self.config['login'].get(), self.config['password'].get())
-
- # CapMessagesPost methods
-
- def get_account_status(self):
- with self.browser:
- return (StatusField('nb_remaining_free_sms', 'Number of remaining free SMS',
- self.browser.get_nb_remaining_free_sms()),)
-
- def post_message(self, message):
- if not message.content.strip():
- raise CantSendMessage(u'Message content is empty.')
- with self.browser:
- self.browser.post_message(message)
diff --git a/modules/sfr/pages/__init__.py b/modules/sfr/pages/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/modules/sfr/pages/compose.py b/modules/sfr/pages/compose.py
deleted file mode 100644
index 6e089111591f74fc019d97d9684995cda44112d2..0000000000000000000000000000000000000000
--- a/modules/sfr/pages/compose.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Christophe Benz
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-import re
-
-from weboob.capabilities.messages import CantSendMessage
-from weboob.deprecated.browser import Page
-
-
-class ClosePage(Page):
- pass
-
-
-class ComposePage(Page):
- phone_regex = re.compile('^(\+33|0033|0)(6|7)(\d{8})$')
-
- def get_nb_remaining_free_sms(self):
- nbSms = self.parser.select(self.document.getroot(), '#freeSms',1).text.strip()
- return nbSms
-
- def post_message(self, message):
- receiver = message.thread.id
- if self.phone_regex.match(receiver) is None:
- raise CantSendMessage(u'Invalid receiver: %s' % receiver)
- self.browser.select_form(nr=0)
- self.browser['msisdns'] = receiver
- self.browser['textMessage'] = message.content.encode('utf-8')
- self.browser.submit()
-
-
-class ConfirmPage(Page):
- def confirm(self):
- self.browser.select_form(nr=0)
- self.browser.submit()
-
-
-class SentPage(Page):
- pass
diff --git a/modules/sfr/pages/login.py b/modules/sfr/pages/login.py
deleted file mode 100644
index dd868562dea98114abc51559240de10fb9dd1f76..0000000000000000000000000000000000000000
--- a/modules/sfr/pages/login.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Christophe Benz
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.deprecated.browser import Page
-
-
-class LoginPage(Page):
- def login(self, login, password):
- self.browser.select_form(nr=0)
- self.browser['username'] = login
- self.browser['password'] = password
- self.browser['remember-me'] = ['on']
- self.browser.submit()
diff --git a/modules/sfr/test.py b/modules/sfr/test.py
deleted file mode 100644
index 39685024ee6bead21360db98c77700cc7d628317..0000000000000000000000000000000000000000
--- a/modules/sfr/test.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2010-2011 Christophe Benz
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.tools.test import BackendTest
-
-
-class SFRTest(BackendTest):
- MODULE = 'sfr'
-
- def test_sfr(self):
- pass
-
- def test_create_default_browser(self):
- connect = self.backend.create_default_browser()
- assert connect
-
- def test_get_account_status(self):
- nbSms = self.backend.get_account_status()
- assert nbSms
- assert isinstance(nbSms[0].value, str)
diff --git a/modules/societegenerale/module.py b/modules/societegenerale/module.py
index 7e6ed2ace50f222bdb463600d2738db22065c2e6..149855480af7fcb1372956c481c0a4e4c9c006dc 100644
--- a/modules/societegenerale/module.py
+++ b/modules/societegenerale/module.py
@@ -48,7 +48,7 @@ class SocieteGeneraleModule(Module, CapBankWealth, CapBankTransferAddRecipient,
NAME = 'societegenerale'
MAINTAINER = u'Jocelyn Jaubert'
EMAIL = 'jocelyn.jaubert@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'Société Générale'
CONFIG = BackendConfig(
diff --git a/modules/somafm/module.py b/modules/somafm/module.py
index ed1c323336ad30b6e95bd27a16cb482d12d8caa2..5bddd0a7bbe1702955361b6bfbfa678949f0c6fa 100644
--- a/modules/somafm/module.py
+++ b/modules/somafm/module.py
@@ -30,7 +30,7 @@ class SomaFMModule(Module, CapRadio, CapCollection):
NAME = 'somafm'
MAINTAINER = u'Roger Philibert'
EMAIL = 'roger.philibert@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'SomaFM web radio'
LICENSE = 'AGPLv3+'
BROWSER = SomaFMBrowser
diff --git a/modules/spirica/module.py b/modules/spirica/module.py
index 04b50bdc742fe9df19666e59c622b3b9b91cb30c..4b33c574599ddff6e550b0a0cae5758835dfc958 100644
--- a/modules/spirica/module.py
+++ b/modules/spirica/module.py
@@ -35,7 +35,7 @@ class SpiricaModule(Module, CapBankWealth):
MAINTAINER = u'Edouard Lambert'
EMAIL = 'elambert@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
ValueBackendPassword('login', label='Identifiant', masked=False),
ValueBackendPassword('password', label='Mot de passe'))
diff --git a/modules/sprunge/module.py b/modules/sprunge/module.py
index d8788f29abe8dfec9f0e0e5c924ae175e024e6b9..ea0e514571a4b38252fadbd1229abf16acddf35b 100644
--- a/modules/sprunge/module.py
+++ b/modules/sprunge/module.py
@@ -28,7 +28,7 @@ class SprungeModule(Module, BasePasteModule):
NAME = 'sprunge'
MAINTAINER = u'Laurent Bachelier'
EMAIL = 'laurent@bachelier.name'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'Sprunge text sharing tool'
LICENSE = 'AGPLv3+'
BROWSER = SprungeBrowser
diff --git a/modules/sueurdemetal/module.py b/modules/sueurdemetal/module.py
index 2dee4a3ded525bfce7159211bf42640350ea229e..0403942657012103f631f822228135304ccb9028 100644
--- a/modules/sueurdemetal/module.py
+++ b/modules/sueurdemetal/module.py
@@ -32,7 +32,7 @@ class SueurDeMetalModule(Module, CapCalendarEvent):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = SueurDeMetalBrowser
diff --git a/modules/supertoinette/module.py b/modules/supertoinette/module.py
index 1ad0294cb88ce439bfa2d1bbfd8eea94dfd2a1da..74f7654b7692f7769722768e8107f24f9f0f06c2 100644
--- a/modules/supertoinette/module.py
+++ b/modules/supertoinette/module.py
@@ -29,7 +29,7 @@ class SupertoinetteModule(Module, CapRecipe):
NAME = 'supertoinette'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'Super Toinette, la cuisine familiale French recipe website'
LICENSE = 'AGPLv3+'
BROWSER = SupertoinetteBrowser
diff --git a/modules/suravenir/module.py b/modules/suravenir/module.py
index 69b61e1b56e9e287902043776d692e0ef2ceb30c..bd75042c34b1280258a362c4c14880ea56f35fb9 100644
--- a/modules/suravenir/module.py
+++ b/modules/suravenir/module.py
@@ -35,7 +35,7 @@ class SuravenirModule(Module, CapBankWealth):
NAME = 'suravenir'
MAINTAINER = 'Arthur Huillet'
EMAIL = 'arthur.huillet+weboob@free.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'Assurance-vie Suravenir à travers différents courtiers (assurancevie.com, linxea, ...)'
CONFIG = BackendConfig(
diff --git a/modules/t411/module.py b/modules/t411/module.py
index 3e63acff738a2688aeb3e55705807d327790575b..d32e3d464c7bf05e71746e8e739580d15530e3d4 100644
--- a/modules/t411/module.py
+++ b/modules/t411/module.py
@@ -32,7 +32,7 @@ class T411Module(Module, CapTorrent):
NAME = 't411'
MAINTAINER = u'David Kremer'
EMAIL = 'courrier@david-kremer.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'T411 BitTorrent tracker'
LICENSE = 'AGPLv3+'
CONFIG = BackendConfig(Value('username', label='Username'), ValueBackendPassword('password', label='Password'))
diff --git a/modules/tapatalk/module.py b/modules/tapatalk/module.py
index 53320c0255ee6b7cb799d68b9eccc4ffdadd5f22..93bbd53593f362d2670aeb8f70fc21ff1bd3c3cf 100644
--- a/modules/tapatalk/module.py
+++ b/modules/tapatalk/module.py
@@ -70,7 +70,7 @@ class TapatalkModule(Module, CapMessages):
MAINTAINER = u'Simon Lipp'
EMAIL = 'laiquo@hwold.net'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('username', label='Username', default=''),
ValueBackendPassword('password', label='Password', default=''),
diff --git a/modules/taz/module.py b/modules/taz/module.py
index de3f14939a85a850418bb5de0abab64f4858d754..8703ff42a0c5962fcf4c13b1866fef84beff09f4 100644
--- a/modules/taz/module.py
+++ b/modules/taz/module.py
@@ -27,7 +27,7 @@ from .tools import rssid, url2id
class NewspaperTazModule(AbstractModule, CapMessages):
MAINTAINER = u'Florent Fourcot'
EMAIL = 'weboob@flo.fourcot.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
STORAGE = {'seen': {}}
NAME = 'taz'
diff --git a/modules/tinder/module.py b/modules/tinder/module.py
index b3a4e7d6a9f4622810acf6e7682c6e56c9c884f4..cde0fbd33950c3d939a4200ca2ac9f8c95e2685c 100644
--- a/modules/tinder/module.py
+++ b/modules/tinder/module.py
@@ -85,7 +85,7 @@ class TinderModule(Module, CapMessages, CapMessagesPost, CapDating):
MAINTAINER = u'Roger Philibert'
EMAIL = 'roger.philibert@gmail.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('username', label='Facebook email'),
ValueBackendPassword('password', label='Facebook password'),
Value('location', label='Location (example: 49.6008457,6.129709)', default=''))
diff --git a/modules/torrentz/module.py b/modules/torrentz/module.py
index 164b9b2c3eb05bade9f292eba98c30952f0dbf49..fcdf9c792cb67524d28fef0f3f452040d6653a15 100644
--- a/modules/torrentz/module.py
+++ b/modules/torrentz/module.py
@@ -13,7 +13,7 @@ class TorrentzModule(Module, CapTorrent):
NAME = 'torrentz'
MAINTAINER = u'Matthieu Weber'
EMAIL = 'weboob@weber.fi.eu.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Torrentz Search Engine.'
LICENSE = 'AGPL'
BROWSER = TorrentzBrowser
diff --git a/modules/trainline/module.py b/modules/trainline/module.py
index 6d25b2ba7ea94e2e718d100240f90109e8972039..a6b226e90cbba9d2f8827c5410667427cb141016 100644
--- a/modules/trainline/module.py
+++ b/modules/trainline/module.py
@@ -35,7 +35,7 @@ class TrainlineModule(Module, CapDocument):
MAINTAINER = u'Edouard Lambert'
EMAIL = 'elambert@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('login', label='Adresse email'),
ValueBackendPassword('password', label='Mot de passe'))
diff --git a/modules/transilien/module.py b/modules/transilien/module.py
index d2ddf8c0751ecd540561974a31408e5a63566631..771d66cbd48924cc76cdfcc1faf394e0378dfd5f 100644
--- a/modules/transilien/module.py
+++ b/modules/transilien/module.py
@@ -28,7 +28,7 @@ class TransilienModule(Module, CapTravel):
NAME = 'transilien'
MAINTAINER = u'Julien Hébert'
EMAIL = 'juke@free.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u"Public transportation in the Paris area"
BROWSER = Transilien
diff --git a/modules/trictractv/__init__.py b/modules/trictractv/__init__.py
deleted file mode 100644
index 35008fa3a8d6ecf068a63858715afb81befd37ee..0000000000000000000000000000000000000000
--- a/modules/trictractv/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .module import TricTracTVModule
-
-__all__ = ['TricTracTVModule']
diff --git a/modules/trictractv/browser.py b/modules/trictractv/browser.py
deleted file mode 100644
index 900b4641bbb9bac65c5777633fd8f4ff24073bf7..0000000000000000000000000000000000000000
--- a/modules/trictractv/browser.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2011-2012 Romain Bignon, Laurent Bachelier, Benjamin Drieu
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-import re
-
-from weboob.deprecated.browser import Browser
-from weboob.deprecated.browser.decorators import id2url
-
-from .pages import IndexPage, VideoPage
-from .video import TricTracTVVideo
-
-
-__all__ = ['TricTracTVBrowser']
-
-
-class TricTracTVBrowser(Browser):
- DOMAIN = 'trictrac.tv'
- ENCODING = 'ISO-8859-1'
- PAGES = {r'http://[w\.]*trictrac.tv/': IndexPage,
- r'http://[w\.]*trictrac.tv/home/listing.php.*': IndexPage,
- r'http://[w\.]*trictrac.tv/video-(.+)': VideoPage,
- }
-
- @id2url(TricTracTVVideo.id2url)
- def get_video(self, url, video=None):
- self.location(url)
- assert self.is_on_page(VideoPage)
-
- _id = self.page.get_id()
- if video is None:
- video = TricTracTVVideo(_id)
-
- infourl = self.page.get_info_url()
- if infourl is not None:
- self.parse_info(self.openurl(infourl).read(), video)
-
- return video
-
- def home(self):
- self.location(self.buildurl('http://www.trictrac.tv/home/listing.php', mot='%'))
-
- def search_videos(self, pattern):
- if not pattern:
- self.home()
- else:
- self.location(self.buildurl('http://www.trictrac.tv/home/listing.php', mot=pattern.encode('utf-8')))
-
- assert self.is_on_page(IndexPage)
- return self.page.iter_videos()
-
- def parse_info(self, data, video):
- m = re.match ( '.*fichier=(.*?)&', data )
- video.url = unicode ( r'http://src.povcon.net/videos/%s' % m.group ( 1 ) )
-
- video.description = self.page.get_descriptif()
- video.duration = self.page.get_duration()
- video.title = self.page.get_title()
- video.date = self.page.get_date()
- video.rating = self.page.get_rating()
- video.rating_max = 5
-
- return video
diff --git a/modules/trictractv/favicon.png b/modules/trictractv/favicon.png
deleted file mode 100644
index c7cae5f497436f242b9413efae9f2d2c43886687..0000000000000000000000000000000000000000
Binary files a/modules/trictractv/favicon.png and /dev/null differ
diff --git a/modules/trictractv/module.py b/modules/trictractv/module.py
deleted file mode 100644
index 611abc384843a3dcb43133fa0365a525d70004d7..0000000000000000000000000000000000000000
--- a/modules/trictractv/module.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2011 Romain Bignon
-# Copyright(C) 2012 Benjamin Drieu
-#
-# This file is *not yet* part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.video import CapVideo
-from weboob.tools.backend import Module
-
-from .browser import TricTracTVBrowser
-from .video import TricTracTVVideo
-
-
-__all__ = ['TricTracTVModule']
-
-
-class TricTracTVModule(Module, CapVideo):
- NAME = 'trictractv'
- MAINTAINER = u'Benjamin Drieu'
- EMAIL = 'benjamin@drieu.org'
- VERSION = '1.4'
- DESCRIPTION = u'TricTrac.tv video website'
- LICENSE = 'AGPLv3+'
- BROWSER = TricTracTVBrowser
-
- def get_video(self, _id):
- with self.browser:
- return self.browser.get_video(_id)
-
- def search_videos(self, pattern=None, sortby=CapVideo.SEARCH_RELEVANCE, nsfw=False):
- with self.browser:
- return self.browser.search_videos(pattern)
-
- def fill_video(self, video, fields):
- if fields != ['thumbnail']:
- # if we don't want only the thumbnail, we probably want also every fields
- with self.browser:
- video = self.browser.get_video(TricTracTVVideo.id2url(video.id), video)
- if 'thumbnail' in fields and video.thumbnail:
- with self.browser:
- video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
-
- return video
-
- OBJECTS = {TricTracTVVideo: fill_video}
diff --git a/modules/trictractv/pages.py b/modules/trictractv/pages.py
deleted file mode 100644
index c5f4db6108ea648d6946f24d6f76e0b636579e89..0000000000000000000000000000000000000000
--- a/modules/trictractv/pages.py
+++ /dev/null
@@ -1,128 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2011-2012 Romain Bignon, Laurent Bachelier
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-import datetime
-import re
-
-from weboob.capabilities.image import Thumbnail
-from weboob.deprecated.browser import Page, BrokenPageError
-
-
-from .video import TricTracTVVideo
-
-
-class IndexPage(Page):
- def iter_videos(self):
- for div in self.parser.select(self.document.getroot(), 'li#contentsearch'):
- title = self.parser.select(div, '#titlesearch span', 1)
-
- a = self.parser.select(div, 'a', 1)
- url = a.attrib['href']
- m = re.match('/video-(.*)', url)
- if not m:
- self.logger.debug('url %s does not match' % url)
- continue
- _id = m.group(1)
- video = TricTracTVVideo(_id)
- video.title = unicode(title.text)
-
- url = self.parser.select(div, 'img', 1).attrib['src']
- stars = self.parser.select(div, '.etoile_on')
- video.rating = len(stars)
- video.rating_max = 5
-
- video.thumbnail = Thumbnail('http://www.trictrac.tv/%s' % url)
- video.thumbnail.url = video.thumbnail.id
-
- yield video
-
-
-class VideoPage(Page):
- def on_loaded(self):
- p = self.parser.select(self.document.getroot(), 'p.alert')
- if len(p) > 0:
- raise Exception(p[0].text)
-
- def get_info_url(self):
- try:
- div = self.parser.select(self.document.getroot(), '#Content_Video object', 1)
- except BrokenPageError:
- return None
- else:
- for param in self.parser.select(div, 'param', None):
- if param.get('name') == 'flashvars':
- m = re.match('varplaymedia=([0-9]*)', param.attrib['value'])
- if m:
- return r'http://www.trictrac.tv/swf/listelement.php?idfile=%s' % m.group(1)
-
- def get_title(self):
- try:
- title = self.parser.select(self.document.getroot(), 'title', 1)
- except BrokenPageError:
- return None
- else:
- return title.text
-
- def get_descriptif(self):
- try:
- descriptif = self.parser.select(self.document.getroot(), '.video_descriptif p', 1)
- except BrokenPageError:
- return None
- else:
- return descriptif.text
-
- def get_duration(self):
- try:
- details = self.parser.select(self.document.getroot(), 'div#video_detail div')
- except BrokenPageError:
- return None
- else:
- duration = details[2]
- duration_string = duration.text [ duration.text.rfind ( ' ' ) + 1 : ]
- tokens = duration_string.split(':')
- if len(tokens) > 2:
- return datetime.timedelta(hours=int(tokens[0]), minutes=int(tokens[1]), seconds=int(tokens[2]))
- else:
- return datetime.timedelta(minutes=int(tokens[0]), seconds=int(tokens[1]))
-
- def get_date(self):
- try:
- date = self.parser.select(self.document.getroot(), 'div#video_detail div.date', 1)
- except BrokenPageError:
- return None
- else:
- string = date.text
- string = string [ string.rfind('le ') + 3 : ]
- months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]
- words = string.split ( ' ' )
- month_no = months.index ( words [ 1 ] ) + 1
- return datetime.datetime.strptime ( ( '%s %s %s %s' %
- ( words [ 0 ], month_no, words [ 2 ], words [ 3 ] ) ),
- '%d %m %Y, %H:%M:%S')
-
- def get_rating(self):
- try:
- stars = self.parser.select(self.document.getroot(), '#video_info .etoile_on')
- except BrokenPageError:
- return None
- else:
- return len(stars)
-
- def get_id(self):
- return self.groups[0]
diff --git a/modules/trictractv/test.py b/modules/trictractv/test.py
deleted file mode 100644
index cda4bae2c788df882c875707d29f8e2eb573eaed..0000000000000000000000000000000000000000
--- a/modules/trictractv/test.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2011-2012 Romain Bignon, Laurent Bachelier
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.test import BackendTest
-
-
-class TricTracTVTest(BackendTest):
- MODULE = 'trictractv'
-
- def test_trictractv(self):
- l = list(self.backend.search_videos('TricTrac'))
- self.assertTrue(len(l) > 0)
- v = l[0]
- self.backend.fillobj(v, ('url',))
- self.assertTrue(v.url and v.url.startswith('http://'), 'URL for video "%s" not found: %s' % (v.id, v.url))
diff --git a/modules/trictractv/video.py b/modules/trictractv/video.py
deleted file mode 100644
index 1a38c257b19d5cfbf0330dc0e1272e08c032bb75..0000000000000000000000000000000000000000
--- a/modules/trictractv/video.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2011 Romain Bignon
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.video import BaseVideo
-
-
-class TricTracTVVideo(BaseVideo):
- def __init__(self, *args, **kwargs):
- BaseVideo.__init__(self, *args, **kwargs)
- self.ext = u'flv'
-
- @classmethod
- def id2url(cls, _id):
- return 'http://www.trictrac.tv/video-%s' % _id
diff --git a/modules/tumblr/module.py b/modules/tumblr/module.py
index c5a84db889d42abd4e44ec2566fc79412810409c..18689c35bc40d2a483ec6cc3e09727ae85887b6b 100644
--- a/modules/tumblr/module.py
+++ b/modules/tumblr/module.py
@@ -38,7 +38,7 @@ class TumblrModule(Module, CapGallery):
MAINTAINER = 'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(Value('url', label='URL of the tumblr', regexp='https?://.+'))
BROWSER = TumblrBrowser
diff --git a/modules/tvsubtitles/module.py b/modules/tvsubtitles/module.py
index a32e3c73335bfce1136ef6a507e8be0e766c9cdf..54d900f42c0798bab0b6632e792357dfaa00e508 100644
--- a/modules/tvsubtitles/module.py
+++ b/modules/tvsubtitles/module.py
@@ -30,7 +30,7 @@ class TvsubtitlesModule(Module, CapSubtitle):
NAME = 'tvsubtitles'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Tvsubtitles subtitle website'
LICENSE = 'AGPLv3+'
BROWSER = TvsubtitlesBrowser
diff --git a/modules/twitter/module.py b/modules/twitter/module.py
index 0af36d0dc5d779c369d4c976dd342b8436762aac..4cfb5ac61fcf98e5f2cee25392cf24fb6738e9e2 100644
--- a/modules/twitter/module.py
+++ b/modules/twitter/module.py
@@ -36,7 +36,7 @@ class TwitterModule(Module, CapMessages, CapMessagesPost, CapCollection):
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = TwitterBrowser
STORAGE = {'seen': {}}
diff --git a/modules/unsee/__init__.py b/modules/unsee/__init__.py
deleted file mode 100644
index d3aa6c4f2c63ca175d22da1bf22084a7514d1782..0000000000000000000000000000000000000000
--- a/modules/unsee/__init__.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2014 Vincent A
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from .module import UnseeModule
-
-
-__all__ = ['UnseeModule']
diff --git a/modules/unsee/browser.py b/modules/unsee/browser.py
deleted file mode 100644
index a3c265361a8fef2833f30033cb4b42e37eab6682..0000000000000000000000000000000000000000
--- a/modules/unsee/browser.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2014 Vincent A
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.deprecated.browser import Browser
-import os
-from uuid import uuid4
-from urllib2 import Request
-from weboob.tools.compat import urljoin
-from weboob.tools.json import json
-from weboob.deprecated.browser.parsers.lxmlparser import LxmlHtmlParser
-
-
-__all__ = ['UnseeBrowser']
-
-
-def to_bytes(s):
- if isinstance(s, unicode):
- return s.encode('utf-8')
- else:
- return s
-
-
-class FileField(object):
- def __init__(self, filename, contents=None, headers=None):
- self.filename = to_bytes(os.path.basename(filename))
- self.headers = headers or {}
- if contents is not None:
- self.contents = contents
- else:
- self.contents = open(filename).read()
-
-
-class UnseeBrowser(Browser):
- PROTOCOL = 'https'
- DOMAIN = 'unsee.cc'
- ENCODING = 'utf-8'
-
- def _make_boundary(self):
- return '==%s==' % uuid4()
-
- def _make_multipart(self, pairs, boundary):
- s = []
- for k, v in pairs:
- s.append('--%s' % boundary)
- if isinstance(v, FileField):
- s.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (k, v.filename))
- for hk, hv in v.headers.items():
- s.append('%s: %s' % (hk, hv))
- v = v.contents
- else:
- s.append('Content-Disposition: form-data; name="%s"' % k)
- s.append('')
- s.append(to_bytes(v))
- s.append('--%s--' % boundary)
- s.append('')
- return '\r\n'.join(s)
-
- def _multipart(self, url, fields):
- b = self._make_boundary()
- data = self._make_multipart(fields, b)
- headers = {'Content-type': 'multipart/form-data; boundary=%s' % b, 'Content-length': len(data)}
- return Request(url, data=self._make_multipart(fields, b), headers=headers)
-
- def post_image(self, name, contents, time):
- # time='first' for one-shot view
-
- params = [('time', time), ('image[]', FileField(name or '-', contents))]
- request = self._multipart('https://unsee.cc/upload/', params)
-
- d = json.loads(self.readurl(request))
- return {'id': d['hash']}
-
- def get_image(self, id):
- doc = self.get_document(self.openurl('https://unsee.cc/%s/' % id))
- images = LxmlHtmlParser.select(doc, '//img/@src[starts-with(., "/image/")]', method='xpath')
- url = urljoin('https://unsee.cc', images[0])
- return self.readurl(url)
diff --git a/modules/unsee/favicon.png b/modules/unsee/favicon.png
deleted file mode 100644
index 454f0b014a3fcd49fa40f6a64d0b12e85072e3dc..0000000000000000000000000000000000000000
Binary files a/modules/unsee/favicon.png and /dev/null differ
diff --git a/modules/unsee/module.py b/modules/unsee/module.py
deleted file mode 100644
index 5ca71add5d60af6a0123400735eb2fd41ed56638..0000000000000000000000000000000000000000
--- a/modules/unsee/module.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2014 Vincent A
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.backend import Module
-from weboob.capabilities.paste import BasePaste
-from weboob.tools.capabilities.paste import BasePasteModule
-from weboob.tools.capabilities.paste import image_mime
-from weboob.deprecated.browser.decorators import check_url
-import re
-
-from .browser import UnseeBrowser
-
-
-__all__ = ['UnseeModule']
-
-
-class UnPaste(BasePaste):
- @classmethod
- def id2url(cls, id):
- return 'https://unsee.cc/%s' % id
-
-
-class UnseeModule(Module, BasePasteModule):
- NAME = 'unsee'
- DESCRIPTION = u'unsee.cc expiring image hosting'
- MAINTAINER = u'Vincent A'
- EMAIL = 'dev@indigo.re'
- LICENSE = 'AGPLv3+'
- VERSION = '1.4'
-
- BROWSER = UnseeBrowser
-
- EXPIRATIONS = {3600: 'hour', 86400: 'day', 86400 * 7: 'week'}
-
- def can_post(self, contents, title=None, public=None, max_age=None):
- if re.search(r'[^a-zA-Z0-9=+/\s]', contents):
- return 0
- elif max_age is not None and not self.get_closest_expiration(max_age):
- return 0
- else:
- mime = image_mime(contents, ('gif', 'jpeg', 'png'))
- return 20 * int(mime is not None)
-
- @check_url('https?://unsee.cc/.+')
- def get_paste(self, id):
- paste = UnPaste(id)
- paste.contents = self.browser.get_image(id).encode('base64')
- return paste
-
- def new_paste(self, *a, **kw):
- return UnPaste(*a, **kw)
-
- def post_paste(self, paste, max_age=None):
- if max_age is None:
- max_code = 'week'
- else:
- max_code = self.EXPIRATIONS[self.get_closest_expiration(max_age)]
-
- d = self.browser.post_image(paste.title, paste.contents.decode('base64'), max_code)
- paste.id = d['id']
- return paste
diff --git a/modules/unsee/test.py b/modules/unsee/test.py
deleted file mode 100644
index 08a44ae420f967ad64880d5aba0eadb35efef1de..0000000000000000000000000000000000000000
--- a/modules/unsee/test.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2014 Vincent A
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.tools.test import BackendTest
-
-
-class UnseeTest(BackendTest):
- MODULE = 'unsee'
-
- # small gif file
- DATA = 'R0lGODlhAQABAIAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==\n'
-
- def test_unsee(self):
- assert self.backend.can_post(self.DATA, max_age=3600)
-
- post = self.backend.new_paste(None)
- post.contents = self.DATA
- post = self.backend.post_paste(post, max_age=3600)
- assert post.id
-
- got = self.backend.get_paste(post.id)
- assert got
- assert got.contents.decode('base64').startswith('GIF89a')
- # we can't check the exact data, unsee.cc modifies the images...
diff --git a/modules/ups/__init__.py b/modules/ups/__init__.py
deleted file mode 100644
index aac6131314c120e93aeadac907defedc6176db20..0000000000000000000000000000000000000000
--- a/modules/ups/__init__.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Romain Bignon
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from .module import UpsModule
-
-
-__all__ = ['UpsModule']
diff --git a/modules/ups/browser.py b/modules/ups/browser.py
deleted file mode 100644
index be6f533180064cc8efc41392b169936da5275296..0000000000000000000000000000000000000000
--- a/modules/ups/browser.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Romain Bignon
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-from weboob.deprecated.browser import Browser
-from weboob.tools.compat import urlencode
-
-from .pages import TrackPage
-
-
-__all__ = ['UpsBrowser']
-
-
-class UpsBrowser(Browser):
- PROTOCOL = 'https'
- DOMAIN = 'wwwapps.ups.com'
- ENCODING = None
-
- PAGES = {
- 'https://wwwapps.ups.com/WebTracking/track': TrackPage,
- }
-
- def get_tracking_info(self, _id):
- data = {'HTMLVersion': '5.0',
- 'USER_HISTORY_LIST': '',
- 'loc': 'en_US',
- 'track.x': 'Track',
- 'trackNums': _id.encode('utf-8'),
- }
- self.location('https://wwwapps.ups.com/WebTracking/track', urlencode(data))
- assert self.is_on_page(TrackPage)
-
- return self.page.get_info(_id)
diff --git a/modules/ups/favicon.png b/modules/ups/favicon.png
deleted file mode 100644
index 17e6a4064115fe9c5d36947ad03ed5bdeaf20b7b..0000000000000000000000000000000000000000
Binary files a/modules/ups/favicon.png and /dev/null differ
diff --git a/modules/ups/module.py b/modules/ups/module.py
deleted file mode 100644
index 4ca9bc432ec12745779b2abb55699aaad493563e..0000000000000000000000000000000000000000
--- a/modules/ups/module.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Romain Bignon
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-from weboob.capabilities.parcel import CapParcel
-from weboob.tools.backend import Module
-
-from .browser import UpsBrowser
-
-
-__all__ = ['UpsModule']
-
-
-class UpsModule(Module, CapParcel):
- NAME = 'ups'
- DESCRIPTION = u'UPS website'
- MAINTAINER = u'Romain Bignon'
- EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
-
- BROWSER = UpsBrowser
-
- def get_parcel_tracking(self, id):
- with self.browser:
- return self.browser.get_tracking_info(id)
diff --git a/modules/ups/pages.py b/modules/ups/pages.py
deleted file mode 100644
index 907b4dab2630dfef57c41bf21fcd19a2cae880f2..0000000000000000000000000000000000000000
--- a/modules/ups/pages.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright(C) 2013 Romain Bignon
-#
-# This file is part of weboob.
-#
-# weboob is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# weboob is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with weboob. If not, see .
-
-
-import re
-from dateutil.parser import parse as parse_date
-
-from weboob.capabilities.parcel import Parcel, Event
-from weboob.deprecated.browser import Page
-
-
-class TrackPage(Page):
- def get_info(self, id):
- if len(self.parser.tocleanstring(self.document.xpath('//p[@class="error"]')[0])) > 0:
- return None
-
- p = Parcel(id)
- for dl in self.document.xpath('//dl'):
- dt = dl.find('dt')
- dd = dl.find('dd')
- if dt is None or dd is None:
- continue
- label = self.parser.tocleanstring(dt)
- if label == 'Scheduled Delivery:':
- p.status = p.STATUS_IN_TRANSIT
- elif label == u'Delivered On:':
- p.status = p.STATUS_ARRIVED
- else:
- continue
-
- m = re.search('(\d+/\d+/\d+)', dd.text)
- if m:
- p.arrival = parse_date(m.group(1))
-
- p.history = []
- for i, tr in enumerate(self.document.xpath('//table[@class="dataTable"]//tr')):
- tds = tr.findall('td')
- if len(tds) < 4:
- continue
-
- ev = Event(i)
- ev.location = self.parser.tocleanstring(tds[0])
- ev.activity = self.parser.tocleanstring(tds[-1])
- ev.date = parse_date('%s %s' % (tds[1].text, tds[2].text))
- p.history.append(ev)
-
- p.info = self.document.xpath('//a[@id="tt_spStatus"]')[0].text.strip()
-
- return p
diff --git a/modules/vicsec/module.py b/modules/vicsec/module.py
index 4ef586239283c84baba775cedf2476f81d275988..859893cf1d067afb0b34a37544197394559acf5e 100644
--- a/modules/vicsec/module.py
+++ b/modules/vicsec/module.py
@@ -31,7 +31,7 @@ class VicSecModule(Module, CapShop):
NAME = 'vicsec'
MAINTAINER = u'Oleg Plakhotniuk'
EMAIL = 'olegus8@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'Victoria\'s Secret'
CONFIG = BackendConfig(
diff --git a/modules/vicseccard/module.py b/modules/vicseccard/module.py
index 9742ee6f52499f83a4004befa82a3babc60c842a..e60e7bb0e08573ecafcb2a9011074e93df0800e9 100644
--- a/modules/vicseccard/module.py
+++ b/modules/vicseccard/module.py
@@ -30,7 +30,7 @@ class VicSecCardModule(Module, CapBank):
NAME = 'vicseccard'
MAINTAINER = u'Oleg Plakhotniuk'
EMAIL = 'olegus8@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'Victoria\'s Secret Angel Card'
CONFIG = BackendConfig(
diff --git a/modules/vimeo/module.py b/modules/vimeo/module.py
index d2fbf4e0557cb3014683eebba6bc7dfbf4b5be1a..de3072e9b0988ece308aa7ee8475128f75238718 100644
--- a/modules/vimeo/module.py
+++ b/modules/vimeo/module.py
@@ -37,7 +37,7 @@ class VimeoModule(Module, CapVideo, CapCollection):
NAME = 'vimeo'
MAINTAINER = u'François Revol'
EMAIL = 'revol@free.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Vimeo video streaming website'
LICENSE = 'AGPLv3+'
BROWSER = VimeoBrowser
diff --git a/modules/vine/module.py b/modules/vine/module.py
index 51cd37bfcaaa311bec2b0db52c60854ae01a7f4e..e193c888a681ff99a195da308df30a3afd53464c 100644
--- a/modules/vine/module.py
+++ b/modules/vine/module.py
@@ -33,7 +33,7 @@ class VineModule(Module, CapVideo):
MAINTAINER = u'P4ncake'
EMAIL = 'me@p4ncake.fr'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = VineBrowser
diff --git a/modules/virginradio/module.py b/modules/virginradio/module.py
index aa62a014daf7e0288c41a474c13c0f0d7d46c2b2..696b021c07f0a6da60c3351917d06a276081f741 100644
--- a/modules/virginradio/module.py
+++ b/modules/virginradio/module.py
@@ -34,7 +34,7 @@ class VirginRadioModule(Module, CapRadio, CapCollection):
NAME = 'virginradio'
MAINTAINER = u'Johann Broudin'
EMAIL = 'Johann.Broudin@6-8.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = u'VirginRadio french radio'
LICENSE = 'AGPLv3+'
BROWSER = Browser
diff --git a/modules/vlille/module.py b/modules/vlille/module.py
index 1f758c2cdbac4e262bf4699fde59fffe041bcc22..d322f58e2066b5fc8ffc1c067a09682b115277ba 100644
--- a/modules/vlille/module.py
+++ b/modules/vlille/module.py
@@ -32,7 +32,7 @@ class VlilleModule(Module, CapGauge):
DESCRIPTION = u'Lille bike renting availability information'
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = VlilleBrowser
diff --git a/modules/weather/module.py b/modules/weather/module.py
index e99c83f4d6c564dba5848af2808bfdf5bb275391..d34deee9212fbafd99c7b842d848e5266296a59a 100644
--- a/modules/weather/module.py
+++ b/modules/weather/module.py
@@ -30,7 +30,7 @@ class WeatherModule(Module, CapWeather):
NAME = 'weather'
MAINTAINER = u'Arno Renevier'
EMAIL = 'arno@renevier.net'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Get forecasts from weather.com'
LICENSE = 'AGPLv3+'
BROWSER = WeatherBrowser
diff --git a/modules/wellsfargo/module.py b/modules/wellsfargo/module.py
index acb0256830c8044707e99e8641853df8a4a01078..bb7028681d2d4cbb11ba72e1912ad804f7b1ab00 100644
--- a/modules/wellsfargo/module.py
+++ b/modules/wellsfargo/module.py
@@ -32,7 +32,7 @@ class WellsFargoModule(Module, CapBank):
NAME = 'wellsfargo'
MAINTAINER = u'Oleg Plakhotniuk'
EMAIL = 'olegus8@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
DESCRIPTION = u'Wells Fargo'
CONFIG = BackendConfig(
diff --git a/modules/wordreference/module.py b/modules/wordreference/module.py
index 3c1b68cd96d033437682a11a256ec731b4212be7..deaa1e1b3772347562fcd694f30522c5af7ada70 100644
--- a/modules/wordreference/module.py
+++ b/modules/wordreference/module.py
@@ -31,7 +31,7 @@ __all__ = ['WordReferenceModule']
class WordReferenceModule(Module, CapTranslate):
MAINTAINER = u'Lucien Loiseau'
EMAIL = 'loiseau.lucien@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
LICENSE = 'AGPLv3+'
NAME = 'wordreference'
DESCRIPTION = u'Free online translator'
diff --git a/modules/xhamster/module.py b/modules/xhamster/module.py
index b97c3916d60a8709b4c977811b8d0897fbb4fb3e..96a197cdb1c713f384758579801558a1800e0b37 100644
--- a/modules/xhamster/module.py
+++ b/modules/xhamster/module.py
@@ -36,7 +36,7 @@ class XHamsterModule(Module, CapVideo):
MAINTAINER = 'Roger Philibert'
EMAIL = 'roger.philibert@gmail.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
BROWSER = XHamsterBrowser
diff --git a/modules/yahoo/module.py b/modules/yahoo/module.py
index 3a1a1c34b9b09306aef523212f5917d7440ab5bc..9a4afde7594e34ed4c2f8fd73653ba31e1d7d80b 100644
--- a/modules/yahoo/module.py
+++ b/modules/yahoo/module.py
@@ -33,7 +33,7 @@ class YahooModule(Module, CapWeather):
NAME = 'yahoo'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'Yahoo! Weather.'
LICENSE = 'AGPLv3+'
BROWSER = YahooBrowser
diff --git a/modules/yggtorrent/module.py b/modules/yggtorrent/module.py
index 2ae913016a01ea666c398ae04b35a0bafa826538..6a8b2fbefc6553dee396c94e05a18f80072a087d 100644
--- a/modules/yggtorrent/module.py
+++ b/modules/yggtorrent/module.py
@@ -31,7 +31,7 @@ class YggtorrentModule(Module, CapTorrent):
NAME = 'yggtorrent'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'eneiluj@posteo.net'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'YGG BitTorrent tracker'
LICENSE = 'AGPLv3+'
CONFIG = BackendConfig(Value('username', label='Username'), ValueBackendPassword('password', label='Password'))
diff --git a/modules/yomoni/module.py b/modules/yomoni/module.py
index 6cb9aef2c68d860c13eedf8dbe80bc4cef0cbaa2..fca8f17a8bc608b056dc59468cbdd78bb5ffe701 100644
--- a/modules/yomoni/module.py
+++ b/modules/yomoni/module.py
@@ -35,7 +35,7 @@ class YomoniModule(Module, CapBankWealth):
MAINTAINER = u'Edouard Lambert'
EMAIL = 'elambert@budget-insight.com'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
ValueBackendPassword('login', label='Adresse email', masked=False),
ValueBackendPassword('password', label='Mot de passe'))
diff --git a/modules/youjizz/module.py b/modules/youjizz/module.py
index 4659fa1a3bae047c1aec8d6deb44d6482630c51b..7a3ddb2289eca1507566b2c024fe67d37fb3afc7 100644
--- a/modules/youjizz/module.py
+++ b/modules/youjizz/module.py
@@ -32,7 +32,7 @@ class YoujizzModule(Module, CapVideo, CapCollection):
NAME = 'youjizz'
MAINTAINER = u'Roger Philibert'
EMAIL = 'roger.philibert@gmail.com'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'YouJizz pornographic video streaming website'
LICENSE = 'AGPLv3+'
BROWSER = YoujizzBrowser
diff --git a/modules/youporn/module.py b/modules/youporn/module.py
index b42c36d38de4777d6a8ed367138f3de6ad1a2615..13f2061f39f7c7edd38a02c160a646cfd37e0894 100644
--- a/modules/youporn/module.py
+++ b/modules/youporn/module.py
@@ -33,7 +33,7 @@ class YoupornModule(Module, CapVideo, CapCollection):
NAME = 'youporn'
MAINTAINER = u'Romain Bignon'
EMAIL = 'romain@weboob.org'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'YouPorn pornographic video streaming website'
LICENSE = 'AGPLv3+'
BROWSER = YoupornBrowser
diff --git a/modules/youtube/module.py b/modules/youtube/module.py
index ed5bdd0708138ebfd187495cb74ae2461832810f..c93a56a699817ff8e0f48d432f64dd19a8a7f75f 100644
--- a/modules/youtube/module.py
+++ b/modules/youtube/module.py
@@ -47,7 +47,7 @@ class YoutubeModule(Module, CapVideo, CapCollection):
NAME = 'youtube'
MAINTAINER = u'Laurent Bachelier'
EMAIL = 'laurent@bachelier.name'
- VERSION = '1.4'
+ VERSION = '1.5'
DESCRIPTION = 'YouTube video streaming website'
LICENSE = 'AGPLv3+'
BROWSER = None
diff --git a/modules/zerobin/module.py b/modules/zerobin/module.py
index a1c7bc6c0eae537f1a228388738c285705ca718e..db3f2fb6256b68af39683b5d8dde55a3eac20ae3 100644
--- a/modules/zerobin/module.py
+++ b/modules/zerobin/module.py
@@ -35,7 +35,7 @@ class ZerobinModule(Module, CapPaste):
MAINTAINER = u'Vincent A'
EMAIL = 'dev@indigo.re'
LICENSE = 'AGPLv3+'
- VERSION = '1.4'
+ VERSION = '1.5'
CONFIG = BackendConfig(
Value('url', label='URL of the zerobin/0bin/privatebin', regexp='https?://.*', default='https://zerobin.net'),
ValueBool('discussion', label='Allow paste comments (ZeroBin only)', default=False),