Commit 4c13018e authored by Romain Pesche's avatar Romain Pesche Committed by Vincent A

[onlinenet] mark onlinenet as python3 compatible

parent 2f9307ec
......@@ -17,6 +17,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from weboob.capabilities.bill import DocumentTypes, CapDocument, Subscription, Document, SubscriptionNotFound, DocumentNotFound
from weboob.capabilities.base import find_object, NotAvailable
......@@ -31,8 +32,8 @@ __all__ = ['OnlinenetModule']
class OnlinenetModule(Module, CapDocument):
NAME = 'onlinenet'
DESCRIPTION = u'Online.net'
MAINTAINER = u'Edouard Lambert'
DESCRIPTION = 'Online.net'
MAINTAINER = 'Edouard Lambert'
EMAIL = 'elambert@budget-insight.com'
LICENSE = 'LGPLv3+'
VERSION = '1.6'
......
......@@ -17,6 +17,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import re
......@@ -56,9 +57,9 @@ class DocumentsPage(LoggedPage, HTMLPage):
item_xpath = '//h3[contains(text(), "bills")]/following-sibling::table//tr[position() > 1]'
head_xpath = '//h3[contains(text(), "bills")]/following-sibling::table//tr/th'
col_id = u'Id'
col_date = u'Date'
col_price = u'Total TTC'
col_id = 'Id'
col_date = 'Date'
col_price = 'Total TTC'
class item(ItemElement):
klass = Bill
......@@ -66,11 +67,11 @@ class DocumentsPage(LoggedPage, HTMLPage):
obj_id = Format('%s_%s', Env('username'), CleanDecimal(TableCell('id')))
obj__url = Attr('.//a[contains(text(), "PDF")]', 'href', default=NotAvailable)
obj_date = Date(CleanText(TableCell('date')))
obj_format = u"pdf"
obj_format = 'pdf'
obj_label = Format('Facture %s', CleanDecimal(TableCell('id')))
obj_type = DocumentTypes.BILL
obj_price = CleanDecimal(TableCell('price'))
obj_currency = u'EUR'
obj_currency = 'EUR'
def condition(self):
return CleanText(TableCell('id'))(self) != "No bills"
......@@ -88,7 +89,7 @@ class DocumentsPage(LoggedPage, HTMLPage):
obj_id = Format('%s_%s', Env('username'), Env('docid'))
obj__url = Attr('.', 'href')
obj_format = u"pdf"
obj_format = 'pdf'
obj_label = CleanText('.')
obj_type = DocumentTypes.OTHER
......
......@@ -121,6 +121,7 @@ nectarine
nef
nova
oney
onlinenet
opensubtitles
orange
ouifm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment