예제 #1
0
 def getServices(self):
     '''get game services'''
     client = RemotingService('http://xiaonei.paopaoyu.cn/gateway/')
     client.amf_version=0
     client.client_type=3
     client.strict=True
     client.request_number=self.id
     self.id+=1
     client.addHTTPHeader('Referer',self.reffre)
     client.addHTTPHeader('Cookie:',self.cookie)
     client.user_agent="Mozilla-xx/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.1.3) Gecko/20090824 waigua"
     service = client.getService('gameService')
     return service
예제 #2
0
파일: paopaoyu.py 프로젝트: andelf/paopaoyu
        break
    except:
        print u"登录失败, 重试."
        continue
else:
    print u"你比渔民杯具, 谢谢."
    sys.exit(-1)

print u"获得 Uid:", uid

# AMF 连接设置
client = RemotingService("http://xiaonei.paopaoyu.cn/gateway/")
client.addHTTPHeader('Referer',  refer)
client.addHTTPHeader('Connection', "close")
client.addHTTPHeader('Cookie', cookie)
client.user_agent = user_agent 
#"Mozilla/5.0 (X11; Linux mips; U; zh-cn) Gecko/20091010 BeiJu/0.0.1"

membersService = client.getService("membersService")
productsService = client.getService("productsService") # // 鱼市
gameService = client.getService("gameService")  # // 抓鱼
faqsService = client.getService("faqsService") # // FAQ, 暂时没用
spacesService = client.getService("spacesService") # //
almanacService = client.getService("almanacService") # // 图鉴
inviteService = client.getService("inviteService") # // 邀请
pubseaService = client.getService("pubseaService") # //
syntheticService = client.getService("syntheticService") # //F**k it

# 杯具, 连接封装, 搞定泡泡鱼卡的问题

def req_safe(servicename, methodname, *args):