tweepy

Tweepyドキュメント

APIリファレンス

import tweepy

# 認証に必要なキーとトークン
API_KEY = 'your_api_key'
API_SECRET = 'your_api_secret'
ACCESS_TOKEN = 'your_access_token'
ACCESS_TOKEN_SECRET = 'your_access_token_secret'

# APIの認証
auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)

api = tweepy.API(auth)

api.home_timeline('@id'):タイムライン(最新のツイートが一番上)。

フォロワーとそのフォロワーの友人が投稿したretweetsを含む最新の20個のツイートを返します。これはWeb上の/timeline/homeに相当します。


tweepy.Stream — Stream Reference

画像1



この記事が気に入ったらサポートをしてみませんか?