本文整理汇总了Python中pandac.PandaModules.HTTPClient.getDocument方法的典型用法代码示例。如果您正苦于以下问题:Python HTTPClient.getDocument方法的具体用法?Python HTTPClient.getDocument怎么用?Python HTTPClient.getDocument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandac.PandaModules.HTTPClient
的用法示例。
在下文中一共展示了HTTPClient.getDocument方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getFunnelURL
# 需要导入模块: from pandac.PandaModules import HTTPClient [as 别名]
# 或者: from pandac.PandaModules.HTTPClient import getDocument [as 别名]
def getFunnelURL(self):
if patcherVer() == ['OFFLINE']:
return
if patcherVer() == []:
patcherHTTP = HTTPClient()
if checkParamFile() == None:
patcherDoc = patcherHTTP.getDocument(URLSpec('http://download.toontown.com/english/currentVersion/content/patcher.ver'))
vconGroup('w', self.cgRelease)
else:
patcherDoc = patcherHTTP.getDocument(URLSpec(checkParamFile()))
vconGroup('w', self.cgBeta)
rf = Ramfile()
patcherDoc.downloadToRam(rf)
self.patcherURL = rf.getData()
if self.patcherURL.find('FUNNEL_LOG') == -1:
patcherVer('w', 'OFFLINE')
return
self.patcherURL = self.patcherURL.split('\n')
del rf
del patcherDoc
del patcherHTTP
while self.patcherURL:
self.confLine = self.patcherURL.pop()
if self.confLine.find('FUNNEL_LOG=') != -1 and self.confLine.find('#FUNNEL_LOG=') == -1:
self.dynamicVRFunnel = self.confLine[11:].strip('\n')
patcherVer('w', self.confLine[11:].strip('\n'))
else:
self.dynamicVRFunnel = patcherVer()[0]
return