Mike Verdone [Thu, 18 Apr 2013 15:12:11 +0000 (08:12 -0700)]
Merge pull request #138 from DarkDefender/master
Fix twitter stream under python 3
This fixes the "AttributeError: '_io.BufferedReader' object has no attribute '_sock'" error when trying to create a twitter stream with python3.
There are two issues (#70 and #108) that are fixed with this commit.
I have written a twitter script in python 3 with your twitter lib so I would be really glad if you can merge this and then create a new point release of the lib.
That way I can release the script without having to tell the users to manually patch the twitter lib.
I'm sorry if you've already read my reply to #108. But I would really like this to get merged and released ASAP.
Mike Verdone [Mon, 25 Mar 2013 19:37:48 +0000 (12:37 -0700)]
Merge pull request #134 from pykler/master
Being safe looking for content-encoding header
I managed to bump into a situation with stream.twitter.com where the content encoding header was not in the headers ... so I am making the check more robust to handle the case where the header is not there.
@sixohsix can you consider merging this in before the micro version bump.
Mike Verdone [Sun, 24 Mar 2013 17:46:16 +0000 (10:46 -0700)]
Merge pull request #125 from MrMitch/syntax-highlighting
Make code blocks use syntax highlighting in README
Make code blocks use syntax highlighting so they are more eye-friendly
Also make URL be turned into `<a></a>` markup
Mike Verdone [Sun, 24 Mar 2013 17:23:11 +0000 (10:23 -0700)]
Merge pull request #131 from pykler/master
With Twitter 1.1 an invalid oauth raises httplib.IncompleteRead
An exception is happening in the TwitterHTTPError's __init__ when it is trying to read twitter's error message. This patch catches that error (IncompleteRead Error) and handles it.
Also included in this pull request is a test case to demonstrate this error as well as a runner.py file to help run all the tests.
Mike Verdone [Fri, 15 Feb 2013 15:10:28 +0000 (07:10 -0800)]
Merge pull request #124 from Adapptor/incompleteread
TwitterCall._handle_response(): try to recover from httplib.IncompleteRead
Use IncompleteRead.partial in the hope that what's there is actually complete.
Mike Verdone [Fri, 15 Feb 2013 14:55:12 +0000 (06:55 -0800)]
Merge pull request #122 from patricksmith/update-readme
Update README example code
Updates the examples in the README because of changes to the Twitter API. The changes were basically copied from a similar commit to the API docs: https://github.com/sixohsix/twitter/commit/58ccea4e1489a735d2b01bcdd45677b2c4374f00.
Mike Verdone [Sat, 2 Feb 2013 13:57:42 +0000 (05:57 -0800)]
Merge pull request #118 from DracoThuban/patch-1
Update twitter/follow.py
Sometimes Twitter returns a list of any userID without user.
Users blocked or suspended? I don't know.
This modification prevents the script to stop and return an incomplete list.
Mike Verdone [Sat, 2 Feb 2013 13:56:06 +0000 (05:56 -0800)]
Merge pull request #119 from geeknik/master
Update BOT_VERSION in twitter/ircbot.py from 1.6.1 to 1.9.1
I figured this was an oversight, so I updated BOT_VERSION from 1.6.1 to 1.9.1 to match the version of the base package.
DracoThuban [Tue, 29 Jan 2013 09:56:03 +0000 (04:26 -0530)]
Update twitter/follow.py
Sometimes Twitter returns a list of any user without ID.
Users blocked or suspended? I do not know.
This modification prevents the script to stop and return an incomplete list.
Chris Cosby [Wed, 16 Jan 2013 22:53:14 +0000 (17:53 -0500)]
Add better formatting to status output.
Use HTMLparser to convert &blah; correctly
If ansi output, bold #hashtags and underline @profiles
Enable ansi formatting when stdout isn't a tty. I needed this for use
with geektool.
Mike Verdone [Tue, 22 Jan 2013 11:46:35 +0000 (03:46 -0800)]
Merge pull request #110 from anmarmansur/master
Fix Issue #60 can't write config file on Windows
This fixes the problem by writing the files in the correct location (user home folder) on Windows rather than the root of the system drive which:
1. Requires unnecessary admin rights elevation
2. Will overwrite other users' settings and tokens
Anmar Mansur [Fri, 11 Jan 2013 17:50:38 +0000 (10:50 -0700)]
Fix Issue #60 can't write config file on Windows
Windows doesn't have a HOME environment variable. The config file ends up being written to the root of system drive, hence the need for admin rights. Windows does however define a USERPROFILE environment variable that points correctly to the logged in user's profile home folder where most Python programs store their settings. Tested on Windows 7 x64 and Windows 8 x64.
Anmar Mansur [Fri, 11 Jan 2013 17:46:50 +0000 (10:46 -0700)]
Fix Issue #60 can't write config file on Windows
Windows doesn't have a HOME environment variable. The config file ends up being written to the root of system drive, hence the need for admin rights. Windows does however define a USERPROFILE environment variable that points correctly to the logged in user's profile home folder where most Python programs store their settings. Tested on Windows 7 x64 and Windows 8 x64.
Mike Verdone [Tue, 11 Dec 2012 14:02:56 +0000 (06:02 -0800)]
Merge pull request #106 from edavis/add-timeout-to-stream
stream: Include _timeout parameter in _handle_response
In a5aab11 (and renamed in 8fd7289d), \_handle_response began receiving
a \_timeout parameter when invoked via TwitterCall.__call__.
The _handle_response method in api.py was updated to reflect this, but
not the two (TwitterStreamCall, TwitterStreamCallNonBlocking) in
stream.py.
This commit adds _timeout to the two streaming classes to accommodate
the changes.
Mike Verdone [Fri, 28 Sep 2012 13:36:41 +0000 (06:36 -0700)]
Merge pull request #87 from hugovk/master
Added options for archiving mentions and favorites
I've added the following options to archiver.py:
```
-m --mentions <file> archive own mentions instead of timeline into
given file name (requires OAuth, max 800 statuses)
-v --favorites archive user's favorites instead of timeline
```
This lets me periodically backup all my tweets, favorites and mentions with a batch file something like this:
Hugo [Mon, 24 Sep 2012 21:12:57 +0000 (00:12 +0300)]
Aded options for archiving mentions and favorites.
-m --mentions <file> archive own mentions instead of timeline into
given file name (requires OAuth, max 800 statuses)
-v --favorites archive user's favorites instead of timeline