Fix permissions, encoding and copyrights
This commit is contained in:
parent
2012ac3690
commit
f73f671cbe
19 changed files with 29 additions and 34 deletions
0
modules/amazon/browser.py
Executable file → Normal file
0
modules/amazon/browser.py
Executable file → Normal file
13
modules/amazon/fr/pages.py
Executable file → Normal file
13
modules/amazon/fr/pages.py
Executable file → Normal file
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2014 Oleg Plakhotniuk
|
||||
# Copyright(C) 2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
@ -91,7 +91,7 @@ class OrderPage(AmazonPage):
|
|||
m = re.match(u'.*EUR ([,0-9]+).*', amount)
|
||||
if m:
|
||||
return Decimal(m.group(1).replace(",","."))
|
||||
|
||||
|
||||
def month_to_int(self, text):
|
||||
for (idx, month) in enumerate(FRENCH_MONTHS):
|
||||
text = text.replace(month, str(idx + 1))
|
||||
|
|
@ -102,9 +102,6 @@ class OrderNewPage(OrderPage):
|
|||
ENCODING='ISO-8859-15'
|
||||
is_here = u'//*[contains(text(),"Commandé le")]'
|
||||
|
||||
# def text(self):
|
||||
# return self.response.text.decode('iso-8859-1').encode('utf-8')
|
||||
|
||||
def order(self):
|
||||
if not self.shouldSkip():
|
||||
order = Order(id=self.order_number())
|
||||
|
|
@ -116,7 +113,7 @@ class OrderNewPage(OrderPage):
|
|||
return order
|
||||
|
||||
def order_date(self):
|
||||
return datetime.strptime(
|
||||
return datetime.strptime(
|
||||
re.match(u'.*Commandé le ([0-9]+ [0-9]+ [0-9]+) .*',
|
||||
self.month_to_int(self.date_num())).group(1),
|
||||
'%d %m %Y')
|
||||
|
|
@ -245,7 +242,7 @@ class OrderOldPage(OrderPage):
|
|||
def order_date(self):
|
||||
date_str = self.doc.xpath(u'//b[contains(text(),"Commande numérique")]')[0].text
|
||||
month_str = re.match(u'.*Commande numérique : [0-9]+ ([^ ]+) [0-9]+.*', date_str).group(1)
|
||||
return datetime.strptime(
|
||||
return datetime.strptime(
|
||||
re.match(u'.*Commande numérique : ([0-9]+ [0-9]+ [0-9]+).*',
|
||||
date_str.replace(month_str, str(FRENCH_MONTHS.index(month_str) + 1))).group(1),
|
||||
'%d %m %Y')
|
||||
|
|
|
|||
2
modules/amazon/module.py
Executable file → Normal file
2
modules/amazon/module.py
Executable file → Normal file
|
|
@ -1,4 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2014 Oleg Plakhotniuk
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
2
modules/ameli/browser.py
Executable file → Normal file
2
modules/ameli/browser.py
Executable file → Normal file
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2010-2011 Romain Bignon
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2009-2013 Romain Bignon
|
||||
# Copyright(C) 2009-2012 Romain Bignon
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2013 Christophe Lampin
|
||||
# Copyright(C) 2010-2012 Romain Bignon
|
||||
#
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
|
||||
# This file is part of weboob.
|
||||
#
|
||||
# weboob is free software: you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2010-2011 Romain Bignon
|
||||
# Copyright(C) 2010-2012 Romain Bignon
|
||||
# Copyright(C) 2013-2015 Christophe Lampin
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue