ClosedPort22
455e34113e
Improve compatibility of DownloadArchive ( #3078 )
...
Other programs can add additional columns to the table without affecting
gallery-dl
2 years ago
Mike Fährmann
a6e2d96dde
fix bug when processing input file comments ( #2808 )
...
and move 'parse_inputfile()' to util.py
2 years ago
Mike Fährmann
dd3a6a9fd1
make 'enumerate_reversed()' work with generators ( #2795 )
2 years ago
Mike Fährmann
a96f9d29b5
create missing directories for archive files ( #2597 )
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
4c8e28db82
avoid circular import in util.py
2 years ago
Mike Fährmann
61afa973b7
use extended format strings for archive keys
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
29db716a63
implement 'datetime_to_timestamp()'
...
and rename 'to_timestamp()'
to the more descriptive 'datetime_to_timestamp_string()'
3 years ago
Mike Fährmann
9bd27b1b8d
[postprocessor:metadata] implement archive options ( #2421 )
...
'archive', 'archive-format', and 'archive-prefix'
3 years ago
Mike Fährmann
8295bc6d97
fix loading/storing cookies without domain
3 years ago
Mike Fährmann
47cf05c4ab
refactor proxy handling code ( #2357 )
...
- allow gallery-dl proxy settings to overwrite environment proxies
- allow specifying different proxies for data extraction and download
- add 'downloader.proxy' option
- '-o extractor.proxy=–PROXY_URL -o downloader.proxy=null'
now has the same effect as youtube-dl's '--geo-verification-proxy'
3 years ago
Mike Fährmann
00fbc942e5
add 'timedelta' class to the global namespace in filter expressions
...
(https://github.com/mikf/gallery-dl/issues/2308#issuecomment-1046135924 )
3 years ago
Mike Fährmann
7958995398
[postprocessor:metadata] implement 'mtime' option ( #2307 )
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
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
e69ee41f25
implement 'page-reverse' option ( #1854 )
3 years ago
Mike Fährmann
c9e6693530
allow specifying a minimum/maximum for 'sleep-*' options ( #1835 )
...
for example '"sleep-request": [5.0, 10.0]' to wait between 5 and 10
seconds between each HTTP request
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
d3eab417ed
implement a 'path-strip' option
3 years ago
Mike Fährmann
2792ed6e4b
implement 'util.format_value()'
3 years ago
Mike Fährmann
13d4045a8a
add 'archive-prefix' option ( #1711 )
3 years ago
Mike Fährmann
9e42cd58ea
replace ChainPredicate class with 'functools.partial'
3 years ago
Mike Fährmann
1b2f9050fb
rename all instances of 'kwds' to 'kwdict'
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
befe635022
cache parsed Formatter functions
3 years ago
Mike Fährmann
79b7ee2712
use 'functools.partial' in '_build_cleanfunc' when possible
...
makes calls to the returned function a slight bit faster (~10%)
3 years ago
Mike Fährmann
ceaf7fd989
optimize 'base-directory' initialization and usage
...
apply 'clean_path()' only once
3 years ago
Mike Fährmann
2ca011dfa8
add 'kwdict' argument to PathFormat.build_filename()
3 years ago
Mike Fährmann
fd00d47116
implement conditional directories ( #1394 )
...
They work the same way as conditional filenames (84d2e640
), e.g.
"directory": {
"score >= 20": ["high score"],
"score >= 5" : ["mid score"],
"" : ["{category}", "default"]
}
3 years ago
Mike Fährmann
def0148582
restructure code in PathFormat constructor
3 years ago
Mike Fährmann
84d2e64024
combine conditional filenames into `filename` option ( #1394 )
3 years ago
Mike Fährmann
4cf40434d7
initial support for conditional filenames ( #1394 )
3 years ago
Mike Fährmann
0abad8bc12
implement 'compile_expression()'
3 years ago
Mike Fährmann
8fd8126117
fix ISO 639-1 code for Japanese
...
"jp" -> "ja"
3 years ago
Mike Fährmann
c5ca7905ce
add 'noop()' and 'identity()' functions
3 years ago
Mike Fährmann
bff71cde80
implement 'util.unique_squence()'
4 years ago
Mike Fährmann
92071d02f4
fix crash when 'base-directory' is an empty string ( #1339 )
4 years ago
Mike Fährmann
970fc2b2b5
allow setting 'filename' & '(base-)directory' to default
...
by setting them to 'None'/'null'
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
79501a356f
fix crash when 'path-restrict' is an object/dict
...
This basically reverts commit 5818c928
(#1234 )
4 years ago
Mike Fährmann
5d4494b15f
add "ascii" as a special 'path-restrict' value
4 years ago
Mike Fährmann
5818c928c4
refactor 'path-restrict' parsing
4 years ago