我激动啊 所以第一时间弄了个天气预告的脚本。瓦咔咔很顺利的收到了天气报告接口用的还是我写的那个fetion,日后可以完善它为大伙提供免费的短信提醒,GAE帅呆了,今天终于给支持JAVA了,兴奋啊!

怎么使用就点击这里吧,瓦咔咔

/sitelinks
daily summary job
every 24 hours (Asia/Shanghai)
Hasn’t run yet

March 27th, 2009

更新qq2009去广告的方法

3 Comments, test, by zay,

下载这个Advertisement.rar(80.1 KB)文件替换*:\Program Files\Tencent\QQ2009\Plugin\Com.Tencent.Advertisement\bin下面的Advertisement.dll

该dll已经被俺处理鸟……放心无毒!

昨天花了点时间使zayfetion支持把gmail给绑定在一起,免去输入密码的麻烦不过还不是很适合新手使用,不过说实在也是自己用而已,如果api支持可以导入gmail的contacts的话那么就好方便了,现在每次都得复制联系人的号码。
这次修改主要修改了urlfetch超时的错误,还有对中文的支持,用了才发现python自己的urllib2无论是POST还是GET都是无法提交已经转utf-8的中文字符,老是抛出阿斯科码的烦人东西,于是乎还是用了Google提供的apiPOST发送数据到服务器(详细自己查doc)

result = urlfetch.fetch(url=url,
payload=data,
method=urlfetch.POST)

以下是绑定的登录界面http://zayfetion.appspot.com/sign

后续:
在holisp同学的帮助下成功的把fetion移植到了GAE实现短信发送服务,当然这次使用的不再是飞信的第三方api接口,因为相当的不稳定,现在实现了天气预报实时通知,解决了不稳定的问题!日后就可以完善fetion天气预报的项目了……
用的是cocobear分享的pyfetion

March 24th, 2009

web版飞信

3 Comments, 介绍, by zay,

http://zayfetion.appspot.com/
因为校园网根本上不了飞信,网上的张大哥http://blog.s135.com/fetion_api/那里得到了api的接口写个方便我发飞信的应用,目前并不支持导入好友,也不支持记录密码不过很方便滴……

这个我也不知道是否移动官方的api接口,不放心的朋友还是考虑下

March 16th, 2009

@edu.cn赶紧来抢吧

No Comments, 介绍, by zay,

http://zaylinks.appspot.com/QtYOSPbfe9xC

ps:微软学院的服务器用的不是iis……是“阿帕奇”

March 15th, 2009

停止发放psiphon邀请

15 Comments, 介绍, by zay,

想要的话就留言吧…

这个已经被墙了

停止发放psiphon邀请

March 13th, 2009

tinylinks源代码完工鸟

No Comments, python, by zay,

from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.api import urlfetch
import string,cgi,wsgiref.handlers
from random import Random

class Links(db.Model):
uuid = db.StringProperty()
content = db.StringProperty()
date = db.DateTimeProperty(auto_now_add=True)

class ViewHandler(webapp.RequestHandler):
def get(self,uuid):
try:
link = db.GqlQuery(”select * from Links where uuid =:id”,id=uuid).fetch(1)[0]
if link is not None:
self.response.out.write(’<html><body><head>’)
self.response.out.write(”’<meta http-equiv=”refresh” content=”0;url=%s”>”’%link.content)
self.response.out.write(”’</head><div class=”entry”><p>Waiting<br /></div></body></html>”’)
return
else:
return self.error(404)
except:
return self.response.out.write(”ERROR”)

class Viewall(webapp.RequestHandler):
def get(self):
self.response.out.write(’<html><body>’)
id= ”.join( Random().sample( string.letters + string.digits, 12) )
self.response.out.write(”"”
<form action=”/” method=”post”>
<div><label>Photo address:</label></div>
<div><textarea name=”content” rows=”3″ cols=”40″></textarea></div>
<div><textarea name=”uuid” rows=”2″ cols=”10″>%s</textarea></div>
<div><input type=”submit” value=”Submit”></div>
</form>”"”%str(id))
photo = db.GqlQuery(”SELECT * FROM Links ORDER BY date DESC LIMIT 30″).fetch(30)
for p in photo:
self.response.out.write(”<div>%s</div>” %p.uuid)
self.response.out.write(”"”</body></html>”"”)

def post(self):
site = cgi.escape(self.request.get(’content’))
uuid = cgi.escape(self.request.get(’uuid’))
result = urlfetch.fetch(str(site))
if result.status_code == 200:
link = Links()
link.uuid = uuid
link.content = str(site)
link.put()
self.response.out.write(’http://zaylinks.appspot.com/’+str(uuid))
else:
self.response.out.write(”FAIL”)
def main():
application = webapp.WSGIApplication([
('/(?P<uuid>\w+)',ViewHandler),
('/',Viewall)
],debug=True)
wsgiref.handlers.CGIHandler().run(application)

if __name__ == “__main__”:
main()

无聊写了个tinylinks的小程序,因为还在断网中没来得及上传到google,网址很长的话可以考虑用这个,记得tiny好像封了中国的用户,不知道现在可以用了没,可以上网的话就把地址加到链接,很郁闷ghs又被封了,现在发表自己的python伪代码:
import google
class gql(db)
class tiny
post()

class onetiny
get()
class main()
getform()

更新:完工鸟http://zaylinks.appspot.com/

写了个python脚本把整个小说给过滤出来,因为服务器速度太慢我等用国外的服务器干这重体力活,因为学校登录国外的服务器实在是慢。
于是乎我登录了zaykl.co.cc再ssh登录到国外的服务器,运行脚本把小说给下载下来,然后scp下载回来zaykl里面再转到网站目录里面开迅雷下载!

这个校园网的网速真的快把我给逼疯了……

February 13th, 2009

Google sync出错

1 Comment, google, by zay,

555刚才一下子冲动 把contacts给删除了再打算同步 结果还是失败,提示找不到服务器,郁闷啊
谁知道gtalk的联系人都给删除了,幸亏Google sync同步了我另外的一个帐号,否则联系全丢了

很郁闷同是Google account 为什么一个不能同步另外一个却可以同步,我没弄什么啊……