diff --git a/twitter/__version__.py b/twitter/__version__.py index 1b2f07a..3020f58 100644 --- a/twitter/__version__.py +++ b/twitter/__version__.py @@ -1,5 +1,5 @@ __title__ = "twitter-api-client" __description__ = "Implementation of X/Twitter v1, v2, and GraphQL APIs." -__version__ = "0.10.18" +__version__ = "0.10.19" __author__ = "Trevor Hobenshield" __license__ = "MIT" \ No newline at end of file diff --git a/twitter/constants.py b/twitter/constants.py index 746f9a1..11758c4 100644 --- a/twitter/constants.py +++ b/twitter/constants.py @@ -17,6 +17,7 @@ BLACK = '\x1b[30m' RED = '\x1b[31m' GREEN = '\x1b[32m' YELLOW = '\x1b[33m' +ORANGE = '\x1b[38;5;208m' BLUE = '\x1b[34m' MAGENTA = '\x1b[35m' CYAN = '\x1b[36m' diff --git a/twitter/util.py b/twitter/util.py index a5fdce5..5fd0fbd 100644 --- a/twitter/util.py +++ b/twitter/util.py @@ -9,8 +9,9 @@ import aiofiles import orjson from aiofiles.os import makedirs from httpx import Response, Client +from textwrap import dedent -from .constants import GREEN, MAGENTA, RED, RESET, MAX_GQL_CHAR_LIMIT, USER_AGENTS +from .constants import GREEN, MAGENTA, RED, RESET, MAX_GQL_CHAR_LIMIT, USER_AGENTS, ORANGE def init_session(): @@ -88,6 +89,12 @@ def get_json(res: list[Response], **kwargs) -> list: results.append(data) except Exception as e: print('Cannot parse JSON response', e) + print(dedent(f'''{ORANGE} + Checklist: + 1. Log-in via the browser and confirm your account is not blocked, or has pending security challenges. + 2. Copy the `ct0` and `auth_token` cookies from the browser. + 3. Re-run your program using these new cookies. + {RESET}''')) return results