1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00
gallery-dl/gallery_dl
Vrihub 96fcff182c
generic extractor (#735)
* Generic extractor, see issue #683

* Fix failed test_names test, no subcategory needed

* Prefix directory_fmt with "generic"

* Relax regex (would break some urls)

* Flake8 compliance

* pattern: don't require a scheme

This fixes a bug when we force the generic extractor on urls without a
scheme (that are allowed by all other extractors).

* Fix using g: and r: on urls without http(s) scheme

Almost all extractors accept urls without an initial http(s) scheme.

Many extractors also allow for generic subdomains in their "pattern"
variable; some of them implement this with the regex character class
"[^.]+" (everything but a dot).

This leads to a problem when the extractor is given a url starting
with g: or r: (to force using the generic or recursive extractor)
and without the http(s) scheme: e.g. with "r:foobar.tumblr.com"
the "r:" is wrongly considered part of the subdomain.

This commit fixes the bug, replacing the too generic "[^.]+" with the
more specific "[\w-]+" (letters, digits and "-", the only characters
allowed in domain names), which is already used by some extractors.

* Relax imageurl_pattern_ext: allow relative urls

* First round of small suggested changes

* Support image urls starting with "//"

* self.baseurl: remove trailing slash

* Relax regexp (didn't catch some image urls)

* Some fixes and cleanup

* Fix domain pattern; option to enable extractor

Fixed the domain section for "pattern", to pass "test_add" and
"test_add_module" tests.
Added the "enabled" configuration option (default False) to enable the
generic extractor. Using "g(eneric):URL" forces using the extractor.
2021-12-29 22:39:29 +01:00
..
downloader use yt-dlp by default (#1850, #2028) 2021-11-29 18:24:26 +01:00
extractor generic extractor (#735) 2021-12-29 22:39:29 +01:00
postprocessor [postprocessor:compare] add 'equal' option (#1592) 2021-10-05 03:03:37 +02:00
__init__.py add -d/--directory and -f/--filename command-line arguments 2021-12-27 23:31:54 +01:00
__main__.py
cache.py run tests without using 'nose' 2021-10-13 04:07:41 +02:00
config.py support XDG_CONFIG_HOME (closes #1545) 2021-05-16 02:48:16 +02:00
exception.py add '"skip": "terminate"' option 2021-05-12 02:22:28 +02:00
formatter.py [formatter] implement 'D' format specifier 2021-11-20 23:04:34 +01:00
job.py extend blacklist/whitelist syntax (#2025) 2021-11-23 20:31:43 +01:00
oauth.py write OAuth token to cache by default (#616) 2020-05-25 22:35:45 +02:00
option.py add -d/--directory and -f/--filename command-line arguments 2021-12-27 23:31:54 +01:00
output.py [output] write directly to sys.stdout 2021-11-29 04:41:29 +01:00
path.py handle UNC paths (#2113) 2021-12-19 04:52:00 +01:00
text.py consider apparently long extensions as part of the filename 2021-05-02 21:15:50 +02:00
util.py allow specifying sleep-* options as string 2021-12-18 23:28:56 +01:00
version.py [output] write download progress indicator to stderr 2021-11-29 04:41:17 +01:00
ytdl.py [ytdl] update to latest yt-dlp changes (fixes #2124) 2021-12-24 01:50:47 +01:00