Mike Fährmann
2944cd4b74
[oauth] inline/remove top-level imports
2025-12-07 17:13:44 +01:00
Mike Fährmann
d1de48e7b2
remove Message.Version
2025-12-07 17:13:25 +01:00
Mike Fährmann
2578f7b5c1
[flickr] extract public API key from website ( #7564 #7649 #7700 #8553 )
...
this breaks 'oauth:flickr' with the default key,
but it allows downloading without custom key / Flickr Pro
2025-11-14 11:38:28 +01:00
Mike Fährmann
5bd1b5c01f
[oauth] improve error messages ( #8086 )
2025-08-22 11:12:54 +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
096bc6f784
replace more '.format(…)' calls with f-strings ( #7671 )
2025-07-10 21:17:17 +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
87e3cb17e6
[oauth] improve wording when opening URL
2025-02-25 20:12:54 +01:00
Mike Fährmann
2e87a91e97
[oauth] prevent empty browser names
2024-10-01 08:22:50 +02:00
Mike Fährmann
60b4541199
improve a1bb3279, fix oauth:pixiv ( #5757 )
...
Check 'input' option only when required.
This also fixes an exception in oauth:pixiv caused by using the same
'_input' name as a method defined there.
2024-06-18 16:50:04 +02:00
Mike Fährmann
ef8f02c3d9
[oauth] use Extractor.request() for HTTP requests ( #5433 )
...
Enables using proxies and general network options.
2024-04-04 20:51:54 +02:00
Mike Fährmann
89066844f4
add 'config_instance' method
...
to allow for a more streamlined access to BaseExtractor instance options
2024-01-18 03:20:36 +01: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
e256434c9e
use custom HTTPBasicAuth class
...
to support LazyPrompt as password
and to generate the Authorization header only once
instead of for every request
2023-12-07 01:40:31 +01:00
Mike Fährmann
17e710c4bf
[oauth] warn when cache is enabled but not writeable ( #4771 )
2023-11-13 16:24:54 +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
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
076380e079
remove '*' indicating keyword-only arguments
...
they are kind of unnecessary and
cause a non-insignificant function call overhead (~10%)
2023-05-02 22:23:33 +02:00
Mike Fährmann
a05120412a
[oauth] catch exception from 'webbrowser.get()' ( #3947 )
...
It raises an exception instead of returning None
when no runnable browser is available.
2023-04-23 15:00:09 +02:00
Mike Fährmann
b8a702929d
[oauth] import extractor modules on demand
2023-03-02 18:39:54 +01:00
Mike Fährmann
dd88740ec7
replace remaining instances of base64 with binascii
2023-03-02 18:25:47 +01:00
Mike Fährmann
75570ad3f1
[oauth] remove stray 'exit()' ( #3628 )
...
- bug from 70ce45d9
- broke oauth:tumblr, oauth:flickr, and oauth:smugmug
2023-02-13 15:58:34 +01:00
Mike Fährmann
70ce45d965
[oauth] use default name for browsers without 'name' attribute
...
(#3645 )
Seem to only be an issue for MacOSXOSAScript before Python 3.11.
d12bec6993
2023-02-11 14:48:59 +01:00
Mike Fährmann
568112dfbb
[oauth] improve output
...
- show which api key / client id gets used (#3518 )
- show in which browser authorization URLs gets opened in
2023-01-20 12:33:26 +01:00
Mike Fährmann
df91ebb945
[oauth] simplify OAuth 1.0a init
2023-01-19 18:34:54 +01:00
Martin Juhasz
9ea521bec5
[oauth] add host config option ( #2806 )
2022-08-14 17:08:01 +02:00
Mike Fährmann
688d6553b4
replace calls to print() with stdout_write() ( #2529 )
2022-05-19 17:09:24 +02:00
Mike Fährmann
e5f6af6e32
[oauth:pixiv] add note about 'code' expiring in 30 seconds ( #2306 )
2022-02-19 23:47:30 +01:00
Mike Fährmann
4f5f9ed1e5
[oauth] fix typo
...
this has been here since February ...
(8974f036 )
2021-09-08 20:14:39 +02:00
Mike Fährmann
96fec14ef7
[deviantart] rename 'watch' option to 'auto-watch'
...
(#1466 , #1757 )
Similar reason as in e05a96db .
'watch' is already used by the WatchExtractor class.
2021-08-29 21:10:53 +02:00
Mike Fährmann
4718f9c5dd
[oauth] use defaults when config values are set to None/null
...
(fixes #1778 )
2021-08-21 22:46:01 +02:00
Mike Fährmann
04f4f9badb
[oauth] prevent exceptions when reporting errors ( #1603 )
2021-06-05 14:28:26 +02:00
Mike Fährmann
fbfcbcbf57
Merge branch '1.17.0'
2021-02-15 02:32:33 +01:00
Mike Fährmann
8974f0361c
[pixiv] update ( #1304 )
...
- remove login with username & password
- require a refresh token
- add 'oauth:pixiv' functionality
See also:
- https://github.com/upbit/pixivpy/issues/158
- https://gist.github.com/ZipFile/c9ebedb224406f4f11845ab700124362
2021-02-12 18:07:16 +01:00
Mike Fährmann
1d145a6186
[mastodon] use cache for OAuth tokens ( #616 )
2021-01-31 01:38:23 +01:00
Mike Fährmann
36bf76fa44
update 'oauth:mastodon:<instance>' code
2021-01-28 02:20:12 +01: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
bdc6c8f074
improve message for 'oauth:deviantart' etc ( closes #989 )
2020-09-29 21:25:24 +02:00
Mike Fährmann
864f4220d9
update output of 'oauth:…' ( #616 )
2020-05-31 17:41:40 +02:00
Mike Fährmann
dfcf2a2c91
write OAuth token to cache by default ( #616 )
2020-05-25 22:35:45 +02:00
Mike Fährmann
c8787647ed
add global WINDOWS bool
2020-05-19 22:32:53 +02:00
Mike Fährmann
5d7404ab58
[oauth] use the new name for 'DeviantartAPI' ( fixes #670 )
2020-04-04 20:34:47 +02:00
Mike Fährmann
913b8333cc
write DeviantArt refresh-tokens to cache ( #616 )
...
Writing the token is currently disabled by default and must be
enabled with 'extractor.oauth.cache'.
'extractor.deviantart.refresh-token' must be set to '"cache"'
to use the cached token.
2020-02-25 22:55:11 +01:00
Mike Fährmann
da0d5f6092
[oauth] add 'port' option ( #604 )
2020-02-09 13:45:44 +01:00
Mike Fährmann
372ffe95ee
[oauth] adjust Flickr redirect URI ( fixes #503 )
...
Flickr now automatically forces https:// for all redirect URIs.
2019-12-02 22:24:20 +01:00
Mike Fährmann
f5604492c3
update interface of config functions
2019-11-24 00:42:28 +01:00