From c699ce8ebb7fef138c589a1e739c8c003189bbc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 13 Jun 2024 00:54:43 +0200 Subject: [PATCH] [twitter] add 'username-alt' option (#5715) --- docs/configuration.rst | 12 ++++++++++++ gallery_dl/extractor/twitter.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index c16d1be8..c659e9d4 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -4105,6 +4105,18 @@ Description Ignore previously seen Tweets. +extractor.twitter.username-alt +------------------------------ +Type + ``string`` +Description + Alternate Identifier (username, email, phone number) + when `logging in `__. + + When not specified and asked for by Twitter, + this identifier will need to entered in an interactive prompt. + + extractor.twitter.users ----------------------- Type diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index 5e6793ba..04970a40 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -1854,7 +1854,7 @@ def _login_impl(extr, username, password): }, } elif subtask == "LoginEnterAlternateIdentifierSubtask": - alt = extr.input( + alt = extr.config("username_alt") or extr.input( "Alternate Identifier (username, email, phone number): ") data = { "enter_text": {