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
|
communityNote=None
|
||||||
try:
|
try:
|
||||||
if "birdwatch_pivot" in tweet:
|
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:
|
except:
|
||||||
pass
|
pass
|
||||||
if "extended_entities" in tweetL:
|
if "extended_entities" in tweetL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user