本文整理汇总了Python中pyamf.remoting.client.RemotingService.user_agent方法的典型用法代码示例。如果您正苦于以下问题:Python RemotingService.user_agent方法的具体用法?Python RemotingService.user_agent怎么用?Python RemotingService.user_agent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyamf.remoting.client.RemotingService
的用法示例。
在下文中一共展示了RemotingService.user_agent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getServices
# 需要导入模块: from pyamf.remoting.client import RemotingService [as 别名]
# 或者: from pyamf.remoting.client.RemotingService import user_agent [as 别名]
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: RemotingService
# 需要导入模块: from pyamf.remoting.client import RemotingService [as 别名]
# 或者: from pyamf.remoting.client.RemotingService import user_agent [as 别名]
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") # //Fuck it
# 杯具, 连接封装, 搞定泡泡鱼卡的问题
def req_safe(servicename, methodname, *args):