maintaince tools for sfjp magazine
Rev. | 18485328b7f68a9a533620d06a857452f5dbca9a |
---|---|
Tamanho | 486 bytes |
Hora | 2017-07-18 19:19:17 |
Autor | hylom |
Mensagem de Log | fix some codes
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
import json
import sys
sys.path.append('.')
from testconfig import config
from sfjpmagclient import MagClient
username = config["username"]
password = config["password"]
auth_user = config["auth_user"]
auth_pass = config["auth_pass"]
c = MagClient(username, password, auth_user, auth_pass)
ret = c.get_posts(dict(number=10))
print len(ret)
print ret[0]
for item in ret:
print item["post_title"], item["link"]