本文整理匯總了Python中Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper.getRemoteContentInfoByUrllib方法的典型用法代碼示例。如果您正苦於以下問題:Python DMHelper.getRemoteContentInfoByUrllib方法的具體用法?Python DMHelper.getRemoteContentInfoByUrllib怎麽用?Python DMHelper.getRemoteContentInfoByUrllib使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper
的用法示例。
在下文中一共展示了DMHelper.getRemoteContentInfoByUrllib方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: start
# 需要導入模塊: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh import DMHelper [as 別名]
# 或者: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper import getRemoteContentInfoByUrllib [as 別名]
def start(self, url, filePath, params = {}):
self.url = url
self.filePath = filePath
self.downloaderParams = params
self.fileExtension = '' # should be implemented in future
sts,remoteInfo = DMHelper.getRemoteContentInfoByUrllib(url, params)
if False == sts:
return BaseDownloader.CODE_WRONG_LINK
else:
self.remoteFileSize = int(remoteInfo.get('Content-Length', '-1'))
sts = self._start()
if sts == BaseDownloader.CODE_OK:
self.onStart()
return sts