diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5d8849e..7ff089a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -65,8 +65,4 @@ jobs: VXTWITTER_URL: ${{ secrets.VXTWITTER_URL }} VXTWITTER_COMBINATION_METHOD: ${{ secrets.VXTWITTER_COMBINATION_METHOD }} VXTWITTER_GIF_CONVERT_API: ${{ secrets.VXTWITTER_GIF_CONVERT_API }} - VXTWITTER_WORKAROUND_CONSUMER_KEY: ${{ secrets.VXTWITTER_WORKAROUND_CONSUMER_KEY }} - VXTWITTER_WORKAROUND_CONSUMER_SECRET: ${{ secrets.VXTWITTER_WORKAROUND_CONSUMER_SECRET }} - VXTWITTER_WORKAROUND_TOKEN: ${{ secrets.VXTWITTER_WORKAROUND_TOKEN }} - VXTWITTER_WORKAROUND_TOKEN_SECRET: ${{ secrets.VXTWITTER_WORKAROUND_TOKEN_SECRET }} VXTWITTER_WORKAROUND_TOKENS: ${{ secrets.VXTWITTER_WORKAROUND_TOKENS }} \ No newline at end of file diff --git a/config.json b/config.json index c4e3e1d..6f60eca 100644 --- a/config.json +++ b/config.json @@ -9,6 +9,7 @@ "table": "[database table here]", "url": "https://vxtwitter.com", "combination_method": "local", - "gifConvertAPI": "local" + "gifConvertAPI": "local", + "workaroundTokens":null } } \ No newline at end of file diff --git a/configHandler.py b/configHandler.py index d17ecc8..f8e656b 100644 --- a/configHandler.py +++ b/configHandler.py @@ -13,13 +13,7 @@ if ('RUNNING_SERVERLESS' in os.environ and os.environ['RUNNING_SERVERLESS'] == ' "url": os.getenv("VXTWITTER_URL","https://vxtwitter.com"), "combination_method": os.getenv("VXTWITTER_COMBINATION_METHOD","local"), # can either be 'local' or a URL to a server handling requests in the same format "gifConvertAPI":os.getenv("VXTWITTER_GIF_CONVERT_API",""), - "workaroundTokens":os.getenv("VXTWITTER_WORKAROUND_TOKENS",None), - "workaroundKeys":{ - "consumerKey":os.getenv("VXTWITTER_WORKAROUND_CONSUMER_KEY"), - "consumerSecret":os.getenv("VXTWITTER_WORKAROUND_CONSUMER_SECRET"), - "accessToken":os.getenv("VXTWITTER_WORKAROUND_TOKEN"), - "accessTokenSecret":os.getenv("VXTWITTER_WORKAROUND_TOKEN_SECRET") - } + "workaroundTokens":os.getenv("VXTWITTER_WORKAROUND_TOKENS",None) } } else: @@ -37,7 +31,7 @@ else: "url": "https://vxtwitter.com", "combination_method": "local", # can either be 'local' or a URL to a server handling requests in the same format "gifConvertAPI":"", - "workaroundKeys":{"consumerKey":"","consumerSecret":"","accessToken":"","accessTokenSecret":""} + "workaroundTokens":None } } diff --git a/requirements.txt b/requirements.txt index 42198a5..1e12ca2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,4 @@ requests==2.31.0 Pillow==10.0.0 Flask==2.2.3 Flask-Cors==4.0.0 -yt-dlp==2022.7.18 -twitter==1.19.6 \ No newline at end of file +yt-dlp==2022.7.18 \ No newline at end of file diff --git a/twitfix.py b/twitfix.py index a628c45..5e69610 100644 --- a/twitfix.py +++ b/twitfix.py @@ -14,7 +14,6 @@ import twExtract as twExtract from configHandler import config from cache import addVnfToLinkCache,getVnfFromLinkCache from yt_dlp.utils import ExtractorError -from twitter.api import TwitterHTTPError import vxlogging as log import zipfile import traceback