<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Python%3A_Tweepy%3A_Twitter_Streaming</id>
	<title>Python: Tweepy: Twitter Streaming - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Python%3A_Tweepy%3A_Twitter_Streaming"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tweepy:_Twitter_Streaming&amp;action=history"/>
	<updated>2026-05-04T10:02:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Python:_Tweepy:_Twitter_Streaming&amp;diff=46719&amp;oldid=prev</id>
		<title>Onnowpurbo at 04:27, 28 January 2017</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tweepy:_Twitter_Streaming&amp;diff=46719&amp;oldid=prev"/>
		<updated>2017-01-28T04:27:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:27, 28 January 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  import json&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  import json&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  consumer_key = '&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;FrgpflQFbXz5FbIh2qTtwqei8&lt;/del&gt;'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  consumer_key = ' '&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  consumer_secret = '&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0SfMrjSfKrKi1rSectp7PsEhe6lUWK7BvltyYBX9lIVz8BxqsI&lt;/del&gt;'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  consumer_secret = ' '&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  access_token = '&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;90134078-AaZ70Mw0cHjJZBjySETxcTM6TY7Hp1Q5dDn6A15u5&lt;/del&gt;'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  access_token = ' '&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  access_token_secret = '&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;txUSC0Lt9JhYx7AGLlsqrjwKypMmeqhdjYschXvTY5OzS&lt;/del&gt;'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  access_token_secret = ' '&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # This is the listener, resposible for receiving data&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # This is the listener, resposible for receiving data&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Python:_Tweepy:_Twitter_Streaming&amp;diff=46718&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot; import tweepy  import json    consumer_key = 'FrgpflQFbXz5FbIh2qTtwqei8'  consumer_secret = '0SfMrjSfKrKi1rSectp7PsEhe6lUWK7BvltyYBX9lIVz8BxqsI'  access_token = '90134078-AaZ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tweepy:_Twitter_Streaming&amp;diff=46718&amp;oldid=prev"/>
		<updated>2017-01-28T04:27:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; import tweepy  import json    consumer_key = &amp;#039;FrgpflQFbXz5FbIh2qTtwqei8&amp;#039;  consumer_secret = &amp;#039;0SfMrjSfKrKi1rSectp7PsEhe6lUWK7BvltyYBX9lIVz8BxqsI&amp;#039;  access_token = &amp;#039;90134078-AaZ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; import tweepy&lt;br /&gt;
 import json&lt;br /&gt;
 &lt;br /&gt;
 consumer_key = 'FrgpflQFbXz5FbIh2qTtwqei8'&lt;br /&gt;
 consumer_secret = '0SfMrjSfKrKi1rSectp7PsEhe6lUWK7BvltyYBX9lIVz8BxqsI'&lt;br /&gt;
 access_token = '90134078-AaZ70Mw0cHjJZBjySETxcTM6TY7Hp1Q5dDn6A15u5'&lt;br /&gt;
 access_token_secret = 'txUSC0Lt9JhYx7AGLlsqrjwKypMmeqhdjYschXvTY5OzS'&lt;br /&gt;
 &lt;br /&gt;
 # This is the listener, resposible for receiving data&lt;br /&gt;
 class StdOutListener(tweepy.StreamListener):&lt;br /&gt;
     def on_data(self, data):&lt;br /&gt;
         # Twitter returns data in JSON format - we need to decode it first&lt;br /&gt;
         decoded = json.loads(data)&lt;br /&gt;
 &lt;br /&gt;
         # Also, we convert UTF-8 to ASCII ignoring all bad characters sent by users&lt;br /&gt;
         print '@%s: %s' % (decoded['user']['screen_name'], decoded['text'].encode('ascii', 'ignore'))&lt;br /&gt;
         print ''&lt;br /&gt;
         return True&lt;br /&gt;
 &lt;br /&gt;
     def on_error(self, status):&lt;br /&gt;
         print status&lt;br /&gt;
 &lt;br /&gt;
 if __name__ == '__main__':&lt;br /&gt;
     l = StdOutListener()&lt;br /&gt;
     auth = tweepy.OAuthHandler(consumer_key, consumer_secret)&lt;br /&gt;
     auth.set_access_token(access_token, access_token_secret)&lt;br /&gt;
 &lt;br /&gt;
     print &amp;quot;Showing all new tweets for #ahok:&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     # There are different kinds of streams: public stream, user stream, multi-user streams&lt;br /&gt;
     # In this example follow #programming tag&lt;br /&gt;
     # For more details refer to https://dev.twitter.com/docs/streaming-apis&lt;br /&gt;
     stream = tweepy.Stream(auth, l)&lt;br /&gt;
     stream.filter(track=['ahok'])&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>