Example #1
0
def bbs():
    # print request.method
    # print request.form
    if request.method == 'POST':
        msg = request.form.to_dict()
        print msg
        message.save(msg)
    return str(message.load(), messages=message)
Example #2
0
def bbs():
    # print request.method
    # print request.form
    if request.method == 'POST':
        msg = request.form.to_dict()
        print msg
        message.save(msg)
    return str(message.load(), messages=message)
Example #3
0
 def GET(self):
     for i in range(703, 0, -1):
         f = file('/var/www/fanfou/treeholes/' + str(i) + '.xml')
         xml = f.read()
         f.close()
         xml = etree.fromstring(xml)
         for j in range(len(xml) - 1, -1, -1):
             talk = xml[j][0].text.encode('utf-8')
             message.save(talk, 0)
Example #4
0
File: xml.py Project: Demodi/fanfou
 def GET(self):
     for i in range (703,0,-1):
         f   = file('/var/www/fanfou/treeholes/'+str(i)+'.xml')
         xml = f.read()
         f.close()
         xml = etree.fromstring(xml)
         for j in range(len(xml)-1,-1,-1):
             talk = xml[j][0].text.encode('utf-8')
             message.save(talk,0)
Example #5
0
def directmsg():
    xml = api.get('direct_messages/inbox')
    if xml:
        xml    = etree.fromstring(xml)
        num    = len(xml)
        if num>0:
            for i in range(num):
                id     = xml[i][0].text
                msg    = xml[i][1].text
                message.save(msg,2)
                code   = api.post('direct_messages/destroy',id=id)
                while code != 1:code,xml = api.fanfou('direct_messages/destroy',{'id':id})