[Python] This is easy! Search for tweets on Twitter

I have tweepy installed with python3.6.3. Just do this in python.

# coding: utf-8

import tweepy

CONSUMER_KEY = "Consumer key"
CONSUMER_SECRET = "Consumer secret key"
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)

ACCESS_TOKEN = "Access token"
ACCESS_SECRET = "Access secret token"
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET)

api = tweepy.API(auth)

for tweet in api.search(q=u"iphone"):

Information modification source: https://gist.github.com/kurozumi/fee149ff02a968b5990e98f63c049320

Click here for parts written in Japanese such as "consumer key" and "access token"! https://qiita.com/kngsym2018/items/2524d21455aac111cdee

Recommended Posts

[Python] This is easy! Search for tweets on Twitter
Search twitter tweets with python
Python is easy
twitter on python3
Installing TensorFlow on Windows Easy for Python beginners
Search Twitter using Python
Search for strings in Python
Twitter posts on Python 3 etc.
Create a virtual environment for python on mac [Very easy]
What is Python? What is it used for?
Easy! Implement a Twitter bot that runs on Heroku in Python
Get only image tweets on twitter
Python for statement ~ What is iterable ~
Install confluent-kafka for Python on Ubuntu
What is the python underscore (_) for?
Reproduce One-Touch Search on Python 3.7.3. (Windows 10)
[Memo] Tweet on twitter with python
Notes for using OpenCV on Windows10 Python 3.8.3.
Easy keyword extraction with TermExtract for Python
Notes on nfc.ContactlessFrontend () for nfcpy in python
Inject is recommended for DDD in Python
Why Python is chosen for machine learning
[python] Get Twitter timeline for multiple users
Search for Pokemon haunting information from Twitter
About February 02, 2020 * This is a Python article.
python Binary search It is surprisingly easy to implement bisect.bisect_left and bisect.bisect_right from 0
[What is an algorithm? Introduction to Search Algorithm] ~ Python ~
Python for super beginners Python for super beginners # Easy to get angry
Easy way to use Python 2.7 on Cent OS 6
Causal reasoning and causal search with Python (for beginners)
Python Pandas is not suitable for batch processing
(Windows) Causes and workarounds for UnicodeEncodeError on Python 3
Python pandas: Search for DataFrame using regular expressions
Wagtail is the best CMS for Python! (Perhaps)
Tweet (API 1.1) on Google App Engine for Python
Refined search for Pokemon race values using Python
This is the only basic review of Python ~ 1 ~
This is the only basic review of Python ~ 2 ~
Easy understanding of Python for & arrays (for super beginners)
This is your choice for env file management!
A memorandum for touching python Flask on heroku
THORLABS camera CS2100M-USB runs on Python [for research]
This is the only basic review of Python ~ 3 ~
virtualenv For the time being, this is all!
Save the search results on Twitter to CSV.
Install Python and libraries for Python on MacOS Catalina
Use Search Tweets: Full Archive / Sandbox in Python
[python] When pipenv install of WSL, python on Windows side is called for some reason