34 Commits

Author SHA1 Message Date
Mike Fährmann
53cdfaac37 [common] add reference to 'exception' module to Extractor class
- remove 'exception' imports
- replace with 'self.exc'
2026-02-15 10:57:22 +01:00
Mike Fährmann
12f5e24ab5 use sets for ' in { ... }' checks 2026-02-11 22:55:01 +01:00
Mike Fährmann
7784aed74e [kemono] prevent 'revisions' API requests when possible
posts from '/v1/{service}/user/{creator_id}/post/{post_id}' already
include their revisions and don't need an additional API request
2026-01-26 10:00:32 +01:00
Mike Fährmann
7ac9ad1cbf [kemono] fix possible 'AttributeError' for revisions (#8929)
some revisions have string values for 'file' and 'attachments'
instead of the regular dicts
2026-01-26 10:00:32 +01:00
Mike Fährmann
6765f4c77e [kemono:discord] improve 'filename' parsing 2026-01-21 17:01:18 +01:00
Mike Fährmann
774d885a86 [kemono:discord] extract 'archives' metadata (#8898)
4a74bc6e30
2026-01-20 17:58:36 +01:00
Mike Fährmann
efcbde7dcd [kemono:discord] support server URLs with trailing '/' 2026-01-20 17:29:00 +01:00
Mike Fährmann
00c6821a3f replace 2-element f-strings with simple '+' concatenations
Python's 'ast' module and its 'NodeVisitor' class
were incredibly helpful in identifying these
2025-12-22 11:26:04 +01:00
Mike Fährmann
d0f06be0d2 use 'operator +' when building 'pattern' 2025-12-20 22:07:44 +01:00
Mike Fährmann
968597a302 yield 3-tuples for Message.Directory
adapt tuples to the same length and semantics as other messages
2025-12-05 21:39:52 +01:00
Mike Fährmann
9bf76c1352 replace 'util.re()' with 'text.re()'
remove unnecessary 'util' imports
2025-10-20 17:44:58 +02:00
Mike Fährmann
c8fc790028 merge branch 'dt': move datetime utils into separate module
- use 'datetime.fromisoformat()' when possible (#7671)
- return a datetime-compatible object for invalid datetimes
  (instead of a 'str' value)
2025-10-20 09:30:05 +02:00
Mike Fährmann
c38856bd3f [dt] use 'parse_datetime_iso()' for ISO formats 2025-10-19 21:52:05 +02:00
Mike Fährmann
9ad937a982 [kemono] use f-strings 2025-10-18 20:33:44 +02:00
Mike Fährmann
085616e0a8 [dt] replace 'text.parse_datetime()' & 'text.parse_timestamp()' 2025-10-17 17:43:06 +02:00
Mike Fährmann
3252ead7c7 [kemono] improve 'filename' 2025-10-15 13:13:46 +02:00
Mike Fährmann
2c0facde72 [kemono] prevent fatal exception when retrieving profile data (#8382) 2025-10-10 17:21:01 +02:00
Mike Fährmann
c991f05d52 [kemono:discord] add 'order-posts' option (#8241) 2025-09-20 21:26:10 +02:00
Mike Fährmann
97d4a76926 [kemono] add '.bin' archive files to archives list (#8156) 2025-09-05 13:43:46 +02:00
Mike Fährmann
89c62976ca [kemono] send 'Accept: text/css' for API requests (#8047 #8057) 2025-08-16 16:27:43 +02:00
Mike Fährmann
dd30d64340 [kemono] update '/creators' endpoint (#8039 #8040) 2025-08-15 08:03:58 +02:00
Mike Fährmann
42582af4f1 [kemono] support '"endpoint": "posts+"' for full metadata (#8028)
alias for "legacy+"
2025-08-14 12:13:12 +02:00
Mike Fährmann
df15fc0157 [kemono][coomer] fix extraction (#8028 #8031)
- use new '/posts' API endpoint
  ("endpoint": "legacy+" to get full metadata)
- ensure 'utf-8' encoding
' fix 'dms'
2025-08-14 08:28:33 +02:00
Mike Fährmann
0588b64d4b [kemono] don't set error status when there are no comments (#7961)
fixes regression introduced in 1bbacba4ed
2025-08-02 22:08:38 +02:00
CautiouslyKate
ed2d07181a [kemono] update extractor to use new domains (#7902 #7907 #7904)
* Update kemono.py
* Update coomer.py
* Update kemono.py
* Fixed TypeError
    - Fixed a regex mistake I made
* Make legacy domains resolve as current domains
* Update gallery_dl/extractor/kemono.py
* remove legacy .su domain support
* fixed accidental regex change
* update docs/supportedsites
* update test results
    - (re)add legacy domain URLs
    - update URL pattern TLDs
* restore support for '.su' TLDs

---------

Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
2025-07-27 10:10:35 +02:00
Mike Fährmann
a097a373a9 simplify if statements by using walrus operators (#7671) 2025-07-22 20:57:54 +02:00
Mike Fährmann
3810555bbd do not use 'append = list.append' 2025-06-30 11:42:44 +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
fde6110d96 [kemono] extend 'duplicates' option (#7696)
allow selecting which file type(s) ('file'/'attachment'/'inline')
not to consider when discarding duplicates
2025-06-27 21:32:34 +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
b5c88b3d3e replace standard library 're' uses with 'util.re()' 2025-06-06 13:24:52 +02:00
Mike Fährmann
931c2949ed [kemono] fix tagged creator posts
fixes regression introduced in 16b5d41ce5
2025-05-30 21:53:00 +02:00
Mike Fährmann
922c296482 [kemono][coomer][schalenetwork] rename modules & extractors
category changes:

- kemonoparty -> kemono
- coomerparty -> coomer
- koharu      -> schalenetwork

also wanted to rename '2chan' -> 'sturdychan',
but the site's main page is still titled '2chen'
2025-05-30 17:51:49 +02:00