Mike Fährmann
b1bea8aaeb
add 'restrict-filenames' option ( #348 )
5 years ago
Mike Fährmann
b171befa87
implement 'parse_unicode_escapes()'
5 years ago
Mike Fährmann
2b1999476e
implement 'text.rextract()'
5 years ago
Mike Fährmann
2316e0ed3d
fix strptime workaround from b0e85a4
...
Don't return a modified version of 'date_time' if strptime fails.
5 years ago
Mike Fährmann
b0e85a42e3
apply workaround from 4736912
in parse_datetime() itself
5 years ago
Mike Fährmann
4736912d4e
[pixiv] work around strptime limitations in Python < 3.7
...
"%z" doesn't allow a colon separator in older Python versions:
- "+0900" is OK
- "+09:00" raises an exception
5 years ago
Mike Fährmann
d09864b581
implement text.parse_datetime()
5 years ago
Mike Fährmann
6264a46212
use 'utcfromtimestamp()'
...
'fromtimestamp()' converts its results to the local timezone and causes
problems when running tests on a different machine.
5 years ago
Mike Fährmann
d670de0344
implement 'text.parse_timestamp()'
5 years ago
Mike Fährmann
21a7e395a7
implement convenience wrapper for text.extract functionality
6 years ago
Mike Fährmann
5530871b5a
change results of text.nameext_from_url()
...
Instead of getting a complete 'filename' from an URL and splitting that
into 'name' and 'extension', the new approach gets rid of the complete
version and renames 'name' to 'filename'. (Using anything other than
{extension} for a filename extension doesn't really work anyway)
Example: "https://example.org/path/filename.ext "
before:
- filename : filename.ext
- name : filename
- extension: ext
now:
- filename : filename
- extension: ext
6 years ago
Mike Fährmann
e1d3e9a926
add 'ext_from_url' to text.py
6 years ago
Mike Fährmann
2d2953a5bf
add 'text.parse_float()' + cleanup in text.py
6 years ago
Mike Fährmann
ae9a37a528
implement text.split_html()
6 years ago
Mike Fährmann
cc36f88586
rename safe_int to parse_int; move parse_* to text module
7 years ago
Mike Fährmann
4ffa94f634
remove 'shorten_path()' and 'shorten_filename()'
7 years ago
Mike Fährmann
27eab4e467
rewrite text tests and improve functions
...
- test more edge cases
- consistently return an empty string for invalid arguments
- remove the ungreedy-flag in 'remove_html()'
7 years ago
Mike Fährmann
e3f2bd4087
add tests for 'text.clean_xml()' and improve it
7 years ago
Mike Fährmann
6d8b191ea7
improve 'parse_query()' and add tests
...
- another irrelevant micro-optimization !
- use urllib.parse.parse_qsl directly instead of parse_qs, which
just packs the results of parse_qsl in a different data structure
- reduced memory requirements since no additional dict and lists are
created
7 years ago
Mike Fährmann
4f123b8513
code adjustments according to pep8
8 years ago
Mike Fährmann
eeae580781
more tests
9 years ago
Mike Fährmann
ca523b9f64
add helper method to text module
9 years ago
Mike Fährmann
cba4b91b14
add tests
9 years ago
Mike Fährmann
2962bf36f6
add tests for text-module
9 years ago