<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6522435382991189973.post8838381962894988889..comments</id><updated>2009-01-17T08:10:29.639-08:00</updated><category term='Python'/><category term='Twitter'/><category term='automations'/><category term='javascript'/><category term='Amy Iris'/><category term='chat-bot'/><category term='Semantic Web'/><category term='Twellow'/><category term='parsing'/><category term='prizes'/><category term='textin'/><category term='Wikipedia'/><category term='triple double quote'/><category term='developers'/><category term='excel'/><category term='conversations'/><category term='AI'/><category term='Conversational Interface'/><category term='ALICE'/><category term='Links'/><category term='Presentation'/><category term='aiml'/><category term='worthless followers'/><category term='Retweeting'/><category term='Web 3.0'/><category term='bets buy remix'/><category term='friends'/><category term='Box'/><category term='snippets'/><category term='municipal conversational interface'/><category term='generators'/><category term='RDF'/><category term='bot'/><category term='Sample Program'/><category term='amyiris'/><category term='knowledge base'/><category term='code walkthrough'/><category term='Best Buy'/><category term='confidence values'/><category term='example'/><category term='Migration'/><category term='MicroFormats'/><category term='ASP'/><category term='brain'/><category term='website'/><category term='algorithm'/><category term='page scraping'/><category term='Politeness'/><category term='API'/><category term='Google App Engine'/><category term='code snippet'/><category term='How she works'/><category term='say'/><category term='RESTful'/><category term='integration'/><category term='auto define properties'/><category term='Django'/><category term='PyOhio'/><category term='Python Twitter Toolkit'/><category term='practical approach'/><category term='source code'/><category term='followers'/><category term='widget'/><category term='json'/><category term='recursion'/><category term='Container Object'/><title type='text'>Comments on Amy Iris: Twitter Automations with Python Scripts</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.amyiris.com/feeds/8838381962894988889/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html'/><author><name>Amy Iris</name><uri>http://www.blogger.com/profile/04120694276386973076</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_BtbNAV5zYlA/SWR80hPRc7I/AAAAAAAAAAM/hcI4P18FNSQ/S220/portrait.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6522435382991189973.post-6922461737284532700</id><published>2009-01-17T08:10:00.000-08:00</published><updated>2009-01-17T08:10:00.000-08:00</updated><title type='text'>Sorry, I should have mentioned this is version 2 c...</title><content type='html'>Sorry, I should have mentioned this is version 2 code (works on 2.5, as long as I didn't mess it up when I posted it; should work in 2.6.)&lt;BR/&gt;&lt;BR/&gt;I want to emphasize that this is the HARD way to do this, and I was going to follow up with a subsequent post with the easy way. &lt;BR/&gt;&lt;BR/&gt;I think the hard way is easier to understand for new Python programmers.  It's just HTML scraping.  But clearly using the API is shorter, and is more sanctioned - it takes less server resources from Twitter, and less network resources.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/6922461737284532700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/6922461737284532700'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html?showComment=1232208600000#c6922461737284532700' title=''/><author><name>Amy Iris</name><uri>http://www.blogger.com/profile/04120694276386973076</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_BtbNAV5zYlA/SWR80hPRc7I/AAAAAAAAAAM/hcI4P18FNSQ/S220/portrait.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html' ref='tag:blogger.com,1999:blog-6522435382991189973.post-8838381962894988889' source='http://www.blogger.com/feeds/6522435382991189973/posts/default/8838381962894988889' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1957971080'/></entry><entry><id>tag:blogger.com,1999:blog-6522435382991189973.post-737841094356888614</id><published>2009-01-16T12:54:00.000-08:00</published><updated>2009-01-16T12:54:00.000-08:00</updated><title type='text'>Kumar, &lt;br&gt;&lt;br&gt;Thanks!  I worked thru the urllib2 ...</title><content type='html'>Kumar, &lt;BR/&gt;&lt;BR/&gt;Thanks!  I worked thru the urllib2 issue, but I don't know enough of Python yet for the other.&lt;BR/&gt;&lt;BR/&gt;Your suggestion to install 2.6 is probably better.  I've got several old library books from 1999 - 2004 and have had some problems because of the changes.  BTW, like your site!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/737841094356888614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/737841094356888614'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html?showComment=1232139240000#c737841094356888614' title=''/><author><name>Steve Oldner</name><uri>http://www.blogger.com/profile/17534181345277748677</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08460949145597236755'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_plAVJZrRlto/STghE0icyGI/AAAAAAAAADA/i4F_51KfmBI/S220/steves_image.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html' ref='tag:blogger.com,1999:blog-6522435382991189973.post-8838381962894988889' source='http://www.blogger.com/feeds/6522435382991189973/posts/default/8838381962894988889' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-956320209'/></entry><entry><id>tag:blogger.com,1999:blog-6522435382991189973.post-3372186533909281203</id><published>2009-01-16T12:48:00.000-08:00</published><updated>2009-01-16T12:48:00.000-08:00</updated><title type='text'>This code won't work in Python 3.0 as-is.  Raw byt...</title><content type='html'>This code won't work in Python 3.0 as-is.  Raw bytes are a little different and urllib (no longer called urllib2) is different.  You can read all about it in http://docs.python.org/dev/3.0/whatsnew/3.0.html or just install Python 2.6 (both can co-exist peacefully).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/3372186533909281203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/3372186533909281203'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html?showComment=1232138880000#c3372186533909281203' title=''/><author><name>kumar</name><uri>http://www.blogger.com/profile/18371805776129363077</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_KhanQuXqWMA/SV5KpNBWDcI/AAAAAAAAAAY/d0I3gnfm494/S220/kumar-avatar-mac-glasses.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html' ref='tag:blogger.com,1999:blog-6522435382991189973.post-8838381962894988889' source='http://www.blogger.com/feeds/6522435382991189973/posts/default/8838381962894988889' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1660650636'/></entry><entry><id>tag:blogger.com,1999:blog-6522435382991189973.post-1480356425445973236</id><published>2009-01-16T12:39:00.000-08:00</published><updated>2009-01-16T12:39:00.000-08:00</updated><title type='text'>Well, enough for today.  Now I've got an error in ...</title><content type='html'>Well, enough for today.  Now I've got an error in the 1st f=re.findall line.&lt;BR/&gt; Traceback (most recent call last):...&lt;BR/&gt;  File "D:\Python30\lib\re.py", line 190, in findall&lt;BR/&gt;    return _compile(pattern, flags).findall(string)&lt;BR/&gt;TypeError: can't use a string pattern on a bytes-like object</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/1480356425445973236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/1480356425445973236'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html?showComment=1232138340000#c1480356425445973236' title=''/><author><name>Steve Oldner</name><uri>http://www.blogger.com/profile/17534181345277748677</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08460949145597236755'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_plAVJZrRlto/STghE0icyGI/AAAAAAAAADA/i4F_51KfmBI/S220/steves_image.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html' ref='tag:blogger.com,1999:blog-6522435382991189973.post-8838381962894988889' source='http://www.blogger.com/feeds/6522435382991189973/posts/default/8838381962894988889' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-956320209'/></entry><entry><id>tag:blogger.com,1999:blog-6522435382991189973.post-1800221103459824227</id><published>2009-01-16T11:30:00.000-08:00</published><updated>2009-01-16T11:30:00.000-08:00</updated><title type='text'>Okay, please help the newbie.&lt;br&gt;I using Python3 a...</title><content type='html'>Okay, please help the newbie.&lt;BR/&gt;I using Python3 and do not have the urllib2 module.  So where can I get it?&lt;BR/&gt;&lt;BR/&gt;Thanks,</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/1800221103459824227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/1800221103459824227'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html?showComment=1232134200000#c1800221103459824227' title=''/><author><name>Steve Oldner</name><uri>http://www.blogger.com/profile/17534181345277748677</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08460949145597236755'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_plAVJZrRlto/STghE0icyGI/AAAAAAAAADA/i4F_51KfmBI/S220/steves_image.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html' ref='tag:blogger.com,1999:blog-6522435382991189973.post-8838381962894988889' source='http://www.blogger.com/feeds/6522435382991189973/posts/default/8838381962894988889' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-956320209'/></entry><entry><id>tag:blogger.com,1999:blog-6522435382991189973.post-360196155646200351</id><published>2009-01-16T10:36:00.000-08:00</published><updated>2009-01-16T10:36:00.000-08:00</updated><title type='text'>Well, I'm a new Python programmer, still going thr...</title><content type='html'>Well, I'm a new Python programmer, still going thru the tutorials.  All I can say is WOW! and Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/360196155646200351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/360196155646200351'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html?showComment=1232130960000#c360196155646200351' title=''/><author><name>Steve Oldner</name><uri>http://www.blogger.com/profile/17534181345277748677</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08460949145597236755'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_plAVJZrRlto/STghE0icyGI/AAAAAAAAADA/i4F_51KfmBI/S220/steves_image.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html' ref='tag:blogger.com,1999:blog-6522435382991189973.post-8838381962894988889' source='http://www.blogger.com/feeds/6522435382991189973/posts/default/8838381962894988889' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-956320209'/></entry><entry><id>tag:blogger.com,1999:blog-6522435382991189973.post-5542399129974932759</id><published>2009-01-14T08:30:00.000-08:00</published><updated>2009-01-14T08:30:00.000-08:00</updated><title type='text'>Kumar-&lt;br&gt;Thanks for spoiling my next post!  :)&lt;br...</title><content type='html'>Kumar-&lt;BR/&gt;Thanks for spoiling my next post!  :)&lt;BR/&gt;&lt;BR/&gt;Yes, Amy Iris uses the Twitter API extensively.  She's used the PythonTwitter API software from the Google Code library.&lt;BR/&gt;&lt;BR/&gt;I thought the HTML parsing would be a good, readable example that the new Python programmer could make some sense out of.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/5542399129974932759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/5542399129974932759'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html?showComment=1231950600000#c5542399129974932759' title=''/><author><name>Amy Iris</name><uri>http://www.blogger.com/profile/04120694276386973076</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_BtbNAV5zYlA/SWR80hPRc7I/AAAAAAAAAAM/hcI4P18FNSQ/S220/portrait.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html' ref='tag:blogger.com,1999:blog-6522435382991189973.post-8838381962894988889' source='http://www.blogger.com/feeds/6522435382991189973/posts/default/8838381962894988889' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1957971080'/></entry><entry><id>tag:blogger.com,1999:blog-6522435382991189973.post-2989804719860765926</id><published>2009-01-14T08:11:00.000-08:00</published><updated>2009-01-14T08:11:00.000-08:00</updated><title type='text'>Hi Amy, that&amp;#39;s a pretty neat idea.  I follow a...</title><content type='html'>Hi Amy, that&amp;#39;s a pretty neat idea.  I follow a few automated feeds that mine twitter for music speak.  As for your strategy, there is actually an easier way and one that is a bit more &amp;quot;endorsed&amp;quot; by the twitter servers.  It&amp;#39;s an API you can use to get data instead of HTML which is much easier to parse.&lt;BR/&gt;&lt;BR/&gt;http://dev.twitter.com/2008/10/we-got-data.html&lt;BR/&gt;http://apiwiki.twitter.com/Search+API+Documentation&lt;BR/&gt;&lt;BR/&gt;Here is a quick example using the simplejson library:&lt;BR/&gt;&lt;BR/&gt;&amp;gt;&amp;gt;&amp;gt; import simplejson, urllib2&lt;BR/&gt;&amp;gt;&amp;gt;&amp;gt; f = urllib2.urlopen(&amp;#39;http://search.twitter.com/search.json?q=python+programming&amp;#39;)&lt;BR/&gt;&amp;gt;&amp;gt;&amp;gt; d = simplejson.load(f)&lt;BR/&gt;&amp;gt;&amp;gt;&amp;gt; d[&amp;#39;results&amp;#39;][0][&amp;#39;text&amp;#39;]&lt;BR/&gt;u&amp;#39;RT @pet3r @M4r14nn4 Decrease in Python programming jobs during recession second smallest of all languages... 1st was Lisp http://bit.ly/Kydj&amp;#39;&lt;BR/&gt;&amp;gt;&amp;gt;&amp;gt; d[&amp;#39;results&amp;#39;][0][&amp;#39;from_user&amp;#39;]&lt;BR/&gt;u&amp;#39;QuotdPython&amp;#39;&lt;BR/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;BR/&gt;&lt;BR/&gt;have fun!&lt;BR/&gt;&lt;BR/&gt;PS. unfortunately a recession-related post was indeed the first result (I didn&amp;#39;t cherry pick that)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/2989804719860765926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6522435382991189973/8838381962894988889/comments/default/2989804719860765926'/><link rel='alternate' type='text/html' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html?showComment=1231949460000#c2989804719860765926' title=''/><author><name>kumar</name><uri>http://www.blogger.com/profile/18371805776129363077</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_KhanQuXqWMA/SV5KpNBWDcI/AAAAAAAAAAY/d0I3gnfm494/S220/kumar-avatar-mac-glasses.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.amyiris.com/2009/01/twitter-automations-with-python-scripts.html' ref='tag:blogger.com,1999:blog-6522435382991189973.post-8838381962894988889' source='http://www.blogger.com/feeds/6522435382991189973/posts/default/8838381962894988889' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1660650636'/></entry></feed>
