Commit Graph

23 Commits

Author SHA1 Message Date
Mike Fährmann
9dbe33b6de replace old %-formatted and .format(…) strings with f-strings (#7671)
mostly using flynt
https://github.com/ikamensh/flynt
2025-06-29 17:50:19 +02:00
Mike Fährmann
b0580aba86 update 'match.lastindex' usage 2025-06-18 20:24:13 +02:00
Mike Fährmann
41191bb60a 'match.group(N)' -> 'match[N]' (#7671)
2.5x faster
2025-06-18 13:05:58 +02:00
Mike Fährmann
e08ec7e083 update copyright notices 2025-06-13 00:03:41 +02:00
Mike Fährmann
811b665e33 remove @staticmethod decorators
There might have been a time when calling a static method was faster
than a regular method, but that is no longer the case. According to
micro-benchmarks, it is 70% slower in CPython 3.13 and it also makes
executing the code of a class definition slower.
2025-06-12 22:50:52 +02:00
Mike Fährmann
b5c88b3d3e replace standard library 're' uses with 'util.re()' 2025-06-06 13:24:52 +02:00
Mike Fährmann
d6311bbf75 [moebooru:pool] replace underscores in pool names (#4646)
https://github.com/mikf/gallery-dl/issues/4646#issuecomment-2815698517
2025-04-18 18:33:23 +02:00
Mike Fährmann
2974b8e3c8 [moebooru] add 'metadata' option (#4646)
for extended 'pool' metadata
2023-10-12 21:34:25 +02:00
Mike Fährmann
a453335a9f remove test results in extractor modules
and add generic example URLs
2023-09-11 16:30:55 +02:00
Mike Fährmann
e8299b459a [moebooru] match search URLs with empty 'tags' (#4354) 2023-07-26 18:02:26 +02:00
Mike Fährmann
b0cb4a1b9c replace 'text.extract()' with 'text.extr()' where possible 2022-11-05 01:14:09 +01:00
Mike Fährmann
4fd3c893fa [booru] adjust/match '_tags' and '_notes' code 2022-11-04 19:49:39 +01:00
Mike Fährmann
775895f44b [booru] refactor 'tags' and 'notes' extraction
- move HTML request for post pages into its own function
- move gelbooru_v02.py notes extraction to gelbooru.py
  since it only works there
- clean up some code
2022-10-31 12:01:19 +01:00
enduser420
fb2dbb04e2 [moebooru] extract 'notes' (#3094) 2022-10-28 18:05:54 +02:00
Mike Fährmann
ff5e10a86d [hypnohub] move to gelbooru_v02 instances (#2631) 2022-05-28 21:10:05 +02:00
Mike Fährmann
d26da3b9e5 add pre-generated 'pattern' for supported BaseExtractor sites 2022-05-09 22:20:09 +02:00
Mike Fährmann
a6a51f207d [moebooru] fix 'tags' ending with a '+' when logged in (#1702) 2021-07-16 15:42:03 +02:00
Mike Fährmann
2de8ebc098 [moebooru] use BaseExtractor 2021-01-27 01:33:40 +01:00
Mike Fährmann
e41e2be2f9 [booru] split '_prepare_post()' 2020-12-24 01:13:54 +01:00
Mike Fährmann
78061658ea [booru] reduce exceptions caught during _prepare_post()
don't catch HttpErrors etc.
2020-12-21 02:05:59 +01:00
Mike Fährmann
8d2e4e5f13 [booru] improve error handling
e.g. for posts without a valid 'file_url' (#1176)
2020-12-17 01:16:45 +01:00
Mike Fährmann
7f3d811d7b [moebooru] inherit from BooruExtractor 2020-12-08 18:34:56 +01:00
Mike Fährmann
cc15fbe71a [moebooru] add generalized extractors for moebooru sites
- add support for sakugabooru.com (closes #1136)
- add support for lolibooru.moe   (closes #1050)

This allows users to dynamically add support for moebooru/myimouto
based sites by adding an entry to their config file
(like for foolslide, foolfuuka, etc)

For example:
{
    "extractor": {
        "moebooru": {
            "new-site-1": {"root": "https://site1.net"},
            "new-site-2": {"root": "https://www.site2.moe"}
        }
    }
}
2020-12-01 22:27:18 +01:00