'Parse Tweets into the CMS Module'

@staticmethod
def parse_tweet(message):

    db = current.db
    s3db = current.s3db
    table = s3db.msg_twitter
    record = db((table.message_id == message.message_id)).select(table.channel_id, table.from_address, table.body, table.date, limitby=(0, 1)).first()
    if (not record):
        return
    channel_id = record.channel_id
    post_table = s3db.cms_post
    body = record.body
    exists = db((post_table.body == body)).select(post_table.id, limitby=(0, 1)).first()
    if exists:
        post_id = exists.id
        db((post_table.id == post_id)).update(body=body, created_on=record.date)
    else:
        table = db.cms_series
        series = db((table.name == 'News')).select(table.id, cache=s3db.cache, limitby=(0, 1)).first()
        try:
            series_id = series.id
        except:
            raise KeyError('News    Series    not    present    in    CMS    module')
        post_id = post_table.insert(body=body, created_on=record.date, series_id=series_id, mci=1)
        record = dict(id=post_id)
        s3db.update_super(post_table, record)
    return
