Return to Snippet

Revision: 12502
at March 17, 2009 15:54 by tamuratetsuya


Initial Code
def getFollowers():
    #url作成
    followers=[]
    url = 'http://twitter.com/statuses/followers.xml'
    print >>sys.stderr,url
    base64string =b64encode("%s:%s" % (username, password))
    headers = {"Authorization": "Basic %s" % base64string}
    xml_result=urlfetch.fetch(url, payload='', method=urlfetch.POST, headers=headers).content
    for soup in BeautifulSoup(xml_result)('screen_name'):
        #print >>sys.stderr,soup(text = True)[0]
        followers.append(soup(text = True)[0])
    return followers

Initial URL

                                

Initial Description

                                

Initial Title
twitterで自分のfollowerを取得

Initial Tags
google, python, django

Initial Language
Python