Commit graph

115 commits

Author SHA1 Message Date
Romain Bignon
6fcac89dd5 first step in python3 support 2014-05-17 14:27:55 +02:00
Romain Bignon
7c1e08eb96 move browser exceptions into weboob.tools.exceptions 2014-05-17 14:27:55 +02:00
Romain Bignon
273f0e683e logger can be unset at this step 2014-03-26 09:44:13 +01:00
Romain Bignon
42028c390f add a 'settings' attribute on loggers to store user values like 'save_responses', 'responses_dirname', 'ssl_insecure', etc. 2014-03-25 22:58:35 +01:00
Romain Bignon
8292eadaee remove useless debug message, imports and functions 2014-03-13 21:27:43 +01:00
Johann Broudin
0f1726d01c add ssl proxy support to browser and browser2 and add the option _proxy_ssl 2014-03-13 20:20:02 +01:00
Romain Bignon
2147c4b363 unify no_login and nologin 2014-02-16 19:49:08 +01:00
Florent
578216b55e Move the test on self.insecure to catch direct calls
Module likes societegenerale includes direct calls
on lowsslcheck, and the option -I (insecure) is not tested.
2013-11-26 18:39:34 +01:00
Florent
33b682d24a Add a timeout to DNS values in cache 2013-08-02 13:09:31 +02:00
Florent
b058ef785e Add a local DNS cache in browser
Should solve BNP DNS errors
2013-08-02 12:59:12 +02:00
Laurent Bachelier
a6ad7e83ff Use newer form of catching exceptions
autopep8 -i --select=W602
Also some other minor deprecated syntax changes, like "while 1".
I did not commit the less obvious changes.
2013-07-27 15:16:16 +02:00
Romain Bignon
c0740e695d remove useless import of with_statement (we do not support anymore python2.5)
refs #806
2013-07-27 14:38:18 +02:00
Laurent Bachelier
db9f2d6d73 Tools to easily get the CERTHASH 2013-07-23 20:25:51 +02:00
Laurent Bachelier
5f9641e201 Fix doctest syntax
This also had the power to crash newer pyflakes releases.
2013-07-04 00:14:44 +02:00
Romain Bignon
09b0ae72d4 implicitly convert unicode objects to str for form values 2013-04-01 17:24:20 +02:00
Laurent Bachelier
be3e19a203 try/except import are now handled by flake8 2.0+ / pyflakes 0.6+ 2013-03-19 19:10:20 +01:00
Laurent Bachelier
7094931c92 Easy spacing fixes, trailing stuff
Remove useless trailing \
Remove trailing spaces
Add missing empty lines

autopep8 -ir -j2 --select=E301,E302,E502,W291,W293,W391 .

