Tweepyのapi.update_status関数に複数の変数を渡そうとしています。 Cursorから2つの変数を呼び出そうとしていますが、1つの変数のみを出力します。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に渡す」とはどういう意味ですか?送信するテキストを含む2つ以上の変数がありますか? –
@RodrigoLeiteそれは正しいです。私は、送信したいテキストを含む複数の変数を持っています。 –
私は回答 –