Commit Graph

81 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
Benjamin Vergnaud
3b316c857f [bunkr] detect new maintenance video file (#8802)
* fix(bunkr): catch new maintenance video file during validation

Bunkr has performing a large scale maintenance recently, and I've
noticed that I would on occasion download a file only to get
a short server is in maintenance video instead of the intended file.

Debug logs show the filename for the maintenance video has changed:
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): 3d09xl1.b-cdn.net:443
[urllib3.connectionpool][debug] https://3d09xl1.b-cdn.net:443 "GET /c4f36040-bdd1-40b6-aea1-034dfbe88ba2/maint.mp4 HTTP/1.1" 200 322509

This commit fixes the detection of that file to properly send the
"File server in maintenance mode" warning instead of downloading an
unintended file.

Signed-off-by: Benjamin VERGNAUD <ben@bvergnaud.fr>

* check multiple suffixes with one 'endswith()' call

---------

Signed-off-by: Benjamin VERGNAUD <ben@bvergnaud.fr>
2026-01-01 15:53:07 +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
e006d26c8e Revert "use f-strings when building 'pattern'"
revert d7c97d5a97.
2025-12-20 22:07:37 +01:00
Mike Fährmann
0b05254055 [bunkr] detect when album is deleted mid-download (#8619) 2025-11-27 11:39:32 +01:00
Mike Fährmann
d7c97d5a97 use f-strings when building 'pattern' 2025-10-20 21:23:11 +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
085616e0a8 [dt] replace 'text.parse_datetime()' & 'text.parse_timestamp()' 2025-10-17 17:43:06 +02:00
Mike Fährmann
55821346f5 [bunkr] extract 'album_...' metadata for '/f/' URLs (#8405) 2025-10-13 19:16:37 +02:00
Mike Fährmann
8ee3d9f0bd [bunkr] fix 'JSONDecodeError' for URL slugs with an ' (#8150) 2025-09-18 10:21:03 +02:00
Mike Fährmann
a09459525b [bunkr] fix 'JSONDecodeError: Invalid \escape' (#8150)
for filenames containing an apostrophe '

https://github.com/mikf/gallery-dl/issues/8150#issuecomment-3247750189
2025-09-04 10:10:53 +02:00
Mike Fährmann
12a6e0493e [bunkr] fix albums with more than 100 files (#8150) 2025-08-31 15:48:27 +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
b102c474c1 [bunkr] fix file downloads (#7747)
update 'root_dl', 'root_api', and default 'endpoint'
2025-06-29 17:53:13 +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
e08ec7e083 update copyright notices 2025-06-13 00:03:41 +02:00
Mike Fährmann
b3500b41dd [bunkr] fix filename extraction (#7237) 2025-03-24 13:25:33 +01:00
Mike Fährmann
3b81d89fef [bunkr] add 'endpoint' option (#7097) 2025-03-08 08:50:16 +01:00
Mike Fährmann
5486a9c429 [util] implement 'decrypt_xor()' 2025-03-04 16:33:42 +01:00
Mike Fährmann
4c601f9b83 [bunkr] update endpoint (#7097) 2025-03-03 16:49:42 +01:00
okbuddyagi
16c33527fa [bunkr] bypassed URL encryption
- fixed imports
- formatting
- revert unrelated formatting changes
- cleanup / simplify
2025-02-28 15:31:35 +01:00
Mike Fährmann
cd9fa1ef75 [bunkr] implement fast '--range' support (#6985) 2025-02-14 18:21:32 +01:00
Mike Fährmann
d1a8142dcf [bunkr] provide fallback URLs for 403 download links (#6732 #6972) 2025-02-12 19:12:00 +01:00
Mike Fährmann
28385bec7a [bunkr] extract 'id_url' metadata (#6935)
and use it as 'id' alternative instead of 'name' in default archive IDs
2025-02-06 20:40:35 +01:00
Mike Fährmann
b9675ea764 [bunkr] update default archive ID format (#6935)
use 'name' when there is no proper 'id' value available.
2025-02-05 21:54:43 +01:00
Mike Fährmann
843a39a6c6 [bunkr] extract correct 'filename' data (#6824) 2025-01-14 19:45:48 +01:00
Mike Fährmann
88f1ef7c3c [bunkr] fix metadata extraction (#6805) 2025-01-11 12:48:41 +01:00
Mike Fährmann
af9c06f812 [bunkr] fix album extraction (#6798) 2025-01-10 13:01:04 +01:00
Mike Fährmann
118b994cf2 [bunkr] support '/f/...' media URLs 2025-01-10 13:01:04 +01:00
Mike Fährmann
ba0443115a [bunkr] fix ValueError on relative redirects (#6790) 2025-01-10 13:00:52 +01:00
Mike Fährmann
2b96d638dc [bunkr] support 'bunkr.cr' URLs 2024-11-10 20:43:33 +01:00
Mike Fährmann
096b9f1d26 [bunkr] fix album names containing <>&
unescaping HTML entities once is not good enough
2024-11-10 20:38:21 +01:00
Mike Fährmann
bce3c4b424 [bunkr] try different domain when encountering a CF challenge page
(#6344, #6352, #6368)
2024-10-23 21:17:01 +02:00
Mike Fährmann
9a2bccd0d9 [bunkr] update to new site layout (#6344, #6352) 2024-10-21 14:17:28 +02:00
Mike Fährmann
c148e200a4 [bunkr] send proper Referer headers for file downloads (#6319) 2024-10-14 16:28:24 +02:00
Mike Fährmann
6506afb257 [bunkr] support 'bunkr.ps' URLs 2024-10-14 16:27:09 +02:00
Mike Fährmann
57c30fdc5b [bunkr] support 'bunkr.pk' URLs (#6272) 2024-10-04 09:16:31 +02:00
Mike Fährmann
46c3971c88 [bunkr] add 'tlds' option to allow URLs with all TLDs (#5875, #6017) 2024-08-24 20:45:44 +02:00
Mike Fährmann
8ea75202ed [bunkr] fix file downloads (#6037) 2024-08-17 19:25:19 +02:00
Mike Fährmann
0bbdeaaa50 [bunkr] support 'bunkr:' URL prefix (#6017)
and support 'bunkr.ax' by default
2024-08-14 19:00:59 +02:00
Mike Fährmann
ad6ed72307 [bunkr] add tests for new domains 2024-08-10 12:25:43 +02:00
Larsluph
8e2a2bd221 [bunkr] Add support for more domains
Supported domains added:
- https://bunkr.ci
- https://bunkrrr.org
2024-08-08 12:38:32 -05:00
Mike Fährmann
34433f5a5d [bunkr] fail downloads for 'maintenance' files (#5952) 2024-08-07 08:33:10 +02:00
Mike Fährmann
727e53f513 [bunkr] support 'bunkr.fi' URLs (#5872) 2024-07-21 06:41:50 +02:00
Mike Fährmann
1d6260f456 [bunkr] remove 'description' metadata
album descriptions are no longer available on album pages
and the previous code erroneously returned just '0'
2024-03-22 02:14:41 +01:00
Mike Fährmann
06cb518d97 [bunkr] fix extraction (#5088, #5151, #5153)
- remove legacy code
- map legacy domains to bunkr.sk
- use input URL domain for newer domains
- update tests (some files got slightly modified or deleted)
2024-02-11 22:36:03 +01:00
Jeff Mercado
d9d0601ab1 break up line to fit 80 char 2024-01-29 20:31:58 -08:00
Jeff Mercado
6bcd3c9380 [bunkr] add new bunkr domains (#5130) 2024-01-29 20:25:33 -08:00
Mike Fährmann
beacfa7436 [bunkr] update domain to 'bunkr.sk' (#5114) 2024-01-25 23:45:41 +01:00