Diff quickly checked.
2013-03-16 00:54:55 +01:00
Laurent Bachelier
5747a98541 Use Firefox ESR
This is a long-term support version (54 weeks), which is ideal for us.
2013-03-02 10:35:07 +01:00
Laurent Bachelier
99f8a03895 Cache the sucessful protocols
And avoid doing too many failed handshakes.
2013-02-11 14:45:28 +01:00
Laurent Bachelier
085c784691 Fall back on SSLv3 if TLSv1 fails
This is so dirty :(
2013-02-11 14:45:27 +01:00
Romain Bignon
69e4c77257 use recent firefox user agent 2013-02-10 02:17:54 +01:00
Romain Bignon
126b5be301 ability to set a ENCODING constant to BasePage which overrides the Browser's one 2013-02-05 20:22:44 +01:00
Romain Bignon
535d6efc47 more explicit error messages during common import errors 2013-01-14 21:28:47 +01:00
Laurent Bachelier
8bc80db331 Add global "insecure" option to skip SSL validation
closes #930
2013-01-10 09:38:17 +01:00
Romain Bignon
db6ee276fa ability to specify a parser to use on a page handler 2013-01-02 13:48:42 +01:00
Laurent Bachelier
b3d1a17eaa Remove double import
This was likely introduced by copy-pasting from another file.
See e825a7eac0.
2012-11-24 20:30:31 +01:00
Laurent Bachelier
541d080c9d Use flake8 if available instead of pyflakes
With flake8, we can check for more issues and ignore those who are not
real issues.

This allowed me to find genuine errors in:
- modules/boursorama/pages/account_history.py
- modules/ing/pages/login.py
- weboob/tools/application/qt/qt.py
I left one in weboob/tools/browser/browser.py for the time being.

Some PEP8 fixes on other files.
2012-11-24 19:46:34 +01:00
Romain Bignon
e825a7eac0 add a ssl timeout (temp fix) 2012-11-24 12:06:13 +01:00
Laurent Bachelier
3eba9a809b Allow multiple CERTHASH values in a module
Also fix typos and usage of reserved hash() function.
2012-11-10 18:22:30 +01:00
Florent
894784995a Add new exception BrowserForbidden 2012-11-10 13:23:00 +01:00
Romain Bignon
3ea8494e80 fix certificate check 2012-09-05 15:55:12 +02:00
Romain Bignon
56797a7d0c automagically check certificate fingerprint if CERTHASH class attribute is set 2012-09-01 13:36:30 +02:00
Florent
702b56d594 SSL workaround 2012-09-01 12:56:23 +02:00
Romain Bignon
8677d8b183 raise a BrowserIncorrectPassword exception when handling a 401 2012-07-22 21:12:51 +02:00
Romain Bignon
5a046f00a8 create weboob.tools.browser.BrowserPasswordExpired 2012-04-21 18:22:07 +02:00
Romain Bignon
7a619a78d0 StandardBrowser.openurl uses mechanize.Browser.openurl instead of openurl_novisit 2012-04-13 15:00:12 +02:00
Romain Bignon
06599f48bc add a default timeout to 10s on connections 2012-04-12 21:50:56 +02:00
Romain Bignon
7082571acf update code documentation 2012-04-01 17:41:20 +02:00
Romain Bignon
c6a141595c change way to describe fields of CapBaseObject, and lot of documentation 2012-03-26 14:35:54 +02:00
Romain Bignon
98968d50d1 use urlparse to parse proxy url 2012-03-14 19:44:46 +01:00
Laurent Bachelier
391783a8b6 Support gzipped responses 2012-03-09 01:35:51 +01:00
Romain Bignon
5b9b1bfa16 better browser exceptions handling
Are considered to BrowserHTTPNotFound 403 errors and BrowserStateError.
Also, during StandardBrowser.openurl(), do not retry if error is
BrowserStateError.
2012-02-15 23:56:14 +01:00
Romain Bignon
05026b2f18 check that url isn't an unicode string (closes #784) 2012-02-07 14:49:25 +01:00
Laurent Bachelier
1621f3c3c0 Allow more freedom in page regexps
If the user starts with ^ or ends with $, do not add them. This allows
using only $ or ^.
If it's not a string, don't do anything to it (it has to be a regexp, or
mimic one).
Use search() instead of match(). They are the same, except match implies ^.

This does not break any module, it only adds more possibilities.
2012-02-01 23:19:01 +01:00
Laurent Bachelier
03f65bb121 Try to separate saved responses by backend
closes #661
2012-02-01 23:04:04 +01:00
Romain Bignon
4edeba3d62 fix crash when there isn't any photos on a profile 2011-12-12 14:37:24 +01:00
Romain Bignon
3110a1cd5a this is the end of the 'oh my fucking god' error message 2011-12-03 13:30:27 +01:00
Florent
7a2b21f1b6 Add the nologin option to "submit"
Signed-off-by: Romain Bignon <romain@peerfuse.org>
2011-11-29 17:14:41 +01:00
Laurent Bachelier
478696379c Try to add an extension when saving responses 2011-09-26 12:55:57 +02:00
Romain Bignon
5337e53b49 split BaseBrowser into new class StandardBrowser which is usable without inheriting it 2011-09-23 09:59:12 +02:00