Some small fixes with browser2
This commit is contained in:
parent
9155747fb9
commit
8a28d9cc5f
2 changed files with 4 additions and 5 deletions
|
|
@ -127,5 +127,4 @@ class INGBackend(BaseBackend, ICapBank, ICapBill):
|
||||||
if not isinstance(bill, Bill):
|
if not isinstance(bill, Bill):
|
||||||
bill = self.get_bill(bill)
|
bill = self.get_bill(bill)
|
||||||
self.browser.predownload(bill)
|
self.browser.predownload(bill)
|
||||||
with self.browser:
|
return self.browser.open("https://secure.ingdirect.fr" + bill._url)
|
||||||
return self.browser.readurl("https://secure.ingdirect.fr" + bill._url)
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
import hashlib
|
import hashlib
|
||||||
import urllib
|
|
||||||
|
|
||||||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||||
from weboob.tools.browser import BrowserIncorrectPassword
|
from weboob.tools.browser import BrowserIncorrectPassword
|
||||||
|
|
@ -217,8 +216,9 @@ class IngBrowser(LoginBrowser):
|
||||||
############# CapBill #############
|
############# CapBill #############
|
||||||
@need_login
|
@need_login
|
||||||
def get_subscriptions(self):
|
def get_subscriptions(self):
|
||||||
return self.billpage.stay_or_go().iter_account()
|
return self.billpage.go().iter_account()
|
||||||
|
|
||||||
|
@need_login
|
||||||
def get_bills(self, subscription):
|
def get_bills(self, subscription):
|
||||||
self.billpage.stay_or_go()
|
self.billpage.stay_or_go()
|
||||||
data = {"AJAXREQUEST": "_viewRoot",
|
data = {"AJAXREQUEST": "_viewRoot",
|
||||||
|
|
@ -232,4 +232,4 @@ class IngBrowser(LoginBrowser):
|
||||||
return self.page.iter_bills(subid=subscription.id)
|
return self.page.iter_bills(subid=subscription.id)
|
||||||
|
|
||||||
def predownload(self, bill):
|
def predownload(self, bill):
|
||||||
self.page.postpredown(localid=bill._localid)
|
self.page.postpredown(bill._localid)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue