1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 20:22:36 +01:00
Commit Graph

126 Commits

Author SHA1 Message Date
Mike Fährmann
785e6f2911
[tumblr] fix 401 Unauthorized for likes when using api-key (#5994)
fixes regression introduced in 540eaa5a
2024-08-12 09:09:59 +02:00
Mike Fährmann
540eaa5add
[tumblr] implement 'pagination' option (#5880)
restore pagination behavior from before
de670bd7de
2024-07-23 20:31:04 +02:00
Mike Fährmann
141a93c8fd
[docs] update docs/configuration links (#5059, #5369, #5423) 2024-04-13 02:18:44 +02:00
Mike Fährmann
da76e13e3b
[tumblr] fix exception after waiting for rate limit (#4916)
use a loop instead of recursive function calls
2023-12-12 19:14:06 +01:00
Mike Fährmann
d59d4ebff4
[tumblr] support infinite 'fallback-retries' 2023-12-11 23:40:13 +01:00
Mike Fährmann
7608201a44
[tumblr] fix 'day' extractor
another bug caused by a383eca7
2023-11-25 00:51:14 +01: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
1d2b5d0c60
update test comment positions
always put them above the test they're referring to
2023-09-06 18:16:09 +02:00
Mike Fährmann
255d08b79e
add test for 'Extractor.initialize()' (#4359) 2023-07-28 16:58:16 +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
5297ee0cd9
[tumblr] add 'day' extractor (#3951) 2023-04-24 22:01:47 +02:00
Mike Fährmann
de670bd7de
[tumblr] update pagination logic (#2191) 2023-04-24 20:07:10 +02:00
Mike Fährmann
8fb043e8ff
[tumblr] raise more detailed errors for dashboard-only blogs
(#3628)
2023-02-12 19:38:14 +01:00
Mike Fährmann
b0cb4a1b9c
replace 'text.extract()' with 'text.extr()' where possible 2022-11-05 01:14:09 +01:00
ClosedPort22
4e80d3210e
[tumblr] Fallback to gifv when possible (#3095) (#3159) 2022-11-04 19:42:36 +01:00
Mike Fährmann
7c6af27eb8
[tumblr] add 'fallback-*' options (#2957)
specifically 'fallback-delay' and 'fallback-retries'
and change default number of retries to 2 (down from 3)
2022-10-26 13:59:09 +02:00
Mike Fährmann
68466a7d61
[tumblr] support 'https://www.tumblr.com/BLOGNAME' URLs (#3034) 2022-10-11 21:09:24 +02:00
Mike Fährmann
f1f89b2436
[tumblr] add 'offset' option 2022-10-11 10:54:23 +02:00
Mike Fährmann
e5d229c524
[tumblr] sleep between fallback retries (#2957) 2022-10-11 10:48:28 +02:00
Mike Fährmann
e1d714943b
[tumblr] catch exception when updating image token (#2957) 2022-09-30 15:08:21 +02:00
Mike Fährmann
f728b5ca06
[tumblr] add fallback for failed higher-resolution images (#2957) 2022-09-28 21:36:09 +02:00
Mike Fährmann
32c30754d1
[tumblr] warn when unable to fetch higher-resolution images (#2957)
and download the smaller version
instead of failing with a 404 error
2022-09-26 12:05:34 +02:00
Mike Fährmann
46fe469c53
[tumblr] implement 'ratelimit' option (#2919) 2022-09-17 14:10:33 +02:00
Mike Fährmann
7a799df17f
[tumblr] pre-compile regular expressions 2022-09-13 17:50:48 +02:00
blankie
9745b48830
[tumblr] attempt to fetch high-quality inline images (#2877)
* [tumblr] attempt to fetch high-quality images (again)

Fixes #1846, and fixes #1344

* slight refactor

* update configuration.rst entry
2022-08-31 10:53:50 +02:00
blankie
e4cff67aaa
[tumblr] add count metadata field (#2804)
Fixes #2778
2022-08-18 18:24:37 +02:00
Mike Fährmann
a27b17481f
[tumblr] restrict condition for calling _original_image 2022-08-11 12:20:39 +02:00
Mike Fährmann
df1c643dda
[tumblr] attempt to extract full-resolution photos
- for photos with apparent width == 2048 or height == 3072
- can be disabled with 'original' option
2022-08-10 20:01:46 +02:00
blankie
5b63df46c0
[tumblr] attempt to get higher-quality images (#2761) 2022-07-27 10:47:43 +02:00
Mike Fährmann
a566e63cdf
[tumblr] support '/blog/view' URLs (#2760) 2022-07-15 15:22:54 +02:00
Mike Fährmann
6ea3ff5173
[tumblr] notify users about registering an oauth application
if they hit the daily rate limit and are using default API credentials
2022-03-06 16:28:53 +01:00
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
Mike Fährmann
ddd48ceee5
update extractor test results 2021-03-28 23:06:44 +02:00
Mike Fährmann
968d3e8465
remove '&' from URL patterns
'/?&#' -> '/?#' and '?&#' -> '?#'

According to https://www.ietf.org/rfc/rfc3986.txt, URLs are
"organized hierarchically" by using "the slash ("/"), question
mark ("?"), and number sign ("#") characters to delimit components"
2020-10-22 23:31:25 +02:00
Mike Fährmann
3918b69677
remove 'extractor.blacklist' context manager 2020-09-11 13:17:35 +02:00
Mike Fährmann
7876a03ece
[tumblr] create directories for each post (fixes #965)
This changes the identifiers for directory format string fields.
Everything blog related is now inside a 'blog' object
and not at the "base level" anymore.

E.g. '{name}' for directories is now '{blog[name]}'
(or '{blog_name}', since that is also available)
2020-08-31 21:58:20 +02:00
Mike Fährmann
2ecf1efb16
update extractor test results
- tumblr: remove deleted post
- jaiminisbox: replace removed manga/chapters
- smugmug: one inconsequential field got removed
2020-07-18 15:12:28 +02:00
Mike Fährmann
5e5be67c26
[tumblr] prevent KeyErrors when using reblogs=same-blog
(fixes #851)
2020-06-25 19:00:12 +02:00
Mike Fährmann
09cc9dbec0
prevent flake8 errors from comments looking like type annotations 2020-05-12 20:08:05 +02:00
Mike Fährmann
d02f7c1118
improve Extractor.wait()
- allow 'until' to be a datetime object
- do "time calculations" with UTC timestamps
- set a default 'reason'
2020-04-05 21:23:05 +02:00
Mike Fährmann
d94215d119
[tumblr] replace '-' with ' ' in tag searches (fixes #611)
To search for tags with actual minus signs in them
(there shouldn't be too many,) manually replace those
with url-encoded minus characters ('-' -> '%2d')
before inputting them into gallery-dl:

https://s679874.tumblr.com/tagged/tag-with-minus
 ->
https://s679874.tumblr.com/tagged/tag%2dwith%2dminus
2020-02-17 23:29:13 +01:00
Mike Fährmann
3811fd8a25
fix time formatting for Python 3.4 and 3.5
'datetime.time.isoformat()' only has an optional 'timespec' argument
since Python 3.6.
2020-01-05 00:47:10 +01:00
Mike Fährmann
569747a78d
implement extractor.wait() 2020-01-04 23:42:07 +01:00
Mike Fährmann
ce54b8c04c
let extractors opt-out of cookie option usage
useful to avoid sending unnecessary cookies when all authentication
is done through OAuth tokens
2020-01-01 21:12:37 +01:00
Mike Fährmann
c4702ec9b6
simplify some logging calls 2019-12-10 21:30:08 +01:00
Mike Fährmann
4409d00141
embed error messages in StopExtraction exceptions 2019-10-28 16:39:49 +01:00
Mike Fährmann
d5fbb2d9de
[tumblr] ignore audio links from Spotify etc. 2019-09-07 18:18:12 +02:00
Mike Fährmann
1133b7fcbd
[smugmug] update unit tests
The account used for tests before has been deleted.
2019-07-19 17:16:24 +02:00
Mike Fährmann
8d1ae9b715
[tumblr] enable date-min/-max/-format options (#337) 2019-07-17 14:36:41 +02:00