Fixed tweet not found error
This commit is contained in:
@ -14,6 +14,7 @@ import twExtract as twExtract
|
|||||||
from configHandler import config
|
from configHandler import config
|
||||||
from cache import addVnfToLinkCache,getVnfFromLinkCache
|
from cache import addVnfToLinkCache,getVnfFromLinkCache
|
||||||
from yt_dlp.utils import ExtractorError
|
from yt_dlp.utils import ExtractorError
|
||||||
|
from twitter.api import TwitterHTTPError
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
CORS(app)
|
CORS(app)
|
||||||
|
|
||||||
@ -206,6 +207,11 @@ def vnfFromCacheOrDL(video_link):
|
|||||||
else:
|
else:
|
||||||
exErr.msg=None
|
exErr.msg=None
|
||||||
return None,exErr.msg
|
return None,exErr.msg
|
||||||
|
except TwitterHTTPError as twErr:
|
||||||
|
if twErr.e.code == 404:
|
||||||
|
return None,msgs.tweetNotFound
|
||||||
|
else:
|
||||||
|
return None,None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
return None,None
|
return None,None
|
||||||
|
Reference in New Issue
Block a user