Commit graph

1,048 commits

Author SHA1 Message Date
Laurent Bachelier
9619ddcaa2 browser2: Add RawText filter
Allows getting .text of elements without any alteration.
This is useful for at least textarea and pre tags.

Maybe the .join character should be configurable.
2014-06-04 00:49:00 +02:00
Laurent Bachelier
c69c5cf5ef browser2: More specialized exceptions
and extend common exceptions
2014-06-03 22:28:21 +02:00
Bezleputh
c20e6123fc [repl] allow to browse subfolders with ls 2014-06-01 13:39:25 +02:00
Laurent Bachelier
e01fda826c filters: Properly handle defaults that are not datetimes 2014-05-27 17:41:51 +02:00
Laurent Bachelier
d56dff061d Fix French date replacements
Otherwise, "janvier" got me "januaryary".
2014-05-27 15:40:42 +02:00
Romain Bignon
6d451e5f34 Date filter: use default value for empty input 2014-05-27 12:21:24 +02:00
Laurent Bachelier
aa72812b36 date tools: class methods to convert date[time] objects 2014-05-26 20:07:41 +02:00
Laurent Bachelier
3ffee483b0 yaml: Represent weboob date[time] objects as timestamps
Unfortunately, I couldn't make timestamps always load
as our date[time] objects, at least with CLoader.
2014-05-26 20:07:41 +02:00
Bezleputh
644f1ed4b0 [dates] add more french date translations 2014-05-22 15:17:00 +02:00
Romain Bignon
4b4ec43ab7 fix crash on python2.7.7 (conflict a new private method) 2014-05-22 09:25:27 +02:00
Bezleputh
3c4f8d35e0 [Filters] convert date in english in DateTime 2014-05-21 17:54:55 +02:00
Florent
9ca0bbae6a bump to 0.j 2014-05-19 22:45:35 +02:00
Romain Bignon
5c8982e5e9 Filter does not have any logger, raise an exception instead 2014-05-19 22:07:34 +02:00
Romain Bignon
5a6cdce345 fix unicode issues for values loaded from 'backends' config file 2014-05-19 09:20:34 +02:00
Romain Bignon
a5f95183a7 fix syntax error 2014-05-19 07:50:45 +02:00
Romain Bignon
c409675e6c fix compatibility with python2.6 2014-05-19 07:23:12 +02:00
Laurent Bachelier
14b1b56914 browser2: Add an option to convert POST data to the proper encoding
And autodetect it on forms. There is no other way to know what is the
expected encoding.
2014-05-19 01:01:25 +02:00
Romain Bignon
e4d4ed206f correctly handle _proxy_ssl backend's private config 2014-05-18 18:35:12 +02:00
Romain Bignon
19ae5d6312 add linesep to output content if file is not sys.stdout (closes #1383) 2014-05-17 15:55:03 +02:00
Romain Bignon
15a58d5647 import browser exceptions from weboob.tools.exceptions 2014-05-17 14:56:07 +02:00
Romain Bignon
3e1dec519e move ParseError into weboob.tools.exceptions 2014-05-17 14:27:55 +02:00
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
686a3b77e8 fix URL.id2url (give the browser instance to URL.build()) 2014-05-17 14:27:34 +02:00
Laurent Bachelier
82f47bff88 Allow forcing a Page content encoding 2014-05-16 15:37:24 +02:00
Laurent Bachelier
e01b39c8d2 Also ignore URLs where all kwargs were not used 2014-05-16 11:47:25 +02:00
Laurent Bachelier
6e9910ae9a Only use full-name substitutions, to allow % in URLs 2014-05-16 11:47:25 +02:00
Laurent Bachelier
28d16c01eb Allow a default equal to None
get(..., default=None) will now be able to work.
2014-05-16 11:44:29 +02:00
Roger Philibert
6031ff1ef9 Form.submit can take extra parameters given to location() 2014-05-09 22:59:36 +02:00
Florent
b593e69e64 Do no fill obj if it is not a CapObject 2014-05-08 12:19:57 +02:00
Romain Bignon
ba7d10046f Amount filter: credit_selector is optional too 2014-05-08 10:27:34 +02:00
Florent
236b9087a2 Set comp_object as class method 2014-05-07 23:22:28 +02:00
Bezleputh
7b799a6fbb gather collections having the same path 2014-05-07 18:24:48 +02:00
Florent
fa845abb69 Documentation of the -d option 2014-05-07 10:21:17 +02:00
Florent
a87ef4072d Use a fast path for ls if -U is set
The ls command first store all objects and collections, and then run the
formatting. It is bad for applications displaying results as soon as
possible, but mandatory to store results and display the collections
first.

Since the -U option was introduced to not sort the results, we can
expand this idea to not display the collections first, and to display
results immediately.
2014-05-07 10:15:07 +02:00
Florent
b6e44e8d22 Remove the "is CapBaseObject" condition
A module has to always return a CapBaseObject, this condition is not
usefull
2014-05-07 09:35:05 +02:00
Laurent Bachelier
132d131f87 Add a json formatter that works on a line level 2014-05-07 00:02:08 +02:00
Bezleputh
a02d34827d [newsfeed] Boobmsg crashes if id is None 2014-05-06 22:32:41 +02:00
Bezleputh
fadd88dafc [browser2] Add a Dict filter 2014-05-06 22:32:41 +02:00
Florent
2915a04eba Do not display warning message if -n or count is set
Someone using the count option is already aware of the limitations. The
warning is useless.
2014-05-06 17:05:06 +02:00
Romain Bignon
144e98bbaf display html2text missing warning only at first call 2014-05-06 15:35:33 +02:00
Romain Bignon
ab710e0f74 support GET forms 2014-04-29 22:00:49 +02:00
Romain Bignon
61bc712068 Revert "Detect duplicate objects with id "0""
This reverts commit 6cae2cd0a5.
2014-04-26 12:07:22 +02:00
Florent
6cae2cd0a5 Detect duplicate objects with id "0" 2014-04-24 16:18:19 +02:00
Florent
fe5bfee255 Add ignore_duplicate option for crazy modules 2014-04-24 16:16:50 +02:00
Bezleputh
cdf2996d57 [browther2] Display error message instead of raising DataError when we find the same ids in ListElement 2014-04-23 12:37:36 +02:00
Vincent Texier
7a72b94b37 Fix bug dailymotion not playing video with "Server returned 403: Forbidden"
Dailymotion video url send cookies then use a 302 redirect to the real video url
The real video url check the cookies sent in the request.

Some mediaplayer (mplayer) can not handle this.

So we use pure python urllib2 to handle this and load the video.
The video bytes are piped to the mediaplayer.

Others modules might need this.
They just have to set the "_play_proxy" boolean attribute to the video object.

Signed-off-by: Vincent Texier <vit@free.fr>
2014-04-21 09:33:31 +02:00
Florent
ffe1c43300 Fix a03f2b627e "selecting a field in non-interactive mode"
Writing code without coffee introduces a lot of bugs.
2014-04-18 10:44:23 +02:00
Florent
a03f2b627e Fix selecting a field in non-interactive mode
The command:
boobank ing history blabla@ing -f table -s label,amount,date
was bugued, since b770163d9b.

Before to iter the history, boobank uses the get_object method, with fields set to []. The goal is to not use the selected_fields configured by the user.

But the commit b770163d9b added:
"or self.selected_fields"
Since "if []" return false, it cannot works.
2014-04-18 10:24:47 +02:00
Romain bignon
b268fc043b Use regexp to validate urls 2014-04-18 09:55:31 +02:00