ツイッター

import tweepy

NGvzUHZdYcVcXWPslEov8Vnlo= "consumer_key"
e7Kd5MSvyDbD7r6TkmVnZVKAZ5GJNaNa0tpdYYUfAwbkFMTiJQ= "consumer_secret"
1103903678522507265-MxrbmuUDhKDNNNrMufewI63NS7Q9My= "access_token"
1103903678522507265-MxrbmuUDhKDNNNrMufewI63NS7Q9My
f0rvEh8fAE8gDZQvRb2zmlaA8lkgtNiLrBvsOeoF8Pzmg= "access_token_secret"
auth = tweepy.OAuthHandler(NGvzUHZdYcVcXWPslEov8Vnlo,e7Kd5MSvyDbD7r6TkmVnZVKAZ5GJNaNa0tpdYYUfAwbkFMTiJQ)
auth.set_access_token(1103903678522507265-MxrbmuUDhKDNNNrMufewI63NS7Q9My,f0rvEh8fAE8gDZQvRb2zmlaA8lkgtNiLrBvsOeoF8Pzmg)

api = tweepy.API(auth)

public_tweets = api.home_timeline()
for tweet in public_tweets:
    print(tweet.text)
import tweepy

NGvzUHZdYcVcXWPslEov8Vnlo= "consumer_key"
e7Kd5MSvyDbD7r6TkmVnZVKAZ5GJNaNa0tpdYYUfAwbkFMTiJQ= "consumer_secret"
1103903678522507265-MxrbmuUDhKDNNNrMufewI63NS7Q9My= "access_token"
f0rvEh8fAE8gDZQvRb2zmlaA8lkgtNiLrBvsOeoF8Pzmg= "access_token_secret"

auth = tweepy.OAuthHandler(CK,CS)
auth.set_access_token(AT,f0rvEh8fAE8gDZQvRb2zmlaA8lkgtNiLrBvsOeoF8Pzmg)

api = tweepy.API(auth)

search_word = "おはよう
search_results_list = api.search(q=search_word, count=5)

for tweet in search_results_list:
    try:
        api.create_favorite(tweet.id)
        print(tweet.text)
    except:
        print("I failed to create favorite.")
 python test01.py
@charset "UTF-8";

body {
  background: #f8f8f8;
}
window.addEventListener('load', function() {
  document.querySelector('h1').innerHTML = 'ツイッター';
}, false);
Full page Open in App

5 months ago

Pages


comments powered by Disqus