Tweepy의 api.update_status 함수에 여러 변수를 전달하려고합니다. Cursor에서 두 개의 변수를 호출하려고합니다. 변수 하나만 출력하면됩니다.Tweepy에 여러 변수 전달 api.update_status
for (id, tweet_id, screen_name, created_at, text) in cursor:
url='https://www.threatminer.org/host.php'
payload={'q': text, 'api': 'True', 'rt': '6'}
headers={
'user-agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'}
r=requests.get(url, params=payload, headers=headers)
json_data=r.json()
status_message=json_data['status_message']
status = text and "Was found in a Tweet"
if "Results found." in status_message:
api=tweepy.API(auth)
api.update_status(text, screen_name)
print(text, screen_name)
print(r.url)
print json_data
else:
print('Nothing')
"api.update_status에 여러 변수 전달"이란 무엇을 의미합니까? 보낼 텍스트가 포함 된 변수가 둘 이상 있습니까? –
@RodrigoLeite 맞습니다. 보낼 텍스트가 포함 된 여러 변수가 있습니다. –
답변을 제출했습니다 –