Commit Graph

154 Commits

Author SHA1 Message Date
Mike Fährmann
a097a373a9 simplify if statements by using walrus operators (#7671) 2025-07-22 20:57:54 +02:00
Mike Fährmann
d8ef1d693f rename 'StopExtraction' to 'AbortExtraction'
for cases where StopExtraction was used to report errors
2025-07-09 21:07:28 +02:00
Mike Fährmann
f2a72d8d1e replace 'request(…).json()' with 'request_json(…)' 2025-06-29 17:50:19 +02:00
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
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
17d39c06e3 [exhentai] implement '"source": "metadata"' (#4902) 2025-06-08 12:57:23 +02:00
Mike Fährmann
967af5eede [exhentai] add 'limits-action' option (#6504)
https://github.com/mikf/gallery-dl/issues/6504#issuecomment-2949551532
2025-06-08 12:56:56 +02:00
Mike Fährmann
3b75b195c1 [exhentai] detect HTML downloads (#4798) 2025-06-07 22:06:53 +02:00
Mike Fährmann
27c48ad317 [exhentai] ensure file signature bytes aren't all zero (#4902) 2025-06-07 20:34:05 +02:00
Mike Fährmann
0d1469f229 [exhentai] implement 'tags' option (#2117)
allow splitting tags into categories,
e.g. 'tags_parody', 'tags_group', etc.
2024-11-15 21:47:13 +01:00
Mike Fährmann
36883e458e use 'v[0] == "c"' instead of 'v.startswith("c")' 2024-10-15 08:24:06 +02:00
Mike Fährmann
8eaae29bf9 [exhentai] fix 'limits' (#6090) 2024-08-31 10:23:07 +02:00
Mike Fährmann
668219b36e [exhentai] improve error message when temporarily banned (#5845) 2024-07-12 22:51:46 +02:00
Mike Fährmann
3b6f306a8b [exhentai] fix blank page detection 2024-05-11 22:01:34 +02:00
Mike Fährmann
f178839fc2 [exhentai] fix multi-page viewer detection (#4969) 2024-05-11 18:32:52 +02:00
Mike Fährmann
ddffeeaa7b [exhentai] detect CAPTCHAs during login (#5492) 2024-04-20 00:19:22 +02:00
Mike Fährmann
57fc6fcf83 replace '24*3600' with '86400'
and generalize cache maxage values
2023-12-18 23:57:22 +01:00
Mike Fährmann
1f9b16a70b replace static 'sleep-request' defaults with dynamic ones 2023-12-18 22:06:26 +01:00
Mike Fährmann
b127321b5c [exhentai] only show 'using e-hentai.org' warning for exh domains 2023-12-18 15:29:54 +01:00
Mike Fährmann
e097aaf64a [exhentai] output continuation URL when interrupted (#4782) 2023-12-17 23:25:47 +01:00
Mike Fährmann
2d5cda2b92 [exhentai] fix TypeError for infinite 'fallback-retries' (#4911) 2023-12-11 23:39:56 +01:00
Mike Fährmann
9a8dc6b02b [exhentai] add 'fallback-retries' option (#4792) 2023-12-09 02:01:59 +01:00
Mike Fährmann
da0da0faaa [exhentai] store more cookies when logging in (#4881)
include 'igneous', 'hath_perks', etc
and not just 'ipb_member_id' and 'ipb_pass_hash' like before
2023-12-04 23:24:11 +01:00
Mike Fährmann
b43be67206 [exhentai] add 'gp' option (#4576) 2023-11-22 20:15:00 +01:00
Mike Fährmann
e97d7b1c85 [exhentai] fix empty api_url with '"source": "hitomi"' (#4829) 2023-11-18 21:06:41 +01:00
Mike Fährmann
0435c6e603 [exhentai] handle 'Downloading … requires GP' errors (#4576, #4763) 2023-11-12 22:47:40 +01:00
Mike Fährmann
61d6558322 [exhentai] try to avoid 'DH_KEY_TOO_SMALL' errors (#1021, #4593) 2023-11-04 17:30:27 +01:00
Mike Fährmann
69b931b9bb [exhentai] provide fallback URLs (#1021, #4745) 2023-11-04 17:06:46 +01:00
Mike Fährmann
43d0c49d7e [exhentai] fix original image URLs (#4754) 2023-11-02 15:46:01 +01:00
Mike Fährmann
68e72a836c [exhentai] fix extraction (#4730)
- update to new API response layout
- use proper API server URL
- fix 'filesize' metadata
2023-10-30 13:38:49 +01:00
Mike Fährmann
3ecb512722 send Referer headers by default 2023-09-19 00:02:04 +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
5ed245317d [exhentai] add 'fav' option (#4409)
The name 'favorite' is already taken as extractor subcategory
2023-08-23 23:58:11 +02:00
Mike Fährmann
fd6b413f3c [exhentai] fix 'domain' option (#4458)
regression from a383eca7
2023-08-23 23:58:04 +02:00
Mike Fährmann
a383eca7f6 decouple extractor initialization
Introduce an 'initialize()' function that does the actual init
(session, cookies, config options) and can called separately from
the constructor __init__().

This allows, for example, to adjust config access inside a Job
before most of it already happened when calling 'extractor.find()'.
2023-07-25 22:16:16 +02:00
Mike Fährmann
d97b8c2fba consistent cookie-related names
- rename every cookie variable or method to 'cookies_*'
- simplify '.session.cookies' to just '.cookies'
- more consistent 'login()' structure
2023-07-22 01:20:50 +02:00
Mike Fährmann
7499fa7075 [exhentai] remove and update sad panda check
there hasn't been a sad panda in several years
2023-05-03 17:39:49 +02:00
Mike Fährmann
cd931e1139 update extractor test results 2022-12-08 18:58:29 +01:00
Mike Fährmann
202c1210d5 [exhentai] fix pagination 2022-12-06 22:39:13 +01:00
Mike Fährmann
20fbba9d7c [exhentai] add metadata to search results (#3181)
'gallery_id' and 'gallery_token'
2022-11-09 11:40:27 +01:00
Mike Fährmann
6a0c5e34f4 [exhentai] fix pagination (#3181) 2022-11-09 11:15:34 +01:00
Mike Fährmann
b0cb4a1b9c replace 'text.extract()' with 'text.extr()' where possible 2022-11-05 01:14:09 +01:00
Mike Fährmann
94b34f460e [exhentai] add slash to the end of gallery URLs (#2947) 2022-09-21 17:54:20 +02:00
Mike Fährmann
464ea90d14 [exhentai] guess extension for original files (#2842)
makes it possible to sometimes, when guessed correctly ('.jpg'),
skip an original file download without costing image limit points
2022-09-14 16:06:27 +02:00
Mike Fährmann
551fdf7ad7 [exhentai] move 509 check into its own function 2022-09-13 18:27:14 +02:00
Mike Fährmann
8b76149521 [exhentai] improve 509.gif detection (#2901) 2022-09-09 18:09:52 +02:00
Mike Fährmann
c6a9bab019 update extractor test results 2022-07-12 15:49:22 +02:00
Mike Fährmann
1f9a0e2fd8 update extractor test results 2022-04-18 17:24:00 +02:00