お世話になっております。 会社のネットワークは、プロキシサーバーを経由しないと外部サイトを参照できないようになっています。セキュリティ対策としては有効ですが、クラウドの恩恵を受けるには一工夫が必要です。今日は、python-twitter*1でプロキシサーバー突破に成功しました。 単純にプロキシサーバーを突破するには、こちらを御覧下さい。 しかし、残念ながらこの方法はpython-twitterには使えません。python-twitterは自分でurllib2.OpenerDirectorを構成しているからです。twitter.Api._GetOpener()が返すOpenerDirectorへ、ProxyHandlerとProxyBasicAuthHandlerを追加しなければいけません。対応したプログラムを以下に記載します。 # -*- coding: shift_jis -*- im