本文整理汇总了Python中utils.downloadVideo函数的典型用法代码示例。如果您正苦于以下问题:Python downloadVideo函数的具体用法?Python downloadVideo怎么用?Python downloadVideo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了downloadVideo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BGPlayvid
def BGPlayvid(url, name, download=None):
videopage = utils.getHtml(url, "")
videopage = json.loads(videopage)
if not videopage["240p"] == None:
url = videopage["240p"].encode("utf8")
if not videopage["480p"] == None:
url = videopage["480p"].encode("utf8")
if not videopage["720p"] == None:
url = videopage["720p"].encode("utf8")
url = url.replace("{DATA_MARKERS}", "data=pc.DE")
if not url.startswith("http:"):
url = "https:" + url
key = re.compile("/key=(.*?)%2Cend", re.DOTALL | re.IGNORECASE).findall(url)[0]
decryptedkey = decrypt_key(key)
videourl = url.replace(key, decryptedkey)
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo("video", {"Title": name, "Genre": "Porn"})
listitem.setProperty("IsPlayable", "true")
if int(sys.argv[1]) == -1:
pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
pl.clear()
pl.add(videourl, listitem)
xbmc.Player().play(pl)
else:
listitem.setPath(str(videourl))
xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
示例2: BGPlayvid
def BGPlayvid(url, name, download=None):
videopage = utils.getHtml(url, '')
match = re.compile("'720p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
if not match:
match = re.compile("'480p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
if not match:
match = re.compile("'240p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
if match:
videourl = match[0]
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
listitem.setProperty("IsPlayable","true")
if int(sys.argv[1]) == -1:
pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
pl.clear()
pl.add(videourl, listitem)
xbmc.Player().play(pl)
#xbmc.Player().play(videourl, listitem)
else:
listitem.setPath(str(videourl))
xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
示例3: Playvid
def Playvid(url, name, download=None):
listhtml = utils.getHtml2(url)
listhtml = utils.unescapes(listhtml)
match480 = re.search(r'[[]480p[]]=([^"]*?)&video_vars', listhtml)
if match480: videourl = match480.group(1)
else:
match360 = re.search(r'[[]360p[]]=([^"]*?)&video_vars', listhtml)
videourl = match360.group(1)
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
listitem.setProperty("IsPlayable","true")
if int(sys.argv[1]) == -1:
pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
pl.clear()
pl.add(videourl, listitem)
xbmc.Player().play(pl)
else:
listitem.setPath(str(videourl))
xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
return
示例4: BGPlayvid
def BGPlayvid(url, name, download=None):
videopage = utils.getHtml2(url)
videopage = json.loads(videopage)
if not videopage["240p"] == None:
url = videopage["240p"].encode("utf8")
if not videopage["480p"] == None:
url = videopage["480p"].encode("utf8")
if not videopage["720p"] == None:
url = videopage["720p"].encode("utf8")
url = url.replace("{DATA_MARKERS}","data=pc.XX")
if not url.startswith("http:"): url = "http:" + url
videourl = url
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
listitem.setProperty("IsPlayable","true")
if int(sys.argv[1]) == -1:
pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
pl.clear()
pl.add(videourl, listitem)
xbmc.Player().play(pl)
else:
listitem.setPath(str(videourl))
xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
示例5: PHVideo
def PHVideo(url, name, download=None):
progress.create('Play video', 'Searching videofile.')
progress.update( 10, "", "Loading video page", "" )
Supported_hosts = ['Openload.io', 'StreamCloud', 'NowVideo', 'FlashX', 'www.flashx.tv', 'streamcloud.eu', 'streamin.to']
videopage = utils.getHtml(url, '')
match = re.compile(r'<li id="link-([^"]+).*?xs-12">\s+Watch it on ([\w\.]+)', re.DOTALL | re.IGNORECASE).findall(videopage)
if len(match) > 1:
sites = []
vidurls = []
for videourl, site in match:
if site in Supported_hosts:
sites.append(site)
vidurls.append(videourl)
if len(sites) == 1:
sitename = match[0][1]
siteurl = match[0][0]
else:
site = utils.dialog.select('Select video site', sites)
sitename = sites[site]
siteurl = vidurls[site]
else:
sitename = match[0][1]
siteurl = match[0][0]
outurl = "http://www.pornhive.tv/en/out/" + siteurl
progress.update( 20, "", "Getting video page", "" )
if 'loud' in sitename:
progress.update( 30, "", "Getting StreamCloud", "" )
playurl = getStreamCloud(outurl)
elif "lash" in sitename:
progress.update( 30, "", "Getting FlashX", "" )
playurl = getFlashX(outurl)
elif sitename == "NowVideo":
progress.update( 30, "", "Getting NowVideo", "" )
playurl = getNowVideo(outurl)
elif "Openload" in sitename:
progress.update( 30, "", "Getting Openload", "" )
progress.close()
utils.PLAYVIDEO(outurl, name, download)
return
elif "streamin" in sitename:
progress.update( 30, "", "Getting Streamin", "" )
streaming = utils.getHtml(outurl, '')
outurl=re.compile("action='([^']+)'").findall(streaming)[0]
progress.close()
utils.playvideo(outurl, name, download)
return
else:
progress.close()
utils.dialog.ok('Sorry','This host is not supported.')
return
progress.update( 90, "", "Playing video", "" )
progress.close()
if download == 1:
utils.downloadVideo(playurl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
xbmc.Player().play(playurl, listitem)
示例6: playvid
def playvid():
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
xbmc.Player().play(videourl, listitem)
示例7: playvid
def playvid():
progress.close()
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo("video", {"Title": name, "Genre": "Porn"})
xbmc.Player().play(videourl, listitem)
示例8: Playvid
def Playvid(url, name, download=None):
videopage = utils.getHtml(url, "")
videourl = re.compile("video_url: '([^']+)", re.DOTALL | re.IGNORECASE).findall(videopage)
videourl = videourl[0]
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo("video", {"Title": name, "Genre": "Porn"})
xbmc.Player().play(videourl, listitem)
示例9: Playvid
def Playvid(url, name, download=None):
html = utils.getHtml(url, '')
videourl = re.compile("video_url: '([^']+)").findall(html)
videourl = videourl[0]
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
xbmc.Player().play(videourl, listitem)
示例10: NLPLAYVID
def NLPLAYVID(url,name, download=None):
videopage = utils.getHtml(url, '')
videourl = re.compile('<source src="([^"]+)"', re.DOTALL | re.IGNORECASE).findall(videopage)
videourl = videourl[0]
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
xbmc.Player().play(videourl, listitem)
示例11: TPPlayvid
def TPPlayvid(url, name, download=None):
videopage = utils.getHtml(url, '')
match = re.compile("url: '([^']+flv)'", re.DOTALL | re.IGNORECASE).findall(videopage)
if match:
videourl = match[0]
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
xbmc.Player().play(videourl, listitem)
示例12: Playvid
def Playvid(url, name, download=None):
videopage = utils.getHtml(url, pdreferer, headers, data='')
links = re.compile('<a href="([^"]+)" class="post_download_link clearfix">[^>]+>.*?(\d+p).*?<',
re.DOTALL | re.IGNORECASE).findall(videopage)
videourl = getVideoUrl(links)
videourl = utils.getVideoLink(videourl, url)
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
xbmc.Player().play(videourl, listitem)
示例13: Playvid
def Playvid(url, name, download=None):
print "mrsexe::Playvid " + url
html = utils.getHtml(url, '')
videourl = re.compile(r"src='(/inc/clic\.php\?video=.+?&cat=mrsex.+?)'").findall(html)
html = utils.getHtml('http://www.mrsexe.com/' + videourl[0], '')
videourls = re.compile(r"'file': \"(.+?)\",.+?'label': '(.+?)'", re.DOTALL).findall(html)
videourls = sorted(videourls, key=lambda tup: tup[1], reverse=True)
videourl = videourls[0][0]
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
xbmc.Player().play(videourl, listitem)
示例14: PTPlayvid
def PTPlayvid(url, name, download=None):
videopage = utils.getHtml(url, "")
match = re.compile("<filehd>([^<]+)<", re.DOTALL | re.IGNORECASE).findall(videopage)
match2 = re.compile("<file>([^<]+)<", re.DOTALL | re.IGNORECASE).findall(videopage)
try:
videourl = match[0]
except:
videourl = match2[0]
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo("video", {"Title": name, "Genre": "Porn"})
xbmc.Player().play(videourl, listitem)
示例15: Playvid
def Playvid(url, name, download=None):
videopage = utils.getHtml(url, '')
servervideo = re.compile("servervideo = '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
vpath = re.compile("path = '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
repp = re.compile(r"repp = codage\('([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
filee = re.compile("filee = '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)[0]
repp = hashlib.md5(repp).hexdigest()
videourl = servervideo + vpath + repp + filee
if download == 1:
utils.downloadVideo(videourl, name)
else:
iconimage = xbmc.getInfoImage("ListItem.Thumb")
listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
xbmc.Player().play(videourl, listitem)