diff --git a/twspace_dl/twitter.py b/twspace_dl/twitter.py index d906266..b938b33 100644 --- a/twspace_dl/twitter.py +++ b/twspace_dl/twitter.py @@ -14,7 +14,9 @@ def guest_token() -> str: """Generate a guest token to authorize twitter api requests""" response = requests.post( - "https://api.twitter.com/1.1/guest/activate.json", headers=AUTH_HEADER, timeout=30 + "https://api.twitter.com/1.1/guest/activate.json", + headers=AUTH_HEADER, + timeout=30, ).json() token = response["guest_token"] if not token: @@ -39,7 +41,7 @@ def user_id(user_url: str) -> str: '"verified_phone_label_enabled":false,' '"responsive_web_graphql_timeline_navigation_enabled":true' "}" - ) + ), } response = requests.get( "https://api.twitter.com/graphql/hVhfo_TquFTmgL7gYwf91Q/UserByScreenName",