Removed dependency on official Twitter API

This commit is contained in:
dylanpdx 2023-08-04 21:04:05 +01:00
parent e230043e85
commit 0cf2b57700
5 changed files with 5 additions and 16 deletions

View File

@ -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 }}

View File

@ -9,6 +9,7 @@
"table": "[database table here]",
"url": "https://vxtwitter.com",
"combination_method": "local",
"gifConvertAPI": "local"
"gifConvertAPI": "local",
"workaroundTokens":null
}
}

View File

@ -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
}
}

View File

@ -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
yt-dlp==2022.7.18

View File

@ -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