This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/python | |
#vim:fileencoding=utf-8 | |
import re | |
import twitter | |
def myApi(consumer_key, consumer_secret, access_token, access_token_secret): | |
api = twitter.Api(consumer_key, consumer_secret, access_token, access_token_secret) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/python | |
#vim:fileencoding=utf-8 | |
import time | |
import re | |
import twitter | |
class tweetDM: | |
def __init__(self, account, passwd, access_token_key, access_token_secret, id_file, user_file): | |
self.api = twitter.Api(account, passwd, access_token_key, access_token_secret) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/python | |
#vim:fileencoding=utf-8 | |
import re | |
import random | |
import urllib | |
import urllib2 | |
from BeautifulSoup import BeautifulSoup, NavigableString, Declaration, Comment | |
class markovTweet: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''機能一覧(Replyに反応)''' | |
おやすみ | |
oyasu = re.compile(u'おやすみ?|(寝|ね)る|グ(ン|ッド?)(ナイト?)|(眠|ねむ)い|[スヤリ]{3}|バタリ') | |
おはよう | |
oha = re.compile(u'おっはー|おはよ?う?|(起|お)き(まし|た)|起床|[ムクリ]{3}|朝') | |
エロイ質問 | |
shimo = re.compile(u'(下|シモ)ネタ|エロ|(質問|しつもん)あ(る|り|ん)(.*?)(\?|?)|セク(シャル)?ハラ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/python | |
#vim:fileencoding=utf-8 | |
import urllib2 | |
import re | |
from BeautifulSoup import BeautifulSoup | |
class Cinema: | |
def __init__(self): | |
url = 'http://www.allcinema.net/prog/index2.php' | |
self.soup = BeautifulSoup(urllib2.urlopen(url)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/python | |
#vim:fileencoding=utf-8 | |
import urllib2 | |
import re | |
from BeautifulSoup import BeautifulSoup | |
class Cookpad: | |
def __init__(self): | |
url = 'http://cookpad.com/recipe/recent' | |
self.soup = BeautifulSoup(urllib2.urlopen(url)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/python | |
#vim:fileencoding=utf-8 | |
''' | |
http://www.google.com/intl/ja/ime/cgiapi.html | |
>>>import google | |
>>>api = google.Api() | |
>>>result = api.ja('こんにちは') | |
>>>print result[0][1][1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/python | |
#vim:fileencoding=utf-8 | |
import cookielib | |
import re | |
import urllib | |
import urllib2 | |
import time | |
import twitter | |
import yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/python | |
#vim:fileencoding=utf-8 | |
import urllib2 | |
from BeautifulSoup import BeautifulSoup | |
import time | |
import twitter | |
import yaml | |
class Fav: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!~/lib/python | |
#vim:fileencoding=utf-8 | |
import time | |
import datetime | |
import re | |
import urllib | |
import urllib2 | |
import twitter | |
from BeautifulSoup import BeautifulSoup |
OlderNewer