Fix community note in API
This commit is contained in:
parent
e31a5f147d
commit
1d01a6c067
5
vxApi.py
5
vxApi.py
@ -15,7 +15,10 @@ def getApiResponse(tweet,include_txt=False,include_rtf=False):
|
||||
communityNote=None
|
||||
try:
|
||||
if "birdwatch_pivot" in tweet:
|
||||
communityNote=tweet["birdwatch_pivot"]["note"]["summary"]["text"]
|
||||
if 'summary' in tweet["birdwatch_pivot"]["note"]:
|
||||
communityNote=tweet["birdwatch_pivot"]["note"]["summary"]["text"]
|
||||
elif 'subtitle' in tweet["birdwatch_pivot"] and 'text' in tweet["birdwatch_pivot"]["subtitle"]:
|
||||
communityNote=tweet["birdwatch_pivot"]["subtitle"]["text"]
|
||||
except:
|
||||
pass
|
||||
if "extended_entities" in tweetL:
|
||||
|
Loading…
x
Reference in New Issue
Block a user