diff --git a/readme.md b/readme.md index 291a4e2..f61849c 100644 --- a/readme.md +++ b/readme.md @@ -14,6 +14,8 @@ Just replace twitter.com with vxtwitter.com on the link to the tweet! `https://t You can also replace x.com links with fixvx.com +Accessing `https://vxtwitter.com/preferences` will allow you to change how you are redirected to tweets when opening them in your browser - Either by opening them on the mobile app, or opening the tweet in a [Nitter](https://github.com/zedeus/nitter) instance. + ## API If you're a nerd like me and want to use information about a tweet in your code, you can make a request to `api.vxtwitter.com` to get basic information about a tweet: `https://api.vxtwitter.com/Twitter/status/1577730467436138524` diff --git a/twitfix.py b/twitfix.py index 115c0ad..14d322e 100644 --- a/twitfix.py +++ b/twitfix.py @@ -172,12 +172,17 @@ def getTweetData(twitter_url,include_txt="false",include_rtf="false"): return cachedVNF try: - rawTweetData = twExtract.extractStatusV2Anon(twitter_url) + rawTweetData = twExtract.extractStatusV2Anon(twitter_url, None) except: rawTweetData = None if rawTweetData is None: try: - rawTweetData = twExtract.extractStatus(twitter_url,workaroundTokens=config['config']['workaroundTokens'].split(',')) + if config['config']['workaroundTokens'] is not None: + workaroundTokens = config['config']['workaroundTokens'].split(",") + else: + workaroundTokens = None + + rawTweetData = twExtract.extractStatus(twitter_url,workaroundTokens=workaroundTokens) except: rawTweetData = None if rawTweetData == None or 'error' in rawTweetData: