Mike Fährmann
dd3a6a9fd1
make 'enumerate_reversed()' work with generators ( #2795 )
2 years ago
Mike Fährmann
0c73914848
[postprocessor:metadata] implement 'mode: modify' ( #2640 )
2 years ago
Mike Fährmann
f3de6b7a87
[postprocessor:metadata] implement 'mode: delete' ( #2640 )
2 years ago
Mike Fährmann
9704c04172
[postprocessor:zip] ensure target directory exists ( #2758 )
2 years ago
Mike Fährmann
74865adae5
implement 'format-separator' option ( #2737 )
...
a global option, that servers as a workaround for shortcomings due to
lack of a proper format string parser
2 years ago
bradenhilton
117eeefda0
[postprocessor:mtime] add 'value' option ( #2739 )
2 years ago
Mike Fährmann
90ae48c40c
[formatter] implement 'O' format specifier ( #2736 )
...
to apply a UTC offset to 'date' values and other datetime objects
2 years ago
Mike Fährmann
04bed1eba3
[formatter] allow for custom "format" functions ( #2721 )
2 years ago
Mike Fährmann
54525d2e21
[formatter] implement slice operator as format specifier
...
this allows using a slice operator alongside other (special) format
specifiers like J, to first join list elements to a string and then
trimming that with a slice.
{tags:J, /[:50]}
2 years ago
Mike Fährmann
241e82e18d
[horne] add support for horne.red ( #2700 )
2 years ago
Mike Fährmann
42525cfe8d
fix '{…!j}' for otherwise non-serializable types (##2624)
...
like 'datetime'
2 years ago
Mike Fährmann
5b43faffed
[postprocessor:metadata] write to stdout by setting filename to "-"
...
(#2624 )
2 years ago
Mike Fährmann
6ad39f2b68
add ytdl tests
...
they only run when youtube-dl or yt-dlp are installed,
i.e. if __import__("<ytdl-package>") succeeds
2 years ago
Mike Fährmann
688d6553b4
replace calls to print() with stdout_write() ( #2529 )
2 years ago
Mike Fährmann
f3408a9d92
implement string literals in replacement fields
...
- either {_lit[foo]} or {'foo'}
- useful as alternative for empty metadata fields: {title|'no title'}
- due to using '_string.formatter_field_name_split()' to parse format
strings, using certain characters will result in an error: [].:!
2 years ago
Mike Fährmann
c4b9f7bab8
update functions working with cookies.txt files
...
- rename
- load_cookiestxt -> cookiestxt_load
- save_cookiestxt -< cookiestxt_store
- in cookiestxt_load, add cookies directly to a cookie jar
instead of storing them in a list first
- other unnoticeable performance increases
2 years ago
Mike Fährmann
ca3a364db7
fix build_duration_func() ( #2533 )
...
for extractors with request_interval_min > 0
2 years ago
Mike Fährmann
7fe54bab2a
attempt to fix some issues with 'contains()' ( #2446 )
...
add a third argument that gets used
when the values o search are given as a string
2 years ago
Mike Fährmann
d78a2c7163
re.escape() arguments for 'contains()' ( #2446 )
2 years ago
Mike Fährmann
413b77757b
implement 'contains()' ( #2446 )
...
and add it to globals() in compiled expressions for --filter etc
3 years ago
Mike Fährmann
e7b30866d0
[postprocessor:mtime] fix timestamps from datetime objects ( #2307 )
...
'datetime.timestamp()', which got used to convert datetime objects to
POSIX timestamps, assumes naive datetimes represent LOCAL time, while
datetimes in 'date' metadata fields represent UTC time.
Ref: https://docs.python.org/3/library/datetime.html#datetime.datetime.timestamp
> Naive datetime instances are assumed to represent local time
> you can obtain the POSIX timestamp by … calculating the timestamp directly
3 years ago
Mike Fährmann
29db716a63
implement 'datetime_to_timestamp()'
...
and rename 'to_timestamp()'
to the more descriptive 'datetime_to_timestamp_string()'
3 years ago
Mike Fährmann
8295bc6d97
fix loading/storing cookies without domain
3 years ago
Mike Fährmann
500a479026
fix a third(!) bug in _check_cookies() ( #2372 )
...
turns out tests are worthless if you get em wrong ...
3 years ago
Mike Fährmann
cf44aba333
[formatter] allow evaluating f-string literals
...
by starting a format string with '\fF'.
This was technically already possible with '\fE',
but this makes it a bit more convenient.
3 years ago
Mike Fährmann
94452761ed
fix cookies tests
3 years ago
Mike Fährmann
bddcec49f1
implement 'text.root_from_url()'
...
use domain from input URL for kemono
3 years ago
Mike Fährmann
f5b2b9333f
fix another bug in _check:cookies ( #2160 )
...
regression introduced in ed317bfc
Added a couple of tests to hopefully catch such bugs
before they land in a release.
3 years ago
Mike Fährmann
563bd0ecf4
[danbooru] inherit from BaseExtractor
...
- merge danbooru and e621 code
- support booru.allthefallen.moe (closes #2283 )
- remove support for old e621 tag search URLs
3 years ago
Mike Fährmann
b5b4f5a168
use 'build_extractor_filter' in test_results.py
3 years ago
Mike Fährmann
64cf26eaf4
allow specifying sleep-* options as string
...
either as single value or as range: "3.5", "2.1 - 5.0"
3 years ago
Mike Fährmann
010d65dcec
extend blacklist/whitelist syntax ( #2025 )
...
Each entry in such a list can now also include a subcategory
'<category>:<subcategory>'
and it is possible to use '*' or an empty string as placeholder
'*:<subcategory>', ':<subcategory>', '<category>:*'
For example
"blacklist": "imgur,*:tag,gfycat:user" or
"blacklist": ["imgur", "*:tag", "gfycat:user"]
will filter all 'imgur' extractors, all extractors with a 'tag'
subcategory (e.g. https://danbooru.donmai.us/posts?tags=bonocho ),
and all 'gfycat' user extractors.
3 years ago
Mike Fährmann
af6424f398
allow testing metadata in list elements
3 years ago
Mike Fährmann
3842cdcd8f
[formatter] implement 'D' format specifier
...
To be able to parse any string into a 'datetime' object
and format it as necessary.
Example:
{created_at:D%Y-%m-%dT%H:%M:%S%z}
->
"2010-01-01 00:00:00"
{created_at:D%Y-%m-%dT%H:%M:%S%z/%b %d %Y %I:%M %p}
->
"Jan 01 2010 12:00 AM"
with 'created_at' == "2010-01-01T01:00:00+0100"
3 years ago
Mike Fährmann
2ab190ce08
add tests for special format strings
3 years ago
Mike Fährmann
46e17c5e61
support accessing the current local datetime in format strings
...
{_now}, {_now:%Y-%m-%d}, etc
(#1968 )
3 years ago
Mike Fährmann
38193dba46
support accessing environment variables in format strings ( #1968 )
...
{_env[HOME]} to get the value of $HOME
every other format string feature is supported as well
3 years ago
Mike Fährmann
f2d6b3e6b4
run tests without using 'nose'
...
run_tests.sh -> run_tests.py
3 years ago
Mike Fährmann
12fc646c53
fix filename formatting tests
3 years ago
Mike Fährmann
e0bdacd932
[fappic] add 'image' extractor ( closes #1898 )
3 years ago
Mike Fährmann
c22ff97743
remove 'unit' argument from 'util.format_value()'
3 years ago
Mike Fährmann
cad85640de
move 'util.PathFormat' into its own 'path' module
...
to prevent circular imports between 'formatter' and 'util'
3 years ago
Mike Fährmann
74145467dd
move 'util.Formatter' into its own 'formatter' module
3 years ago
Mike Fährmann
9377543162
[mastodon] add 'following' extractor ( #1891 )
3 years ago
Mike Fährmann
bd845303ad
implement a way to shorten filenames with east-asian characters
...
(#1377 )
Setting 'output.shorten' to "eaw" (East-Asian Width) uses a slower
algorithm that also considers characters with a width > 1.
3 years ago
Mike Fährmann
292fffc83c
add 'j' format string conversion
...
to convert to a JSON formatted string
3 years ago
Mike Fährmann
bb6a130942
automatically set required DDoS-GUARD cookies ( #1779 )
...
for kemono.party and seiso.party
3 years ago
Mike Fährmann
2792ed6e4b
implement 'util.format_value()'
3 years ago
Mike Fährmann
9e42cd58ea
replace ChainPredicate class with 'functools.partial'
3 years ago
Mike Fährmann
36ac2197db
[ytdl] add extractor for sites supported by youtube-dl
...
(#1680 , #878 )
Can be used by prefixing any URL with 'ytdl:',
or by setting 'extractor,ytdl.enabled' to 'true'.
3 years ago
Mike Fährmann
64240c8d42
[imagevenue] fix extraction
...
(closes #1677 )
3 years ago
Mike Fährmann
0179581340
add 'T' format string conversion ( #1646 )
...
to convert 'date'/datetime to timestamp
3 years ago
Mike Fährmann
f74cf52e2b
[seisoparty] add 'user' and 'post' extractors ( #1635 )
3 years ago
Mike Fährmann
759735fb02
[kemonoparty] fix 'username' extraction ( fixes #1652 )
...
The site's <title> content changed from
<title>NAME | Kemono</title>
to
<title>
NAME | Kemono
</title>
3 years ago
Mike Fährmann
07c8adbd8b
[mangadex] implement login with username & password ( #1535 )
3 years ago
Mike Fährmann
4a747a31a3
[postprocessor:metadata] handle dicts in mode;tags ( fixes #1598 )
3 years ago
Mike Fährmann
3cbbefd4ed
support 'filter' option for post processors ( #1460 )
3 years ago
Mike Fährmann
0abad8bc12
implement 'compile_expression()'
3 years ago
Mike Fährmann
da6806a161
fix job tests for Python 3.4 and 3.5
...
assert_called() and assert_not_called() got added in Python 3.6
3 years ago
Mike Fährmann
8fd8126117
fix ISO 639-1 code for Japanese
...
"jp" -> "ja"
3 years ago
Mike Fährmann
af9dba4684
add DataJob tests
3 years ago
Mike Fährmann
adf4d661b3
use '_extractor' info in UrlJobs
3 years ago
Mike Fährmann
1eabfa5c7a
[pillowfort] implement login with username & password ( #846 )
3 years ago
Mike Fährmann
559462789d
add some tests for job.py
3 years ago
Mike Fährmann
c5ca7905ce
add 'noop()' and 'identity()' functions
3 years ago
Mike Fährmann
bc868e7bb8
consider apparently long extensions as part of the filename
...
(#1516 )
3 years ago
Mike Fährmann
bdfcc9c4b1
update extractor test results
3 years ago
Mike Fährmann
387fe415d5
unescape items in text.split_html()
4 years ago
Mike Fährmann
78fd63b8f0
remove 'text.clean_xml()'
...
was not used anywhere
4 years ago
Mike Fährmann
8553b218d9
replace calls to 'os.path.splitext()' with 'str.rpartition()'
...
Makes functions who used it more than twice as fast
and we can get rid of an import as well.
4 years ago
Mike Fährmann
bff71cde80
implement 'util.unique_squence()'
4 years ago
Mike Fährmann
5f1a6ff6fa
remove unneeded 'TRAVIS_SKIP' from test_results.py
4 years ago
Mike Fährmann
8821dceb79
use __import__() to dynamically load modules
4 years ago
Mike Fährmann
36bf76fa44
update 'oauth:mastodon:<instance>' code
4 years ago
Mike Fährmann
91308140ec
make 'generate_token()' compatible with Python 3.4
4 years ago
Mike Fährmann
780b6adb91
rename 'generate_csrf_token()' to just 'generate_token()'
...
and add a 'size' argument
4 years ago
Mike Fährmann
0fdaea00a3
[postprocessor:metadata] sanitize filenames
4 years ago
Mike Fährmann
aac00a2024
add 'd' conversion for format strings
...
to convert a timestamp to a formattable 'datetime' object.
For example '{created_at!d:%Y-%m-%d}'
transforms the timestamp in 'created_at' into a 'datetime' object
and then formats its content using '%Y-%m-%d' as template.
1262304000 -> datetime(2010, 1, 1) -> "2010-01-01"
4 years ago
Mike Fährmann
912eea29bc
update extractor test results
4 years ago
Mike Fährmann
1f9121fecb
release version 1.16.0
4 years ago
Mike Fährmann
b2c55f0a72
[sankaku] remove login support
...
The old login method for 'https://chan.sankakucomplex.com/user/login '
and the cookies it produces have no effect on the results from
'beta.sankakucomplex.com'.
4 years ago
Mike Fährmann
547107307e
fix 'Metadata' messages in result tests
4 years ago
Mike Fährmann
578dcf805c
[mangapanda] don't force https://
4 years ago
Mike Fährmann
ca59bd691c
[postprocessor:metadata] add 'event' and 'filename' options
4 years ago
Mike Fährmann
9fffa9c343
rework post processor callbacks
4 years ago
Mike Fährmann
1e3dd7330e
merge SharedConfigMixin functionality into Extractor
4 years ago
Mike Fährmann
e5438b8a29
release version 1.15.3
4 years ago
Mike Fährmann
b9bfa4c675
update extractor test results
4 years ago
Mike Fährmann
c3f01dc4e6
implement 'util.unique()'
4 years ago
Mike Fährmann
d83b95fd28
[postprocessor:metadata] accept a string-list for 'content-format'
...
(closes #1080 )
4 years ago
Mike Fährmann
350b1afe1c
speed up _list_classes() after iterating over all modules once
4 years ago
Mike Fährmann
18213dc5ba
release version 1.15.2
4 years ago
Mike Fährmann
ec61696316
add 't' format string conversion ( closes #1065 )
...
to Trim whitespace from the beginning and end of strings.
Example: '{field!t}' becomes 'foo' for 'field' == " \nfoo\t\r"
4 years ago
Mike Fährmann
07432d6262
[seiga] fix flake8 and cookie test ( #1063 )
4 years ago
Mike Fährmann
b8daabc3ca
[pinterest] implement login support ( closes #1055 )
...
being logged allows access to secret/protected boards
4 years ago
kurumigi
7e0e872f4f
[seiga] Add metadata for single image downloads ( #1063 )
...
* [seiga] Support image metadata.
* [seiga] Update test data.
* [seiga] Fix cookie check.
* [test_cookies] [seiga] Fit test_cookies.py to the last commit.
4 years ago
Mike Fährmann
844793847c
update extractor test results
4 years ago
Mike Fährmann
c874071f5a
[kissmanga] remove module
4 years ago
Mike Fährmann
844502cad5
update extractor test results
4 years ago
Mike Fährmann
7cd383c0f9
update extractor test results
4 years ago