/IPTVPlayer/hosts/hostXXX.py

https://gitlab.com/iptv-host-xxx/iptv-host-xxx · Python · 11358 lines · 10573 code · 466 blank · 319 comment · 3330 complexity · df1ac2a3841937ca54b5b8b07c90bb48 MD5 · raw file

  1. # -*- coding: utf-8 -*-
  2. ###################################################
  3. # LOCAL import
  4. ###################################################
  5. from Plugins.Extensions.IPTVPlayer.components.ihost import IHost, CDisplayListItem, RetHost, CUrlItem
  6. import Plugins.Extensions.IPTVPlayer.libs.pCommon as pCommon
  7. from Plugins.Extensions.IPTVPlayer.libs import ph
  8. from Plugins.Extensions.IPTVPlayer.tools.iptvtypes import strwithmeta
  9. from Plugins.Extensions.IPTVPlayer.tools.iptvtools import printDBG, printExc, CSearchHistoryHelper, CSelOneLink, GetTmpDir, GetCookieDir, iptv_system, GetPluginDir, byteify, rm
  10. from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh import DMHelper
  11. from Plugins.Extensions.IPTVPlayer.libs.urlparser import urlparser
  12. from Plugins.Extensions.IPTVPlayer.tools.iptvfilehost import IPTVFileHost
  13. from Plugins.Extensions.IPTVPlayer.components.iptvplayerinit import TranslateTXT as _, SetIPTVPlayerLastHostError, GetIPTVSleep, GetIPTVNotify
  14. from Plugins.Extensions.IPTVPlayer.libs.youtube_dl.utils import clean_html
  15. from Plugins.Extensions.IPTVPlayer.libs.urlparserhelper import decorateUrl, getDirectM3U8Playlist, unpackJSPlayerParams, TEAMCASTPL_decryptPlayerParams
  16. ###################################################
  17. # FOREIGN import
  18. ###################################################
  19. import re, urllib, urllib2, base64, math, hashlib, random
  20. try:
  21. import simplejson
  22. except:
  23. import json as simplejson
  24. from Tools.Directories import resolveFilename, SCOPE_PLUGINS
  25. from Components.config import config, ConfigSelection, ConfigYesNo, ConfigText, ConfigInteger, getConfigListEntry, ConfigPIN, ConfigDirectory
  26. from time import sleep, time as time_time
  27. from datetime import datetime
  28. from os import remove as os_remove, path as os_path, system as os_system
  29. import urlparse
  30. ###################################################
  31. # E2 GUI COMMPONENTS
  32. ###################################################
  33. from Plugins.Extensions.IPTVPlayer.tools.e2ijs import js_execute
  34. from Screens.MessageBox import MessageBox
  35. from Plugins.Extensions.IPTVPlayer.components.asynccall import MainSessionWrapper
  36. ###################################################
  37. # Config options for HOST
  38. ###################################################
  39. config.plugins.iptvplayer.xxxwymagajpin = ConfigYesNo(default = True)
  40. config.plugins.iptvplayer.xxxlist = ConfigDirectory(default = "/hdd/")
  41. config.plugins.iptvplayer.xxxsortuj = ConfigYesNo(default = True)
  42. config.plugins.iptvplayer.xxxsearch = ConfigYesNo(default = False)
  43. config.plugins.iptvplayer.xxxsortmfc = ConfigYesNo(default = False)
  44. config.plugins.iptvplayer.xxxsortall = ConfigYesNo(default = True)
  45. config.plugins.iptvplayer.camsoda = ConfigSelection(default="0", choices = [("0",_("https")), ("1",_("rtmp"))])
  46. config.plugins.iptvplayer.xhamstertag = ConfigYesNo(default = False)
  47. config.plugins.iptvplayer.chaturbate = ConfigSelection(default="", choices = [("",_("all")), ("female/",_("female")), ("couple/",_("couple")), ("trans/",_("trans")), ("male/",_("male"))])
  48. config.plugins.iptvplayer.cam4 = ConfigSelection(default="0", choices = [("0",_("https")), ("1",_("rtmp"))])
  49. config.plugins.iptvplayer.fotka = ConfigSelection(default="0", choices = [("0",_("https")), ("1",_("rtmp"))])
  50. config.plugins.iptvplayer.xxxupdate = ConfigYesNo(default = False)
  51. config.plugins.iptvplayer.xxxzbiornik = ConfigYesNo(default = False)
  52. config.plugins.iptvplayer.xxx4k = ConfigYesNo(default = False)
  53. config.plugins.iptvplayer.yourporn = ConfigInteger(4, (1, 99))
  54. config.plugins.iptvplayer.beeg = ConfigYesNo(default = True)
  55. def GetConfigList():
  56. optionList = []
  57. optionList.append( getConfigListEntry(_("Pin protection for plugin")+" :", config.plugins.iptvplayer.xxxwymagajpin ) )
  58. optionList.append( getConfigListEntry(_("Path to xxxlist.txt :"), config.plugins.iptvplayer.xxxlist) )
  59. optionList.append( getConfigListEntry(_("Sort xxxlist :"), config.plugins.iptvplayer.xxxsortuj) )
  60. optionList.append( getConfigListEntry(_("Sort Myfreecams :"), config.plugins.iptvplayer.xxxsortmfc) )
  61. optionList.append( getConfigListEntry(_("Global search :"), config.plugins.iptvplayer.xxxsearch) )
  62. optionList.append( getConfigListEntry(_("Global sort :"), config.plugins.iptvplayer.xxxsortall) )
  63. optionList.append( getConfigListEntry(_("CHATURBATE preferences :"), config.plugins.iptvplayer.chaturbate) )
  64. #optionList.append( getConfigListEntry(_("Cam4 stream :"), config.plugins.iptvplayer.cam4) )
  65. #optionList.append( getConfigListEntry(_("Camsoda stream :"), config.plugins.iptvplayer.camsoda) )
  66. #optionList.append( getConfigListEntry(_("Fotka.pl stream :"), config.plugins.iptvplayer.fotka) )
  67. optionList.append( getConfigListEntry(_("Add tags to XHAMSTER :"), config.plugins.iptvplayer.xhamstertag) )
  68. optionList.append( getConfigListEntry(_("Show Profiles in ZBIORNIK MINI :"), config.plugins.iptvplayer.xxxzbiornik) )
  69. optionList.append( getConfigListEntry(_("YOURPORN Server :"), config.plugins.iptvplayer.yourporn) )
  70. optionList.append( getConfigListEntry(_("Show changelog :"), config.plugins.iptvplayer.xxxupdate) )
  71. optionList.append( getConfigListEntry(_("BEEG FullHD :"), config.plugins.iptvplayer.beeg) )
  72. optionList.append( getConfigListEntry(_("Playback UHD :"), config.plugins.iptvplayer.xxx4k) )
  73. return optionList
  74. ###################################################
  75. ###################################################
  76. # Title of HOST
  77. ###################################################
  78. def gettytul():
  79. return 'XXX'
  80. class IPTVHost(IHost):
  81. LOGO_NAME = 'XXXlogo.png'
  82. PATH_TO_LOGO = resolveFilename(SCOPE_PLUGINS, 'Extensions/IPTVPlayer/icons/logos/' + LOGO_NAME )
  83. def __init__(self):
  84. printDBG( "init begin" )
  85. self.host = Host()
  86. self.prevIndex = []
  87. self.currList = []
  88. self.prevList = []
  89. printDBG( "init end" )
  90. def isProtectedByPinCode(self):
  91. return config.plugins.iptvplayer.xxxwymagajpin.value
  92. def getLogoPath(self):
  93. return RetHost(RetHost.OK, value = [self.PATH_TO_LOGO])
  94. def getInitList(self):
  95. printDBG( "getInitList begin" )
  96. self.prevIndex = []
  97. self.currList = self.host.getInitList()
  98. self.host.setCurrList(self.currList)
  99. self.prevList = []
  100. printDBG( "getInitList end" )
  101. return RetHost(RetHost.OK, value = self.currList)
  102. def getListForItem(self, Index = 0, refresh = 0, selItem = None):
  103. printDBG( "getListForItem begin" )
  104. self.prevIndex.append(Index)
  105. self.prevList.append(self.currList)
  106. self.currList = self.host.getListForItem(Index, refresh, selItem)
  107. printDBG( "getListForItem end" )
  108. return RetHost(RetHost.OK, value = self.currList)
  109. def getPrevList(self, refresh = 0):
  110. printDBG( "getPrevList begin" )
  111. if(len(self.prevList) > 0):
  112. self.prevIndex.pop()
  113. self.currList = self.prevList.pop()
  114. self.host.setCurrList(self.currList)
  115. printDBG( "getPrevList end OK" )
  116. return RetHost(RetHost.OK, value = self.currList)
  117. else:
  118. printDBG( "getPrevList end ERROR" )
  119. return RetHost(RetHost.ERROR, value = [])
  120. def getCurrentList(self, refresh = 0):
  121. printDBG( "getCurrentList begin" )
  122. printDBG( "getCurrentList end" )
  123. return RetHost(RetHost.OK, value = self.currList)
  124. def getLinksForVideo(self, Index = 0, item = None):
  125. return RetHost(RetHost.NOT_IMPLEMENTED, value = [])
  126. def getResolvedURL(self, url):
  127. printDBG( "getResolvedURL begin" )
  128. if url != None and url != '':
  129. ret = self.host.getResolvedURL(url)
  130. if ret != None and ret != '':
  131. printDBG( "getResolvedURL ret: "+str(ret))
  132. list = []
  133. list.append(ret)
  134. printDBG( "getResolvedURL end OK" )
  135. return RetHost(RetHost.OK, value = list)
  136. else:
  137. printDBG( "getResolvedURL end" )
  138. return RetHost(RetHost.NOT_IMPLEMENTED, value = [])
  139. else:
  140. printDBG( "getResolvedURL end" )
  141. return RetHost(RetHost.NOT_IMPLEMENTED, value = [])
  142. def getSearchResults(self, pattern, searchType = None):
  143. printDBG( "getSearchResults begin" )
  144. printDBG( "getSearchResults pattern: " +pattern)
  145. self.prevIndex.append(0)
  146. self.prevList.append(self.currList)
  147. self.currList = self.host.getSearchResults(pattern, searchType)
  148. printDBG( "getSearchResults end" )
  149. return RetHost(RetHost.OK, value = self.currList)
  150. ###################################################
  151. # Additional functions on class IPTVHost
  152. ###################################################
  153. class Host:
  154. XXXversion = "2020.05.02.0"
  155. XXXremote = "0.0.0.0"
  156. currList = []
  157. MAIN_URL = ''
  158. SEARCH_proc = ''
  159. def __init__(self):
  160. printDBG( 'Host __init__ begin' )
  161. self.cm = pCommon.common()
  162. self.up = urlparser()
  163. self.history = CSearchHistoryHelper('xxx')
  164. self.sessionEx = MainSessionWrapper()
  165. self.currList = []
  166. printDBG( 'Host __init__ end' )
  167. def setCurrList(self, list):
  168. printDBG( 'Host setCurrList begin' )
  169. self.currList = list
  170. printDBG( 'Host setCurrList end' )
  171. return
  172. def getInitList(self):
  173. printDBG( 'Host getInitList begin' )
  174. _url = 'https://gitlab.com/iptv-host-xxx/iptv-host-xxx/raw/master/IPTVPlayer/hosts/hostXXX.py'
  175. query_data = { 'url': _url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  176. try:
  177. data = self.cm.getURLRequestData(query_data)
  178. #printDBG( 'Host init data: '+data )
  179. r=self.cm.ph.getSearchGroups(data, '''XXXversion = ['"]([^"^']+?)['"]''', 1, True)[0]
  180. if r:
  181. printDBG( 'XXXremote = '+r )
  182. self.XXXremote=r
  183. except:
  184. printDBG( 'Host init query error' )
  185. self.currList = self.listsItems(-1, '', 'main-menu')
  186. printDBG( 'Host getInitList end' )
  187. return self.currList
  188. def getListForItem(self, Index = 0, refresh = 0, selItem = None):
  189. printDBG( 'Host getListForItem begin' )
  190. valTab = []
  191. if len(self.currList[Index].urlItems) == 0:
  192. return valTab
  193. valTab = self.listsItems(Index, self.currList[Index].urlItems[0], self.currList[Index].urlSeparateRequest)
  194. self.currList = valTab
  195. printDBG( 'Host getListForItem end' )
  196. return self.currList
  197. def getSearchResults(self, pattern, searchType = None):
  198. printDBG( "Host getSearchResults begin" )
  199. printDBG( "Host getSearchResults pattern: " +pattern)
  200. valTab = []
  201. valTab = self.listsItems(-1, pattern, 'SEARCH')
  202. self.currList = valTab
  203. printDBG( "Host getSearchResults end" )
  204. return self.currList
  205. def _cleanHtmlStr(self, str):
  206. str = str.replace('<', ' <').replace('\n', ' ').replace('\r', ' ').replace('\t', ' ')
  207. return clean_html(str).strip()
  208. def FullUrl(self, url):
  209. if url.startswith('//'):
  210. url = 'http:' + url
  211. return url
  212. def getPage(self, baseUrl, cookie_domain, cloud_domain, params={}, post_data=None):
  213. COOKIEFILE = os_path.join(GetCookieDir(), cookie_domain)
  214. self.USER_AGENT = 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36'
  215. self.HEADER = {'User-Agent': self.USER_AGENT, 'Accept': 'text/html'}
  216. params['cloudflare_params'] = {'domain':cloud_domain, 'cookie_file':COOKIEFILE, 'User-Agent':self.USER_AGENT}
  217. return self.cm.getPageCFProtection(baseUrl, params, post_data)
  218. def getPage4k(self, baseUrl, cookie_domain, cloud_domain, params={}, post_data=None):
  219. COOKIEFILE = os_path.join(GetCookieDir(), cookie_domain)
  220. self.USER_AGENT = 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0'
  221. def _getFullUrl(url):
  222. if self.cm.isValidUrl(url):
  223. return url
  224. else:
  225. return urlparse.urljoin(baseUrl, url)
  226. if params == {}: params = dict(self.defaultParams)
  227. params['cookie_items'] = {'xxx':'ok'}
  228. params['cloudflare_params'] = {'domain':cloud_domain, 'cookie_file':COOKIEFILE, 'User-Agent':self.USER_AGENT, 'full_url_handle':_getFullUrl}
  229. return self.cm.getPageCFProtection(baseUrl, params, post_data)
  230. def _getPage(self, url, addParams = {}, post_data = None):
  231. try:
  232. import httplib
  233. def patch_http_response_read(func):
  234. def inner(*args):
  235. try:
  236. return func(*args)
  237. except httplib.IncompleteRead, e:
  238. return e.partial
  239. return inner
  240. prev_read = httplib.HTTPResponse.read
  241. httplib.HTTPResponse.read = patch_http_response_read(httplib.HTTPResponse.read)
  242. except Exception: printExc()
  243. sts, data = self.cm.getPage(url, addParams, post_data)
  244. try: httplib.HTTPResponse.read = prev_read
  245. except Exception: printExc()
  246. return sts, data
  247. def get_Page(self, baseUrl, addParams={}, post_data=None):
  248. if addParams == {}: addParams = dict(self.defaultParams)
  249. return self.cm.getPage(baseUrl, addParams, post_data)
  250. def listsItems(self, Index, url, name = ''):
  251. printDBG( 'Host listsItems begin' )
  252. printDBG( 'Host listsItems url: '+url )
  253. valTab = []
  254. self.format4k = config.plugins.iptvplayer.xxx4k.value
  255. self.beegfullhd = config.plugins.iptvplayer.beeg.value
  256. if name == 'main-menu':
  257. printDBG( 'Host listsItems begin name='+name )
  258. if self.XXXversion <> self.XXXremote and self.XXXremote <> "0.0.0.0":
  259. valTab.append(CDisplayListItem('---UPDATE---','UPDATE MENU', CDisplayListItem.TYPE_CATEGORY, [''], 'UPDATE', '', None))
  260. valTab.append(CDisplayListItem('XHAMSTER', 'xhamster.com', CDisplayListItem.TYPE_CATEGORY, ['https://xhamster.com/categories'], 'xhamster','https://1000logos.net/wp-content/uploads/2018/12/xHamster-Logo-768x432.png', None))
  261. valTab.append(CDisplayListItem('HOME MOVIES TUBE', 'http://www.homemoviestube.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.homemoviestube.com/channels/'],'HomeMoviesTube', 'http://www.homemoviestube.com/images/logo.png', None))
  262. valTab.append(CDisplayListItem('ZBIORNIK MINI', 'https://mini.zbiornik.com', CDisplayListItem.TYPE_CATEGORY, ['https://mini.zbiornik.com/filmy'],'ZBIORNIKMINI', 'https://static.zbiornik.com/upimg/0160d9c44a354d20e81f0e6df5fe832e.jpg', None))
  263. valTab.append(CDisplayListItem('HCLIPS', 'http://www.hclips.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.hclips.com/categories/'],'hclips', 'https://i.pinimg.com/474x/d3/16/78/d31678f3c99564740ab5b097e7792927.jpg', None))
  264. valTab.append(CDisplayListItem('4TUBE', 'www.4tube.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.4tube.com/tags'], '4TUBE', 'http://cdn1.ht.ui.4tube.com/assets/img/layout/4tube-logo-1f503fd81c.png', None))
  265. valTab.append(CDisplayListItem('EPORNER', 'www.eporner.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.eporner.com/cats/'], 'eporner', 'http://static.eporner.com/new/logo.png', None))
  266. valTab.append(CDisplayListItem('TUBE8', 'www.tube8.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.tube8.com/categories.html'], 'tube8', 'http://cdn1.static.tube8.phncdn.com/images/t8logo.png', None))
  267. valTab.append(CDisplayListItem('YOUPORN', 'wwww.youporn.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.youporn.com/categories/'],'youporn', 'https://fs.ypncdn.com/cb/bundles/youpornwebfront/images/l_youporn_black.png?v=9b34af679da9f8f8279fb875c7bcea555a784ec3', None))
  268. valTab.append(CDisplayListItem('PORNHUB', 'www.pornhub.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.pornhub.com/categories'], 'pornhub', 'https://mk0onemorecupofd9ppb.kinstacdn.com/wp-content/uploads/2018/11/Make-Money-Pornhub.jpg', None))
  269. valTab.append(CDisplayListItem('HDPORN', 'www.hdporn.net', CDisplayListItem.TYPE_CATEGORY, ['http://www.hdporn.net/channels/'], 'hdporn', 'http://www.hdporn.com/gfx/logo.jpg', None))
  270. valTab.append(CDisplayListItem('REDTUBE', 'www.redtube.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.redtube.com/categories'], 'redtube', 'http://img02.redtubefiles.com/_thumbs/design/logo/redtube_260x52_black.png', None))
  271. valTab.append(CDisplayListItem('HENTAIGASM', 'hentaigasm.com', CDisplayListItem.TYPE_CATEGORY, ['http://hentaigasm.com'], 'hentaigasm','http://hentaigasm.com/wp-content/themes/detube/images/logo.png', None))
  272. valTab.append(CDisplayListItem('XVIDEOS', 'www.xvideos.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.xvideos.com'], 'xvideos', 'http://emblemsbf.com/img/31442.jpg', None))
  273. valTab.append(CDisplayListItem('XNXX', 'www.xnxx.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.xnxx.com'], 'xnxx', 'http://www.naughtyalysha.com/tgp/xnxx/xnxx-porn-recip.jpg', None))
  274. valTab.append(CDisplayListItem('BEEG', 'beeg.com', CDisplayListItem.TYPE_CATEGORY, ['https://beeg.com'], 'beeg', 'https://i.pinimg.com/474x/8e/89/91/8e89916e7e4d8c0b314d548578d4aba5.jpg', None))
  275. valTab.append(CDisplayListItem('PORNRABBIT', 'www.pornrabbit.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.pornrabbit.com/channels/'],'pornrabbit','https://www.pornrabbit.com/templates/pornrabbit/images/logo.png', None))
  276. valTab.append(CDisplayListItem('PORNHD', 'www.pornhd.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.pornhd.com/category'],'pornhd','https://pbs.twimg.com/profile_images/527104689444093952/PbRNZmMT_400x400.png', None))
  277. valTab.append(CDisplayListItem('AH-ME', 'www.ah-me.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.ah-me.com/channels.php'],'AH-ME','http://ahmestatic.fuckandcdn.com/ah-me/ahmestatic/v20/common/ah-me/img/logo.jpg', None))
  278. valTab.append(CDisplayListItem('AMATEURPORN', 'https://www.amateurporn.me', CDisplayListItem.TYPE_CATEGORY, ['https://www.amateurporn.me/categories/'],'AMATEURPORN', 'https://www.amateurporn.me/images/logo.png', None))
  279. valTab.append(CDisplayListItem('YOUJIZZ', 'http://www.youjizz.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.youjizz.com/categories'],'YOUJIZZ', 'http://www.sample-made.com/cms/content/uploads/2015/05/youjizz_logo-450x400.jpg', None))
  280. valTab.append(CDisplayListItem('DACHIX', 'http://www.dachix.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.dachix.com/categories'],'DACHIX', 'http://thumbs.dachix.com/images/dachixcom_logo_noir.png', None))
  281. valTab.append(CDisplayListItem('DRTUBER', 'http://www.drtuber.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.drtuber.com/categories'],'DRTUBER', 'http://static.drtuber.com/templates/frontend/mobile/images/logo.png', None))
  282. valTab.append(CDisplayListItem('TNAFLIX', 'https://www.tnaflix.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.tnaflix.com/categories'],'TNAFLIX', 'https://pbs.twimg.com/profile_images/1109542593/logo_400x400.png', None))
  283. #valTab.append(CDisplayListItem('EL-LADIES', 'http://www.el-ladies.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.el-ladies.com'],'EL-LADIES', 'http://www.el-ladies.com/img/v3/header-logo.jpg', None))
  284. valTab.append(CDisplayListItem('EXTREMETUBE', 'http://www.extremetube.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.extremetube.com/video-categories'],'EXTREMETUBE', 'http://www.wp-tube-plugin.com/feed-images/extremetube.png', None))
  285. valTab.append(CDisplayListItem('RUS.PORN', 'https://rusvidos.tv', CDisplayListItem.TYPE_CATEGORY, ['http://rus.porn/'],'RUSPORN', 'http://mixporn24.com/images/logo.png', None))
  286. valTab.append(CDisplayListItem('PORN720', 'http://porn720.net/', CDisplayListItem.TYPE_CATEGORY, ['http://porn720.net/'],'PORN720', 'http://porn720.net/wp-content/themes/porn720/img/logo.png', None))
  287. valTab.append(CDisplayListItem('PORNTREX', 'http://www.porntrex.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.porntrex.com/categories/'],'PORNTREX', 'https://www.porntrex.com/images/logo.png', None))
  288. valTab.append(CDisplayListItem('PORNDOE', 'http://www.porndoe.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.porndoe.com/categories'],'PORNDOE', 'https://sih.avn.com/1024x500/top/filters:extract_focal()/article-images/2015/4/593284/TopStory_BBD79930-DC94-11E4-8F7E-9046D33E6151.jpg', None))
  289. valTab.append(CDisplayListItem('PORNfromCZECH', 'http://www.pornfromczech.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.pornfromczech.com/'],'PORNFROMCZECH', 'https://www.bing.com/th?id=OIP.LA7c-hQkzRto2v_bqXV1MQHaBJ&pid=Api', None))
  290. valTab.append(CDisplayListItem('FILMYPORNO', 'http://www.filmyporno.tv', CDisplayListItem.TYPE_CATEGORY, ['http://www.filmyporno.tv/channels/'],'FILMYPORNO', 'http://www.filmyporno.tv/templates/default_tube2016/images/logo.png', None))
  291. valTab.append(CDisplayListItem('CLIPHUNTER', 'http://www.cliphunter.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.cliphunter.com/categories/'],'CLIPHUNTER', 'http://www.cliphunter.com/gfx/new/logo.png', None))
  292. valTab.append(CDisplayListItem('EMPFLIX', 'http://www.empflix.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.empflix.com/categories.php'],'EMPFLIX', 'https://www.empflix.com/images/logo_emp.jpg', None))
  293. valTab.append(CDisplayListItem('THUMBZILLA', 'http://www.thumbzilla.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.thumbzilla.com/'],'THUMBZILLA', 'https://cdn-d-static.pornhub.com/tz-static/images/pc/logo.png?cache=2016111010', None))
  294. valTab.append(CDisplayListItem('YUVUTU', 'http://www.yuvutu.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.yuvutu.com/categories/'],'YUVUTU', 'http://www.yuvutu.com/themes/yuvutu_v2/images/yuvutu_logo.png', None))
  295. valTab.append(CDisplayListItem('PORNICOM', 'http://pornicom.com', CDisplayListItem.TYPE_CATEGORY, ['http://pornicom.com/categories/'],'PORNICOM', 'http://pornicom.com/images/logo.png', None))
  296. valTab.append(CDisplayListItem('HDZOG', 'http://www.hdzog.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.hdzog.com/categories/'],'HDZOG', 'https://pbs.twimg.com/profile_images/484686238402629632/5fzwWkJQ_bigger.png', None))
  297. #valTab.append(CDisplayListItem('PORNOMENGE', 'https://www.pornomenge.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.pornomenge.com/kategorien/'],'PORNOMENGE', 'https://th.servitubes.com/videos/8/1/b/5/1/81b51795337b047be07d3b3790b97c923535dffb.mp4-preview-3.jpg', None))
  298. valTab.append(CDisplayListItem('TUBEPORNCLASSIC', 'http://tubepornclassic.com/', CDisplayListItem.TYPE_CATEGORY, ['http://tubepornclassic.com/categories/'],'TUBEPORNCLASSIC', 'http://www.tubepornclassic.com/images/logo.png', None))
  299. valTab.append(CDisplayListItem('KOLOPORNO', 'https://www.koloporno.com/', CDisplayListItem.TYPE_CATEGORY, ['https://www.koloporno.com/kategoriach/'],'KOLOPORNO', 'https://pbs.twimg.com/profile_images/638608521072934912/sqy78GQm.png', None))
  300. valTab.append(CDisplayListItem('REALGFPORN', 'https://www.realgfporn.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.realgfporn.com/channels/'],'REALGFPORN', 'https://www.realgfporn.com/assets/img/logo.png', None))
  301. valTab.append(CDisplayListItem('PLAYVIDS', 'https://www.playvids.com/', CDisplayListItem.TYPE_CATEGORY, ['https://www.playvids.com/categories&jsclick=1'],'PLAYVIDS', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS9PrWdcYR2t0pJjXg_Wi02ZyiP6E1PJ0mmilizp745_fazgzxu&s', None))
  302. valTab.append(CDisplayListItem('FUX', 'http://www.fux.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.fux.com'],'fux', 'https://cdn1-ht-assets.fux.com/Fux.png', None))
  303. valTab.append(CDisplayListItem('PORNTUBE', 'http://www.porntube.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.porntube.com'],'PORNTUBE', 'https://cdn1-ht-assets.porntube.com/PornTube.png', None))
  304. valTab.append(CDisplayListItem('PORNERBROS', 'http://www.pornerbros.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.pornerbros.com'],'pornerbros', 'https://cdn1-ht-assets.pornerbros.com/PornerBros.png', None))
  305. valTab.append(CDisplayListItem('MOVIEFAP', 'http://www.moviefap.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.moviefap.com/browse/'],'MOVIEFAP', 'http://www.moviefap.com/images/logo.gif', None))
  306. valTab.append(CDisplayListItem('YOURPORN.SEXY', 'https://sxyprn.com', CDisplayListItem.TYPE_CATEGORY, ['https://sxyprn.com'],'yourporn', 'http://cdn.itsyourporn.com/assets/images/logo.jpg', None))
  307. valTab.append(CDisplayListItem('FREEOMOVIE', 'http://www.freeomovie.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.freeomovie.com'],'freeomovie', 'http://www.freeomovie.com/wp-content/uploads/2013/04/logo.png', None))
  308. valTab.append(CDisplayListItem('KATESTUBE', 'http://www.katestube.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.katestube.com/categories/'],'KATESTUBE', 'https://www.katestube.com/images/logo.png', None))
  309. valTab.append(CDisplayListItem('VPORN', 'https://www.vporn.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.vporn.com/categories/'],'vporn', 'https://image.spreadshirtmedia.com/image-server/v1/mp/compositions/1012679167/views/1,width=300,height=300,backgroundColor=E8E8E8,version=1485256808/vporn-brand-dark.jpg', None))
  310. valTab.append(CDisplayListItem('HOTMOVS', 'http://hotmovs.com', CDisplayListItem.TYPE_CATEGORY, ['http://hotmovs.com/categories/'],'hotmovs', 'http://hotmovs.com/images/logo.png', None))
  311. valTab.append(CDisplayListItem('PORNOXO', 'https://www.pornoxo.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.pornoxo.com'],'pornoxo', 'http://www.web-tv-sexe.fr/logo/pornoxo.jpg', None))
  312. valTab.append(CDisplayListItem('PINFLIX', 'http://www.pinflix.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.pinflix.com/category'],'pinflix', 'https://pbs.twimg.com/profile_images/568766044114657280/JYh2ZSF_.png', None))
  313. valTab.append(CDisplayListItem('UPORNIA', 'http://www.upornia.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.upornia.com/categories/'],'upornia', 'https://pbs.twimg.com/profile_images/603525677451640833/AE2qwJ5C_400x400.png', None))
  314. valTab.append(CDisplayListItem('TXXX', 'http://www.txxx.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.txxx.com/categories/'],'txxx', 'https://www.txxx.com/images/desktop-logo.png', None))
  315. valTab.append(CDisplayListItem('SUNPORNO', 'https://www.sunporno.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.sunporno.com/channels/'],'sunporno', 'https://sunstatic.fuckandcdn.com/sun/sunstatic/v31/common/sunporno/img/logo_top.png', None))
  316. valTab.append(CDisplayListItem('SEXU', 'http://sexu.com', CDisplayListItem.TYPE_CATEGORY, ['http://sexu.com/'],'sexu', 'https://images-platform.99static.com/-xYD7Tguk14AOVySxG_bMkoJodU=/500x500/top/smart/99designs-contests-attachments/41/41945/attachment_41945457', None))
  317. valTab.append(CDisplayListItem('TUBEWOLF', 'http://www.tubewolf.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.tubewolf.com'],'tubewolf', 'http://images.tubewolf.com/logo.png', None))
  318. valTab.append(CDisplayListItem('ALPHAPORNO', 'http://www.alphaporno.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.alphaporno.com'],'tubewolf', 'http://images.alphaporno.com/logo.png', None))
  319. valTab.append(CDisplayListItem('ZEDPORN', 'http://zedporn.com', CDisplayListItem.TYPE_CATEGORY, ['https://zedporn.com'],'tubewolf', 'http://images.zedporn.com/new-logo.png', None))
  320. valTab.append(CDisplayListItem('CROCOTUBE', 'http://crocotube.com', CDisplayListItem.TYPE_CATEGORY, ['http://crocotube.com'],'tubewolf', 'http://crocotube.com/images/logo.png', None))
  321. valTab.append(CDisplayListItem('ASHEMALETUBE', 'https://www.ashemaletube.com/', CDisplayListItem.TYPE_CATEGORY, ['https://www.ashemaletube.com/'],'ASHEMALETUBE', 'https://adminex.ashemaletube.com/images/logo/ast.png', None))
  322. valTab.append(CDisplayListItem('MOMXXXFUN', 'https://momxxxfun.com/', CDisplayListItem.TYPE_CATEGORY, ['https://momxxxfun.com/categories'],'MOMXXXFUN', 'https://momxxxfun.com/images/logo/logo.png', None))
  323. valTab.append(CDisplayListItem('STREAMPORN', 'https://streamporn.pw', CDisplayListItem.TYPE_CATEGORY, ['https://streamporn.pw'],'streamporn', 'https://streamporn.pw/wp-content/uploads/2018/05/fsfsfsf-1.png', None))
  324. valTab.append(CDisplayListItem('ONLINEPORNFREE', 'https://onlinepornfree.xyz/', CDisplayListItem.TYPE_CATEGORY, ['https://onlinepornfree.xyz/'],'onlinepornfree', 'https://onlinepornfree.xyz/wp-content/uploads/2018/09/onlinepornfree-1.png', None))
  325. valTab.append(CDisplayListItem('MYDIRTYHOBBY', 'https://www.mydirtyhobby.to', CDisplayListItem.TYPE_CATEGORY, ['https://www.mydirtyhobby.to'],'MYDIRTYHOBBY', 'https://www.mydirtyhobby.to/images/logo/logo.png', None))
  326. valTab.append(CDisplayListItem('XXXSTREAMS', 'http://xxxstreams.org/', CDisplayListItem.TYPE_CATEGORY, ['http://xxxstreams.org/'],'xxxstreams', 'https://previews.123rf.com/images/sila5775/sila57751506/sila5775150600244/40710228-xxx-designed-using-grunge-brush-on-white-background-sign-logo-symbol-icon-graphic-vector-.jpg', None))
  327. valTab.append(CDisplayListItem('PANDAMOVIE', 'https://pandamovie.info', CDisplayListItem.TYPE_CATEGORY, ['https://pandamovie.info'],'123PANDAMOVIE', 'https://pandamovie.info/wp-content/uploads/2019/01/pandamovie-new-clolor.png', None))
  328. valTab.append(CDisplayListItem('FULLXXXMOVIES', 'http://fullxxxmovies.net', CDisplayListItem.TYPE_CATEGORY, ['http://fullxxxmovies.net/'],'FULLXXXMOVIES', 'http://fullxxxmovies.net/wp-content/uploads/2016/09/FullXXXMovies_3.png', None))
  329. valTab.append(CDisplayListItem('PORNREWIND', 'https://www.pornrewind.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.pornrewind.com/categories/'],'PORNREWIND', 'https://www.pornrewind.com/static/images/logo-light-pink.png', None))
  330. valTab.append(CDisplayListItem('BALKANJIZZ', 'https://www.balkanjizz.com/', CDisplayListItem.TYPE_CATEGORY, ['https://www.balkanjizz.com/kategorije-pornica'],'BALKANJIZZ', 'https://www.balkanjizz.com/images/logo/logo.png', None))
  331. valTab.append(CDisplayListItem('PORNORUSSIA', 'https://pornorussia.tv/', CDisplayListItem.TYPE_CATEGORY, ['https://pornorussia.tv/'],'PORNORUSSIA', 'https://pornorussia.tv/images/logo.png', None))
  332. valTab.append(CDisplayListItem('LETMEJERK', 'https://www.letmejerk.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.letmejerk.com/category'],'LETMEJERK', 'https://image.freepik.com/darmowe-ikony/gra%C4%87_318-135191.jpg', None))
  333. valTab.append(CDisplayListItem('GOTPORN', 'https://www.gotporn', CDisplayListItem.TYPE_CATEGORY, ['https://www.gotporn.com/categories?src=hm'],'GOTPORN', 'https://cdn2-static-cf.gotporn.com/desktop/img/gotporn-logo.png', None))
  334. valTab.append(CDisplayListItem('ANALDIN', 'https://www.analdin.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.analdin.com/categories/'],'ANALDIN', 'https://www.analdin.com/images/logo-retina.png', None))
  335. valTab.append(CDisplayListItem('NETFLIXPORNO', 'https://netflixporno.net/', CDisplayListItem.TYPE_CATEGORY, ['https://netflixporno.net/'],'NETFLIXPORNO', 'https://netflixporno.net/wp-content/uploads/2018/04/netflixporno-1.png', None))
  336. valTab.append(CDisplayListItem('FAPSET', 'https://fapset.com', CDisplayListItem.TYPE_CATEGORY, ['https://fapset.com'],'fapset', 'https://fapset.com/templates/Default/images/logo.png', None))
  337. valTab.append(CDisplayListItem('DAFTSEX', 'https://daftsex.com', CDisplayListItem.TYPE_CATEGORY, ['https://daftsex.com/categories'],'daftsex', 'https://daftsex.com/img/daftlogo196x196.png', None))
  338. valTab.append(CDisplayListItem('LOVE HOME PORN', 'https://lovehomeporn.com', CDisplayListItem.TYPE_CATEGORY, ['https://lovehomeporn.com/videos'],'lovehomeporn', 'https://cdn.static.lovehomeporn.com/templates/frontend/purple/new_images/logo-helloween.png', None))
  339. valTab.append(CDisplayListItem('EROPROFILE', 'http://www.eroprofile.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.eroprofile.com'],'EROPROFILE', 'http://amateurblogs.eroprofile.com/img/ep_new_gallery_header.png', None))
  340. valTab.append(CDisplayListItem('ABSOLUPORN', 'http://www.absoluporn.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.absoluporn.com/en/lettre-tag.html'],'absoluporn', 'http://www.absoluporn.com/image/deco/logo.gif', None))
  341. valTab.append(CDisplayListItem('AMATEUR COOL', 'https://www.amateurcool.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.amateurcool.com/channels/'],'amateurcool', 'https://www.amateurcool.com/templates/amateurcool/images/logo.png', None))
  342. #valTab.append(CDisplayListItem('YES PORN PLEASE', 'https://yespornplease.com', CDisplayListItem.TYPE_CATEGORY, ['https://yespornplease.com/categories'],'yespornplease', 'https://1000logos.net/wp-content/uploads/2019/02/YesPornPlease-Logo.png', None))
  343. valTab.append(CDisplayListItem('ANYBUNNY', 'http://anybunny.com', CDisplayListItem.TYPE_CATEGORY, ['http://anybunny.com'],'anybunny', 'http://anybunny.com/images/logo.png', None))
  344. valTab.append(CDisplayListItem('DATOPORN', 'http://dato.porn', CDisplayListItem.TYPE_CATEGORY, ['https://dato.porn/categories/'],'datoporn', 'https://pbs.twimg.com/media/CtzxPlEWgAAiIjH.png', None))
  345. valTab.append(CDisplayListItem('HQPORNER', 'https://hqporner.com', CDisplayListItem.TYPE_CATEGORY, ['https://hqporner.com/porn-categories.php'],'hqporner', 'https://www.filmyporno.blog/wp-content/uploads/2018/12/channel-hqporner.jpg', None))
  346. valTab.append(CDisplayListItem('SPANKBANG', 'https://spankbang.com', CDisplayListItem.TYPE_CATEGORY, ['https://spankbang.com/categories'],'spankbang', 'https://static.spankbang.com/static_desktop/Images/logo_desktop_v4@2x.png', None))
  347. valTab.append(CDisplayListItem('CUMLOUDER', 'https://www.cumlouder.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.cumlouder.com/categories'],'cumlouder', 'https://1000logos.net/wp-content/uploads/2019/02/CumLouder-Logo.png', None))
  348. valTab.append(CDisplayListItem('PORN00', 'http://www.porn00.org', CDisplayListItem.TYPE_CATEGORY, ['http://www.porn00.org/categories/'],'porn00', 'http://www.porn00.org/wp-content/themes/porn00v3/assets/img/logo4.png', None))
  349. valTab.append(CDisplayListItem('WATCHPORNX', 'https://watchpornx.com/', CDisplayListItem.TYPE_CATEGORY, ['https://watchpornx.com/'],'watchpornx', 'https://watchpornfree.info/wp-content/uploads/2019/01/watchpornfreews-1-e1525276673535.png', None))
  350. valTab.append(CDisplayListItem('VOLIMEEE', 'https://www.volimeee.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.volimeee.com/categories'],'volimeee', 'https://www.volimeee.com/images/logo/logo.png', None))
  351. valTab.append(CDisplayListItem('P720', 'https://p720.net', CDisplayListItem.TYPE_CATEGORY, ['https://p720.net/categories/'],'P720', 'https://p720.net/static/images/logo.png', None))
  352. valTab.append(CDisplayListItem('PORNOPERSIK', 'https://pornopersik.com', CDisplayListItem.TYPE_CATEGORY, ['https://pornopersik.com/categories/'],'pornopersik', 'https://pornopersik.com/static/images/logo.png', None))
  353. valTab.append(CDisplayListItem('ANYPORN', 'https://anyporn.com', CDisplayListItem.TYPE_CATEGORY, ['https://anyporn.com/categories/'],'ANYPORN', 'https://anyporn.com/images/logo.png', None))
  354. valTab.append(CDisplayListItem('ANON-V', 'https://anon-v.com', CDisplayListItem.TYPE_CATEGORY, ['https://anon-v.com/categories/'],'ANON-V', 'https://anon-v.com/logo350.png', None))
  355. valTab.append(CDisplayListItem('BRAVOPORN', 'https://www.bravoporn.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.bravoporn.com/c/'],'bravoporn', 'https://www.bravoporn.com/v/images/logo.png', None))
  356. valTab.append(CDisplayListItem('BRAVOTEENS', 'https://www.bravoteens.com/', CDisplayListItem.TYPE_CATEGORY, ['https://www.bravoteens.com//cats/'],'bravoteens', 'https://www.bravoteens.com/tb/images/logo.png', None))
  357. valTab.append(CDisplayListItem('SLEAZYNEASY', 'https://www.sleazyneasy.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.sleazyneasy.com/categories/'],'sleazyneasy', 'https://cdni.sleazyneasy.com/images/favicon-152.png', None))
  358. valTab.append(CDisplayListItem('VJAV', 'https://vjav.com', CDisplayListItem.TYPE_CATEGORY, ['https://vjav.com/categories/'],'vjav', 'https://vjav.com/images/favicons/apple-touch-icon.png', None))
  359. valTab.append(CDisplayListItem('JAVHOHO', 'https://javhoho.com', CDisplayListItem.TYPE_CATEGORY, ['https://javhoho.com/category/free-jav-uncensored/'],'javhoho', 'https://javhoho.com/wp-content/uploads/2019/11/JAVhoho.com-logo.png', None))
  360. if config.plugins.iptvplayer.xxxsortall.value:
  361. valTab.sort(key=lambda poz: poz.name)
  362. if config.plugins.iptvplayer.xxxsearch.value:
  363. self.SEARCH_proc=name
  364. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  365. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  366. valTab.insert(0,CDisplayListItem(_('PROSZĘ PRZEKAŻ 1% PODATKU NA KRS 0000049063'), _('KRS 0000049063\nSTOWARZYSZENIE "OTWÓRZMY PRZED NIMI ŻYCIE"\nUL. KOŚCIUSZKI 43 32-065 KRZESZOWICE\nPRZEKAŻ 1 % SWOJEGO PODATKU\nPODARUJ NASZYM NIEPEŁNOSPRAWNYM SŁOŃCE'), CDisplayListItem.TYPE_MORE, [''], '', '', None))
  367. valTab.append(CDisplayListItem('FOTKA-PL-KAMERKI', 'http://www.fotka.pl/kamerki', CDisplayListItem.TYPE_CATEGORY, ['http://api.fotka.pl/v2/cams/get?page=1&limit=100&gender=f'],'FOTKA-PL-KAMERKI', 'https://pbs.twimg.com/profile_images/3086758992/6fb5cc2ee2735c334d0363bcb01a52ca_400x400.png', None))
  368. url = 'https://chaturbate.com/tags/%s' % config.plugins.iptvplayer.chaturbate.value
  369. valTab.append(CDisplayListItem('CHATURBATE', 'chaturbate.com', CDisplayListItem.TYPE_CATEGORY, [url],'CHATURBATE','http://www.adultcamfriendx.com/wp-content/uploads/2016/11/chaturbate-cams-logo.png', None))
  370. valTab.append(CDisplayListItem('XHAMSTERLIVE', "Kamerki", CDisplayListItem.TYPE_CATEGORY,['http://xhamsterlive.com'], 'xhamsterlive', 'https://cdn.stripst.com/assets/icons/favicon-196x196_xhamsterlive.com.png',None))
  371. valTab.append(CDisplayListItem('CAM4', 'https://www.cam4.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.cam4.com'],'CAM4-KAMERKI', 'https://www.cam4models.com/images/c4logo_white.png', None))
  372. valTab.append(CDisplayListItem('MYFREECAMS', 'http://www.myfreecams.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.myfreecams.com/#Homepage'],'MYFREECAMS', 'http://www.adultcamfriendx.com/wp-content/uploads/2016/11/myfreecams-webcams-logo.png', None))
  373. #valTab.append(CDisplayListItem('LIVEJASMIN', 'http://www.livejasmin.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/girl/free+chat?selectedFilters=12'],'LIVEJASMIN', 'http://livejasmins.fr/livejasmin-france.png', None))
  374. valTab.append(CDisplayListItem('BONGACAMS', 'https://bongacams.com/', CDisplayListItem.TYPE_CATEGORY, ['https://en.bongacams.com/ajax-categories'],'BONGACAMS', 'http://i.bongacams.com/images/bongacams_logo3_header.png', None))
  375. valTab.append(CDisplayListItem('SHOWUP - live cams', 'showup.tv', CDisplayListItem.TYPE_CATEGORY, ['http://showup.tv'], 'showup', 'https://i.pinimg.com/originals/cd/73/1d/cd731d0be3bb2cabcecd6d7bdfe50ae9.png', None))
  376. #valTab.append(CDisplayListItem('ZBIORNIK - live cams', 'zbiornik.tv', CDisplayListItem.TYPE_CATEGORY, ['http://zbiornik.com/live/'], 'zbiornik','http://static.zbiornik.com/images/zbiornikBig.png', None))
  377. valTab.append(CDisplayListItem('CAMSODA', 'http://www.camsoda.com', CDisplayListItem.TYPE_CATEGORY, ['http://www.camsoda.com/api/v1/browse/online'], 'CAMSODA','https://cachew.camsoda.com/assets/img/camsoda-logo-160x50.png', None))
  378. valTab.append(CDisplayListItem('STREAMATE', 'https://streamate.com', CDisplayListItem.TYPE_CATEGORY, ['https://streamate.com'], 'STREAMATE','https://m2.nsimg.net/3.0/auto/skin/sm/assets/ffe71-1453326178-logo.png', None))
  379. try:
  380. phImage = urlparser.decorateUrl('http://media4.nkdcdn.com/images/siteImages/textImages/common/phtml/whiteLabel/new.naked/logo.png', {'Referer': 'https://www.naked.com'})
  381. valTab.append(CDisplayListItem('CAMSTER', 'https://www.naked.com', CDisplayListItem.TYPE_CATEGORY, ['https://www.naked.com/'], 'NAKED', phImage, None))
  382. except Exception:
  383. printExc()
  384. valTab.append(CDisplayListItem('ADULT-TV', 'http://www.adulttvlive.net/category/live-18-tv/', CDisplayListItem.TYPE_CATEGORY, ['http://www.adulttvlive.net/category/live-18-tv/'],'ADULTTV', 'http://www.adultstv.net/wp-content/uploads/2018/10/adulogo-e1540927937315.png', None))
  385. valTab.append(CDisplayListItem('+++ XXXLIST +++ XXXversion = '+str(self.XXXversion), '+++ XXXLIST +++ XXXversion = '+str(self.XXXversion), CDisplayListItem.TYPE_CATEGORY, [''],'XXXLIST', '', None))
  386. if config.plugins.iptvplayer.xxxupdate.value:
  387. valTab.append(CDisplayListItem('CHANGELOG', 'CHANGELOG', CDisplayListItem.TYPE_CATEGORY, ['https://gitlab.com/iptv-host-xxx/iptv-host-xxx/commits/master.atom'], 'UPDATE-ZMIANY', '', None))
  388. self.yourporn = config.plugins.iptvplayer.yourporn.value
  389. return valTab
  390. # ########## #
  391. if 'HISTORY' == name:
  392. printDBG( 'Host listsItems begin name='+name )
  393. for histItem in self.history.getHistoryList():
  394. valTab.append(CDisplayListItem(histItem['pattern'], 'Szukaj ', CDisplayListItem.TYPE_CATEGORY, [histItem['pattern'],histItem['type']], 'SEARCH', '', None))
  395. return valTab
  396. # ########## #
  397. if 'SEARCH' == name:
  398. printDBG( 'Host listsItems begin name='+name )
  399. pattern = url
  400. if Index==-1:
  401. self.history.addHistoryItem( pattern, 'video')
  402. if self.SEARCH_proc == '': return []
  403. if self.SEARCH_proc == 'main-menu':
  404. valTab=[]
  405. self.MAIN_URL = 'https://www.4tube.com'
  406. valtemp = self.listsItems(-1, url, '4TUBE-search')
  407. for item in valtemp: item.name='4TUBE - '+item.name
  408. valTab = valTab + valtemp
  409. valtemp = self.listsItems(-1, url, 'ahme-search')
  410. for item in valtemp: item.name='AH-ME - '+item.name
  411. valTab = valTab + valtemp
  412. self.MAIN_URL = 'http://www.cliphunter.com'
  413. valtemp = self.listsItems(-1, url, 'CLIPHUNTER-search')
  414. for item in valtemp: item.name='CLIPHUNTER - '+item.name
  415. valTab = valTab + valtemp
  416. self.MAIN_URL = 'http://www.dachix.com'
  417. valtemp = self.listsItems(-1, url, 'DACHIX-search')
  418. for item in valtemp: item.name='DACHIX - '+item.name
  419. valTab = valTab + valtemp
  420. self.MAIN_URL = 'http://www.drtuber.com'
  421. valtemp = self.listsItems(-1, url, 'DRTUBER-search')
  422. for item in valtemp: item.name='DRTUBER - '+item.name
  423. valTab = valTab + valtemp
  424. self.MAIN_URL = 'http://www.eporner.com'
  425. valtemp = self.listsItems(-1, url, 'eporner-search')
  426. for item in valtemp: item.name='EPORNER - '+item.name
  427. valTab = valTab + valtemp
  428. self.MAIN_URL = 'https://www.fux.com'
  429. valtemp = self.listsItems(-1, url, '4TUBE-search')
  430. for item in valtemp: item.name='FUX - '+item.name
  431. valTab = valTab + valtemp
  432. # valtemp = self.listsItems(-1, url, 'hdzog-search')
  433. # for item in valtemp: item.name='HDZOG - '+item.name
  434. # valTab = valTab + valtemp
  435. self.MAIN_URL = 'http://www.homemoviestube.com'
  436. valtemp = self.listsItems(-1, url, 'HomeMoviesTube-search')
  437. for item in valtemp: item.name='HomeMoviesTube - '+item.name
  438. valTab = valTab + valtemp
  439. valtemp = self.listsItems(-1, url, 'KATESTUBE-search')
  440. for item in valtemp: item.name='KATESTUBE - '+item.name
  441. valTab = valTab + valtemp
  442. self.MAIN_URL = 'https://www.koloporno.com'
  443. valtemp = self.listsItems(-1, url, 'KOLOPORNO-search')
  444. for item in valtemp: item.name='KOLOPORNO - '+item.name
  445. valTab = valTab + valtemp
  446. valtemp = self.listsItems(-1, url, 'MOVIEFAP-search')
  447. for item in valtemp: item.name='MOVIEFAP - '+item.name
  448. valTab = valTab + valtemp
  449. self.MAIN_URL = 'http://porndoe.com'
  450. valtemp = self.listsItems(-1, url, 'porndoe-search')
  451. for item in valtemp: item.name='PORNDOE - '+item.name
  452. valTab = valTab + valtemp
  453. self.MAIN_URL = 'https://www.pornerbros.com'
  454. valtemp = self.listsItems(-1, url, '4TUBE-search')
  455. for item in valtemp: item.name='PORNERBROS - '+item.name
  456. valTab = valTab + valtemp
  457. self.MAIN_URL = 'http://www.pornhd.com'
  458. valtemp = self.listsItems(-1, url, 'pornhd-search')
  459. for item in valtemp: item.name='PORNHD - '+item.name
  460. valTab = valTab + valtemp
  461. self.MAIN_URL = 'http://www.pornhub.com'
  462. valtemp = self.listsItems(-1, url, 'pornhub-search')
  463. for item in valtemp: item.name='PORNHUB - '+item.name
  464. valTab = valTab + valtemp
  465. valtemp = self.listsItems(-1, url, 'pornicom-search')
  466. for item in valtemp: item.name='PORNICOM - '+item.name
  467. valTab = valTab + valtemp
  468. self.MAIN_URL = 'https://www.porntube.com'
  469. valtemp = self.listsItems(-1, url, '4TUBE-search')
  470. for item in valtemp: item.name='PORNTUBE - '+item.name
  471. valTab = valTab + valtemp
  472. valtemp = self.listsItems(-1, url, 'PORNFROMCZECH-search')
  473. for item in valtemp: item.name='PORNFROMCZECH - '+item.name
  474. valTab = valTab + valtemp
  475. valtemp = self.listsItems(-1, url, 'REALGFPORN-search')
  476. for item in valtemp: item.name='REALGFPORN - '+item.name
  477. valTab = valTab + valtemp
  478. self.MAIN_URL = 'http://www.redtube.com'
  479. valtemp = self.listsItems(-1, url, 'redtube-search')
  480. for item in valtemp: item.name='REDTUBE - '+item.name
  481. valTab = valTab + valtemp
  482. self.MAIN_URL = 'http://www.thumbzilla.com'
  483. valtemp = self.listsItems(-1, url, 'THUMBZILLA-search')
  484. for item in valtemp: item.name='THUMBZILLA - '+item.name
  485. valTab = valTab + valtemp
  486. self.MAIN_URL = 'http://www.tube8.com'
  487. valtemp = self.listsItems(-1, url, 'tube8-search')
  488. for item in valtemp: item.name='TUBE8 - '+item.name
  489. valTab = valTab + valtemp
  490. valtemp = self.listsItems(-1, url, 'xhamster-search')
  491. for item in valtemp: item.name='XHAMSTER - '+item.name
  492. valTab = valTab + valtemp
  493. self.MAIN_URL = 'http://www.xnxx.com'
  494. valtemp = self.listsItems(-1, url, 'xnxx-search')
  495. for item in valtemp: item.name='XNXX - '+item.name
  496. valTab = valTab + valtemp
  497. self.MAIN_URL = 'http://www.xvideos.com'
  498. valtemp = self.listsItems(-1, url, 'xvideos-search')
  499. for item in valtemp: item.name='XVIDEOS - '+item.name
  500. valTab = valTab + valtemp
  501. self.MAIN_URL = 'http://www.youjizz.com'
  502. valtemp = self.listsItems(-1, url, 'YOUJIZZ-search')
  503. for item in valtemp: item.name='YOUJIZZ - '+item.name
  504. valTab = valTab + valtemp
  505. self.MAIN_URL = 'http://www.youporn.com'
  506. valtemp = self.listsItems(-1, url, 'youporn-search')
  507. for item in valtemp: item.name='YOUPORN - '+item.name
  508. valTab = valTab + valtemp
  509. self.MAIN_URL = 'https://yourporn.sexy'
  510. valtemp = self.listsItems(-1, url, 'yourporn-search')
  511. for item in valtemp: item.name='YOURPORN.SEXY - '+item.name
  512. valTab = valTab + valtemp
  513. self.MAIN_URL = ''
  514. return valTab
  515. valTab = self.listsItems(-1, url, self.SEARCH_proc)
  516. return valTab
  517. if 'UPDATE' == name:
  518. printDBG( 'Host listsItems begin name='+name )
  519. valTab.append(CDisplayListItem(self.XXXversion+' - Local version', 'Local XXXversion', CDisplayListItem.TYPE_CATEGORY, [''], '', '', None))
  520. valTab.append(CDisplayListItem(self.XXXremote+ ' - Remote version', 'Remote XXXversion', CDisplayListItem.TYPE_CATEGORY, [''], '', '', None))
  521. valTab.append(CDisplayListItem('Changelog', 'Changelog', CDisplayListItem.TYPE_CATEGORY, ['https://gitlab.com/iptv-host-xxx/iptv-host-xxx/commits/master.atom'], 'UPDATE-ZMIANY', '', None))
  522. valTab.append(CDisplayListItem('Update Now', 'Update Now', CDisplayListItem.TYPE_CATEGORY, [''], 'UPDATE-NOW', '', None))
  523. valTab.append(CDisplayListItem('Update Now & Restart Enigma2', 'Update Now & Restart Enigma2', CDisplayListItem.TYPE_CATEGORY, ['restart'], 'UPDATE-NOW', '', None))
  524. return valTab
  525. if 'UPDATE-ZMIANY' == name:
  526. printDBG( 'Host listsItems begin name='+name )
  527. try:
  528. data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True })
  529. except:
  530. printDBG( 'Host listsItems query error' )
  531. return valTab
  532. #printDBG( 'Host listsItems data: '+data )
  533. phCats = re.findall("<entry>.*?<title>(.*?)</title>.*?<updated>(.*?)</updated>.*?<name>(.*?)</name>", data, re.S)
  534. if phCats:
  535. for (phTitle, phUpdated, phName ) in phCats:
  536. phUpdated = phUpdated.replace('T', ' ')
  537. phUpdated = phUpdated.replace('Z', ' ')
  538. phUpdated = phUpdated.replace('+01:00', ' ')
  539. phUpdated = phUpdated.replace('+02:00', ' ')
  540. printDBG( 'Host listsItems phTitle: '+phTitle )
  541. printDBG( 'Host listsItems phUpdated: '+phUpdated )
  542. printDBG( 'Host listsItems phName: '+phName )
  543. valTab.append(CDisplayListItem(phUpdated+' '+phName+' >> '+decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [''],'', '', None))
  544. return valTab
  545. if 'UPDATE-NOW' == name:
  546. printDBG( 'HostXXX listsItems begin name='+name )
  547. _url = 'https://gitlab.com/iptv-host-xxx/iptv-host-xxx/commits/master'
  548. query_data = { 'url': _url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  549. try:
  550. data = self.cm.getURLRequestData(query_data)
  551. #printDBG( 'Host init data: '+data )
  552. crc=self.cm.ph.getSearchGroups(data, '''/commit/([^"^']+?)['"]''', 1, True)[0]
  553. printDBG( 'crc = '+crc )
  554. if not crc: error
  555. except:
  556. printDBG( 'Host init query error' )
  557. valTab.append(CDisplayListItem('ERROR - Błąd init: '+_url, 'ERROR', CDisplayListItem.TYPE_CATEGORY, [''], '', '', None))
  558. return valTab
  559. tmpDir = GetTmpDir()
  560. source = os_path.join(tmpDir, 'iptv-host-xxx.tar.gz')
  561. dest = os_path.join(tmpDir , '')
  562. _url = 'https://gitlab.com/iptv-host-xxx/iptv-host-xxx/repository/archive.tar.gz?ref=master'
  563. output = open(source,'wb')
  564. query_data = { 'url': _url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  565. try:
  566. output.write(self.cm.getURLRequestData(query_data))
  567. output.close()
  568. os_system ('sync')
  569. printDBG( 'HostXXX pobieranie iptv-host-xxx.tar.gz' )
  570. except:
  571. if os_path.exists(source):
  572. os_remove(source)
  573. printDBG( 'HostXXX Błąd pobierania iptv-host-xxx.tar.gz' )
  574. valTab.append(CDisplayListItem('ERROR - Blad pobierania: '+_url, 'ERROR', CDisplayListItem.TYPE_CATEGORY, [''], '', '', None))
  575. return valTab
  576. if os_path.exists(source):
  577. printDBG( 'HostXXX Jest plik '+source )
  578. else:
  579. printDBG( 'HostXXX Brak pliku '+source )
  580. cmd = 'tar -xzf "%s" -C "%s" 2>&1' % ( source, dest )
  581. try:
  582. os_system (cmd)
  583. os_system ('sync')
  584. printDBG( 'HostXXX rozpakowanie ' + cmd )
  585. except:
  586. printDBG( 'HostXXX Błąd rozpakowania iptv-host-xxx.tar.gz' )
  587. os_system ('rm -f %s' % source)
  588. os_system ('rm -rf %siptv-host-xxx-%s' % (dest, crc))
  589. valTab.append(CDisplayListItem('ERROR - Blad rozpakowania %s' % source, 'ERROR', CDisplayListItem.TYPE_CATEGORY, [''], '', '', None))
  590. return valTab
  591. try:
  592. od = '%siptv-host-xxx-master-%s/'% (dest, crc)
  593. do = resolveFilename(SCOPE_PLUGINS, 'Extensions/')
  594. cmd = 'cp -rf "%s"/* "%s"/ 2>&1' % (os_path.join(od, 'IPTVPlayer'), os_path.join(do, 'IPTVPlayer'))
  595. printDBG('HostXXX kopiowanie1 cmd[%s]' % cmd)
  596. os_system (cmd)
  597. #printDBG('HostXXX kopiowanie2 cmd[%s]' % cmd)
  598. #iptv_system(cmd)
  599. os_system ('sync')
  600. except:
  601. printDBG( 'HostXXX blad kopiowania' )
  602. os_system ('rm -f %s' % source)
  603. os_system ('rm -rf %siptv-host-xxx-master-%s' % (dest, crc))
  604. valTab.append(CDisplayListItem('ERROR - blad kopiowania', 'ERROR', CDisplayListItem.TYPE_CATEGORY, [''], '', '', None))
  605. return valTab
  606. ikony = GetPluginDir('icons/PlayerSelector/')
  607. if os_path.exists('%sXXX100' % ikony):
  608. printDBG( 'HostXXX Jest '+ ikony + 'XXX100 ' )
  609. os_system('mv %sXXX100 %sXXX100.png' % (ikony, ikony))
  610. if os_path.exists('%sXXX120' % ikony):
  611. printDBG( 'HostXXX Jest '+ ikony + 'XXX120 ' )
  612. os_system('mv %sXXX120 %sXXX120.png' % (ikony, ikony))
  613. if os_path.exists('%sXXX135' % ikony):
  614. printDBG( 'HostXXX Jest '+ ikony + 'XXX135 ' )
  615. os_system('mv %sXXX135 %sXXX135.png' % (ikony, ikony))
  616. try:
  617. cmd = GetPluginDir('hosts/hostXXX.py')
  618. with open(cmd, 'r') as f:
  619. data = f.read()
  620. f.close()
  621. wersja = re.search('XXXversion = "(.*?)"', data, re.S)
  622. aktualna = wersja.group(1)
  623. printDBG( 'HostXXX aktualna wersja wtyczki '+aktualna )
  624. except:
  625. printDBG( 'HostXXX error openfile ' )
  626. printDBG( 'HostXXX usuwanie plikow tymczasowych' )
  627. os_system ('rm -f %s' % source)
  628. os_system ('rm -rf %siptv-host-xxx-master-%s' % (dest, crc))
  629. if url:
  630. try:
  631. msg = '\n\n Wersja hostXXX w tunerze %s' % aktualna
  632. self.sessionEx.open(MessageBox, _("Update completed successfully. For the moment, the system will reboot.")+ msg, type = MessageBox.TYPE_INFO, timeout = 10)
  633. sleep (10)
  634. from enigma import quitMainloop
  635. quitMainloop(3)
  636. except: pass
  637. valTab.append(CDisplayListItem('Update End. Please manual restart enigma2', 'Restart', CDisplayListItem.TYPE_CATEGORY, [''], '', '', None))
  638. printDBG( 'HostXXX listsItems end' )
  639. return valTab
  640. ##################################################################
  641. if 'tube8' == name:
  642. printDBG( 'Host listsItems begin name='+name )
  643. self.MAIN_URL = 'http://www.tube8.com'
  644. COOKIEFILE = os_path.join(GetCookieDir(), 'tube8.cookie')
  645. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  646. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  647. sts, data = self.get_Page(url)
  648. if not sts: return
  649. #printDBG( 'Host listsItems data: '+data )
  650. data = self.cm.ph.getDataBeetwenMarkers(data, 'categories-subnav', '</ul>', False)[1]
  651. printDBG( 'Host listsItems data: '+data )
  652. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  653. for item in data:
  654. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  655. if not phTitle: phTitle = self._cleanHtmlStr(item).strip()
  656. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  657. phImage = self.cm.ph.getSearchGroups(item, '''data-thumb=['"]([^"^']+?)['"]''', 1, True)[0]
  658. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'tube8-clips', phImage, None))
  659. valTab.sort(key=lambda poz: poz.name)
  660. valTab.insert(0,CDisplayListItem('--- Most Viewed ---', 'Most Viewed', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/most-viewed/page/1/'], 'tube8-clips', '', None))
  661. valTab.insert(0,CDisplayListItem('--- Top Rated ---', 'Top Rated', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/top/page/1/'], 'tube8-clips', '', None))
  662. valTab.insert(0,CDisplayListItem('--- Longest ---', 'Longest', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/longest/page/1/'], 'tube8-clips', '', None))
  663. valTab.insert(0,CDisplayListItem('--- New Videos ---', 'New Videos', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/newest/page/1/'], 'tube8-clips', '', None))
  664. self.SEARCH_proc='tube8-search'
  665. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  666. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  667. return valTab
  668. if 'tube8-search' == name:
  669. printDBG( 'Host listsItems begin name='+name )
  670. valTab = self.listsItems(-1, 'http://www.tube8.com/searches.html?q='+url.replace(' ','+'), 'tube8-clips')
  671. return valTab
  672. if 'tube8-clips' == name:
  673. printDBG( 'Host listsItems begin name='+name )
  674. self.MAIN_URL = 'http://www.tube8.com'
  675. COOKIEFILE = os_path.join(GetCookieDir(), 'tube8.cookie')
  676. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  677. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  678. sts, data = self.get_Page(url)
  679. if not sts: return
  680. printDBG( 'Host listsItems data: '+data )
  681. nextPage = self.cm.ph.getSearchGroups(data, '''rel="next"\shref=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  682. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'id="category_video_list', 'footer', False)[1]
  683. if '' == data2: data2 = self.cm.ph.getDataBeetwenMarkers(data, 'Video Results For', 'footer', False)[1]
  684. data = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<figure', '</figure>')
  685. for item in data:
  686. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  687. phUrl = self.cm.ph.getSearchGroups(item, '''data-video_url=['"]([^"^']+?)['"]''', 1, True)[0]
  688. phImage = self.cm.ph.getSearchGroups(item, '''data-thumb=['"]([^"^']+?)['"]''', 1, True)[0]
  689. phTime = self.cm.ph.getSearchGroups(item, '''video-duration">([^>]+?)<''', 1, True)[0]
  690. if phUrl and not 'title]' in phTitle:
  691. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  692. if nextPage:
  693. valTab.append(CDisplayListItem('Next', 'Page: '+nextPage, CDisplayListItem.TYPE_CATEGORY, [nextPage], name, '', None))
  694. return valTab
  695. if 'xnxx' == name:
  696. printDBG( 'Host listsItems begin name='+name )
  697. self.MAIN_URL = 'http://www.xnxx.com'
  698. COOKIEFILE = os_path.join(GetCookieDir(), 'xnxx.cookie')
  699. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  700. sts, data = self.cm.getPage(url, self.defaultParams)
  701. if not sts: return valTab
  702. #printDBG( 'Host listsItems data: '+data )
  703. parse = re.search('"categories":(.*?),"more_links"', data, re.S)
  704. if not parse: return valTab
  705. #printDBG( 'Host listsItems parse.group(1): '+parse.group(1) )
  706. result = simplejson.loads(parse.group(1))
  707. if result:
  708. for item in result:
  709. phUrl = str(item["url"].replace('\/','/'))
  710. phTitle = str(item["label"])
  711. if not 'jpg' in phTitle:
  712. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+phUrl],'xnxx-clips', '', None))
  713. valTab.sort(key=lambda poz: poz.name)
  714. valTab.insert(0,CDisplayListItem('--- Hits ---', 'Hits', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/hits/'], 'xnxx-clips', '', None))
  715. valTab.insert(0,CDisplayListItem('--- Best Videos ---', 'Best Videos', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/best/'], 'xnxx-clips', '', None))
  716. valTab.insert(0,CDisplayListItem('--- New Videos ---', 'New Videos', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL], 'xnxx-clips', '', None))
  717. self.SEARCH_proc='xnxx-search'
  718. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  719. valTab.insert(0,CDisplayListItem(_('Search'),_('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  720. return valTab
  721. if 'xnxx-search' == name:
  722. printDBG( 'Host listsItems begin name='+name )
  723. valTab = self.listsItems(-1, 'http://www.xnxx.com/?k='+url.replace(' ','+'), 'xnxx-clips')
  724. return valTab
  725. if 'xnxx-clips' == name:
  726. printDBG( 'Host listsItems begin name='+name )
  727. self.MAIN_URL = 'http://www.xnxx.com'
  728. COOKIEFILE = os_path.join(GetCookieDir(), 'xnxx.cookie')
  729. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  730. sts, data = self.cm.getPage(url, self.defaultParams)
  731. if not sts: return valTab
  732. printDBG( 'Host listsItems data: '+data )
  733. match = re.search("pagination(.*?)Next", data, re.S)
  734. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'id="video', '</p></div>')
  735. for item in data:
  736. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  737. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/video[^"^']+?)['"]''', 1, True)[0]
  738. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  739. phTime = self.cm.ph.getSearchGroups(item, '''</span></span>([^>]+?)<''', 1, True)[0].strip()
  740. if not phTime: phTime = self.cm.ph.getSearchGroups(item, '''<p class="metadata">([^>]+?)-''', 1, True)[0].strip()
  741. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', self.MAIN_URL+phUrl, 1)], 0, phImage, None))
  742. if match: match = re.findall('href="(.*?)"', match.group(1), re.S)
  743. if match:
  744. phUrl = match[-1]
  745. #printDBG( 'Host listsItems page phUrl: '+phUrl )
  746. valTab.append(CDisplayListItem('Next', 'Page: '+phUrl.split('/')[-2], CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+phUrl], name, '', None))
  747. return valTab
  748. if 'zbiornik' == name:
  749. printDBG( 'Host listsItems begin name='+name )
  750. self.MAIN_URL = 'http://zbiornik.com'
  751. COOKIEFILE = os_path.join(GetCookieDir(), 'zbiornik.cookie')
  752. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  753. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  754. sts, data = self.get_Page('http://zbiornik.tv/accept/yes/Lw==')
  755. if not sts: return valTab
  756. #printDBG( 'Host listsItems data: '+data )
  757. sex = ''
  758. hash = ''
  759. ph1 = re.search('var streams = (.*?)}];', data, re.S)
  760. if ph1:
  761. ph1 = ph1.group(1)+'}]'
  762. #printDBG( 'Host listsItems json: '+ph1 )
  763. result = simplejson.loads(ph1)
  764. try:
  765. for item in result:
  766. phash = re.search('"phash":"(.*?)"', data, re.S)
  767. if phash: hash=phash.group(1)
  768. if str(item["accType"])=='1': sex = 'male'
  769. if str(item["accType"])=='2': sex = 'female'
  770. if str(item["accType"])=='3': sex = 'couple'
  771. phImage = 'http://camshot.zbiornik.com/'+str(item["broadcasturl"])+'-224.jpg'
  772. rtmpUrl = 'rtmp://'+str(item["server"])+'/videochat/?'+hash
  773. playpath = str(item["broadcasturl"])
  774. swfUrl = 'https://zbiornik.tv/wowza.swf?v50&b=100'
  775. baseUrl = 'https://zbiornik.tv/'+str(item["nick"])
  776. app = ' app=videochat/?'+hash
  777. flashVer = ' flashVer=WIN 28,0,0,161'
  778. #streamUrl = 'rtmp://'+str(item["server"])+'/videochat/?'+hash+' playpath='+str(item["broadcasturl"])+' swfUrl=http://zbiornik.tv/wowza.swf?v50&b=100 pageUrl=http://zbiornik.tv/'+str(item["nick"])+' live=1'
  779. #streamUrl = rtmpUrl + ' playpath=' + playpath + ' tcUrl=' + rtmpUrl + ' swfUrl=' + swfUrl + ' pageUrl=' + baseUrl + ' app='+app+' live=1 conn=S:OK'+ flashVer
  780. streamUrl = 'rtmp://'+str(item["server"])+'/videochat/ playpath='+str(item["broadcasturl"])+' swfVfy=https://zbiornik.tv/wowza.swf?v50&b=100 pageUrl=https://zbiornik.tv/'+str(item["nick"])+app+' live=1'
  781. if str(item["accType"])<>'1':
  782. valTab.append(CDisplayListItem(str(item["nick"])+' {'+sex+'}',str(item["nick"]),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', streamUrl, 0)], 0, phImage, None))
  783. except Exception as e:
  784. printExc()
  785. return valTab
  786. if 'showup' == name:
  787. self.MAIN_URL = 'http://showup.tv'
  788. COOKIEFILE = os_path.join(GetCookieDir(), 'showup.cookie')
  789. #url = 'https://showup.tv/site/accept_rules?ref=https://showup.tv/'
  790. url = 'https://showup.tv'
  791. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  792. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  793. #accept_rules.showup.tv/
  794. self.defaultParams['cookie_items'] = {'accept_rules':'true'}
  795. sts, data = self.get_Page(url)
  796. if not sts: return
  797. printDBG( 'Host listsItems data: '+data )
  798. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li data-equalizer-watch class="stream"', '</li>')
  799. for item in data:
  800. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  801. phTitle = phUrl[1:]
  802. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  803. phDesc = self.cm.ph.getSearchGroups(item, '''<p>([^>]+?)</p>''', 1, True)[0]
  804. transcoderaddr = self.cm.ph.getSearchGroups(item, '''transcoderaddr=['"]([^"^']+?)['"]''', 1, True)[0]
  805. streamid = self.cm.ph.getSearchGroups(item, '''streamid=['"]([^"^']+?)['"]''', 1, True)[0]
  806. uid = self.cm.ph.getSearchGroups(item, '''uid=['"]([^"^']+?)['"]''', 1, True)[0]
  807. phUrl = 'rtmp://'+transcoderaddr+':1935/webrtc/'+streamid+'_aac'
  808. phImage = 'http://showup.tv/'+phImage
  809. valTab.append(CDisplayListItem(phTitle,phTitle+' '+decodeHtml(phDesc),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 0)], 0, phImage, None))
  810. return valTab
  811. if 'xvideos' == name:
  812. printDBG( 'Host listsItems begin name='+name )
  813. self.MAIN_URL = 'http://www.xvideos.com'
  814. COOKIEFILE = os_path.join(GetCookieDir(), 'xvideos.cookie')
  815. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  816. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  817. sts, data = self.get_Page(url)
  818. if not sts: return valTab
  819. #printDBG( 'Host listsItems data: '+data )
  820. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="dyn', '</li>')
  821. for item in data:
  822. phTitle = self.cm.ph.getSearchGroups(item, '''href=.*?>([^>]+?)</a>''', 1, True)[0].strip()
  823. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  824. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  825. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'xvideos-clips', '', None))
  826. valTab.sort(key=lambda poz: poz.name)
  827. valTab.insert(0,CDisplayListItem('--- Pornstars ---', 'Pornstars', CDisplayListItem.TYPE_CATEGORY, ['https://www.xvideos.com/pornstars-index/list'], 'xvideos-pornstars', '', None))
  828. valTab.insert(0,CDisplayListItem('--- Best Videos ---', 'Best Videos', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/best/'], 'xvideos-clips', '', None))
  829. valTab.insert(0,CDisplayListItem('--- New Videos ---', 'New Videos', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL], 'xvideos-clips', '', None))
  830. valTab.insert(0,CDisplayListItem('--- 100% Verified ---', '100% Verified', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/verified/videos'], 'xvideos-clips', '', None))
  831. #valTab.insert(0,CDisplayListItem('--- Channels ---', 'Channels', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/channels'], 'xvideos-clips', '', None))
  832. valTab.insert(0,CDisplayListItem('--- Porno po polsku ---', 'Porno po polsku', CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/porn/polski'], 'xvideos-clips', '', None))
  833. self.SEARCH_proc='xvideos-search'
  834. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  835. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  836. return valTab
  837. if 'xvideos-pornstars' == name:
  838. printDBG( 'Host listsItems begin name='+name )
  839. self.MAIN_URL = 'http://www.xvideos.com'
  840. COOKIEFILE = os_path.join(GetCookieDir(), 'xvideos.cookie')
  841. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  842. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  843. sts, data = self.get_Page(url)
  844. if not sts: return valTab
  845. printDBG( 'Host listsItems data: '+data )
  846. data = self.cm.ph.getDataBeetwenMarkers(data, 'class="tags-list">', 'footer', False)[1]
  847. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  848. for item in data:
  849. phTitle = self._cleanHtmlStr(item).strip()
  850. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  851. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  852. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'xvideos-clips', '', None))
  853. return valTab
  854. if 'xvideos-search' == name:
  855. printDBG( 'Host listsItems begin name='+name )
  856. valTab = self.listsItems(-1, 'http://www.xvideos.com/?k='+url.replace(' ','+'), 'xvideos-clips')
  857. return valTab
  858. if 'xvideos-clips' == name:
  859. printDBG( 'Host listsItems begin name='+name )
  860. self.MAIN_URL = 'http://www.xvideos.com'
  861. COOKIEFILE = os_path.join(GetCookieDir(), 'xvideos.cookie')
  862. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  863. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  864. sts, data = self.get_Page(url)
  865. if not sts: return valTab
  866. printDBG( 'Host listsItems data: '+data )
  867. next = self.cm.ph.getDataBeetwenMarkers(data, '"active" href=', '</ul></div>', False)[1]
  868. next = self.cm.ph.getSearchGroups(next, '''href=['"](/[^"^']+?)['"]''', 1, True)[0].replace('&amp;','&').replace(' ','+')
  869. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'id="video', '</p></div>')
  870. for item in data:
  871. phTitle = re.compile('''title=['"]([^'^"]+?)['"]''').findall(item)
  872. for titel in phTitle:
  873. if not 'Verified' in titel:
  874. phTitle = titel
  875. break
  876. if not phTitle: phTitle = 'VIDEO'
  877. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/video[^"^']+?)['"]''', 1, True)[0]
  878. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  879. phTime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0]
  880. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime.strip()+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', self.MAIN_URL+phUrl, 1)], 0, phImage, None))
  881. if next:
  882. valTab.append(CDisplayListItem('Next', 'Page: '+self.MAIN_URL+next, CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+next], name, '', None))
  883. return valTab
  884. if 'hentaigasm' == name:
  885. printDBG( 'Host listsItems begin name='+name )
  886. self.MAIN_URL = 'http://hentaigasm.com'
  887. COOKIEFILE = os_path.join(GetCookieDir(), 'hentaigasm.cookie')
  888. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  889. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  890. sts, data = self.get_Page(url)
  891. if not sts: return
  892. printDBG( 'Host listsItems data: '+data )
  893. parse = re.search('Genres(.*?)</div></div>', data, re.S|re.I)
  894. if not parse: return valTab
  895. phCats = re.findall("<a href='(.*?)'.*?>(.*?)<", parse.group(1), re.S)
  896. if phCats:
  897. for (phUrl, phTitle) in phCats:
  898. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'hentaigasm-clips', '', None))
  899. valTab.sort(key=lambda poz: poz.name)
  900. valTab.insert(0,CDisplayListItem("--- New ---", "New", CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL], 'hentaigasm-clips', '',None))
  901. return valTab
  902. if 'hentaigasm-clips' == name:
  903. printDBG( 'Host listsItems begin name='+name )
  904. sts, data = self.get_Page(url)
  905. if not sts: return
  906. #printDBG( 'Host listsItems data: '+data )
  907. phMovies = re.findall('<div class="thumb">.*?title="(.*?)" href="(.*?)".*?<img src="(.*?)"', data, re.S)
  908. if phMovies:
  909. for (phTitle, phUrl, phImage) in phMovies:
  910. phImage = phImage.replace(' ','%20')
  911. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  912. match = re.search("<div class='wp-pagenavi'>(.*?)</div>", data, re.S)
  913. if match: match = re.findall("href='(.*?)'", match.group(1), re.S)
  914. if match:
  915. phUrl = match[-1]
  916. valTab.append(CDisplayListItem('Next', 'Page: '+phUrl, CDisplayListItem.TYPE_CATEGORY, [phUrl], name, '', None))
  917. return valTab
  918. if 'youporn' == name:
  919. printDBG( 'Host listsItems begin name='+name )
  920. self.MAIN_URL = 'http://www.youporn.com'
  921. COOKIEFILE = os_path.join(GetCookieDir(), 'youporn.cookie')
  922. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  923. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  924. sts, data = self.get_Page(url)
  925. if not sts: return valTab
  926. printDBG( 'Host getResolvedURL data: '+data )
  927. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a data-espnode=', '</a>')
  928. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'categories_list porn-categories action', 'footer', False)[1]
  929. if not data2: data2 = data
  930. data = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<a href="/category/', '</a>')
  931. for item in data:
  932. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  933. #phTitle = self.cm.ph.getSearchGroups(item, '''ListElement">([^>]+?)<''', 1, True)[0]
  934. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/category/[^"^']+?)['"]''', 1, True)[0]
  935. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  936. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl + 'time/?'
  937. if phTitle and phUrl:
  938. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'youporn-clips', phImage, None))
  939. valTab.sort(key=lambda poz: poz.name)
  940. valTab.insert(0,CDisplayListItem("--- Most Discussed ---", "Most Discussed", CDisplayListItem.TYPE_CATEGORY,["https://www.youporn.com/most_discussed/"], 'youporn-clips', '',None))
  941. valTab.insert(0,CDisplayListItem("--- Most Favorited ---", "Most Favorited", CDisplayListItem.TYPE_CATEGORY,["https://www.youporn.com/most_favorited/"], 'youporn-clips', '',None))
  942. valTab.insert(0,CDisplayListItem("--- Most Viewed ---", "Most Viewed", CDisplayListItem.TYPE_CATEGORY,["https://www.youporn.com/most_viewed/"], 'youporn-clips', '',None))
  943. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,["https://www.youporn.com/top_rated/"], 'youporn-clips', '',None))
  944. valTab.insert(0,CDisplayListItem("--- New ---", "New", CDisplayListItem.TYPE_CATEGORY,["https://www.youporn.com/"], 'youporn-clips', '',None))
  945. self.SEARCH_proc='youporn-search'
  946. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  947. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  948. return valTab
  949. if 'youporn-search' == name:
  950. printDBG( 'Host listsItems begin name='+name )
  951. valTab = self.listsItems(-1, 'https://www.youporn.com/search/?query=%s' % url.replace(' ','+'), 'youporn-clips')
  952. return valTab
  953. if 'youporn-clips' == name:
  954. printDBG( 'Host listsItems begin name='+name )
  955. self.MAIN_URL = 'http://www.youporn.com'
  956. COOKIEFILE = os_path.join(GetCookieDir(), 'youporn.cookie')
  957. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  958. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  959. sts, data = self.get_Page(url)
  960. if not sts: return valTab
  961. printDBG( 'Host getResolvedURL data: '+data )
  962. next = self.cm.ph.getSearchGroups(data, '''rel=['"]next['"]\s*href=['"]([^"^']+?)['"]''', 1, True)[0]
  963. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'data-video-id', '<i class="icon-thin-x">')
  964. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'data-espnode="videolist', 'footer', False)[1]
  965. if len(data2): data = data2
  966. data = data.split('data-video-id=')
  967. if len(data): del data[0]
  968. for item in data:
  969. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  970. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?jpg)['"]''', 1, True)[0]
  971. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0].replace("&amp;","&")
  972. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace("&amp;","&")
  973. phRuntime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0]
  974. if phUrl.startswith('/'): phUrl = 'https://www.youporn.com' + phUrl
  975. if len(phUrl)>5 and phTitle:
  976. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime.strip()+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  977. if next:
  978. next = next.replace("&amp;","&")
  979. if next.startswith('/'): next = 'https://www.youporn.com' + next
  980. valTab.append(CDisplayListItem('Next', 'Next: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  981. self.MAIN_URL = ''
  982. return valTab
  983. if 'redtube' == name:
  984. printDBG( 'Host listsItems begin name='+name )
  985. self.MAIN_URL = 'http://www.redtube.com'
  986. COOKIEFILE = os_path.join(GetCookieDir(), 'redtube.cookie')
  987. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  988. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  989. sts, data = self.get_Page(url)
  990. if not sts: return valTab
  991. #printDBG( 'Host listsItems data: '+data )
  992. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li id="categor', '</li>')
  993. for item in data:
  994. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  995. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  996. phImage = self.cm.ph.getSearchGroups(item, '''data-thumb_url=['"]([^"^']+?)['"]''', 1, True)[0]
  997. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  998. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  999. if phImage.startswith('//'): phImage = 'http:' + phImage
  1000. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'redtube-clips', phImage, None))
  1001. valTab.sort(key=lambda poz: poz.name)
  1002. valTab.insert(0,CDisplayListItem("--- Most Favored ---", "Most Favored", CDisplayListItem.TYPE_CATEGORY,["http://www.redtube.com/mostfavored?period=alltime"], 'redtube-clips', '',None))
  1003. valTab.insert(0,CDisplayListItem("--- Most Viewed ---", "Most Viewed", CDisplayListItem.TYPE_CATEGORY,["http://www.redtube.com/mostviewed?period=alltime"], 'redtube-clips', '',None))
  1004. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,["http://www.redtube.com/top?period=alltime"], 'redtube-clips', '',None))
  1005. valTab.insert(0,CDisplayListItem("--- Newest ---", "Newest", CDisplayListItem.TYPE_CATEGORY,["http://www.redtube.com/"], 'redtube-clips', '',None))
  1006. self.SEARCH_proc='redtube-search'
  1007. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1008. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1009. return valTab
  1010. if 'redtube-search' == name:
  1011. printDBG( 'Host listsItems begin name='+name )
  1012. valTab = self.listsItems(-1, 'https://www.redtube.com/?search=%s' % url.replace(' ', '+'), 'redtube-clips')
  1013. return valTab
  1014. if 'redtube-clips' == name:
  1015. printDBG( 'Host listsItems begin name='+name )
  1016. self.MAIN_URL = 'http://www.redtube.com'
  1017. COOKIEFILE = os_path.join(GetCookieDir(), 'redtube.cookie')
  1018. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1019. sts, data = self.get_Page(url)
  1020. if not sts: return valTab
  1021. printDBG( 'Host listsItems data: '+data )
  1022. next = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  1023. data2 = self.cm.ph.getDataBeetwenMarkers(data, '<ul id="block_browse"', 'footer', False)[1]
  1024. if not data2: data2 = self.cm.ph.getDataBeetwenMarkers(data, '<ul id="search_results_block"', '</ul>', False)[1]
  1025. if not data2: data2 = data
  1026. data = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<li id=', '</li>')
  1027. for item in data:
  1028. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1029. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1030. phImage = self.cm.ph.getSearchGroups(item, '''data-mediumthumb=['"]([^"^']+?)['"]''', 1, True)[0]
  1031. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-thumb_url=['"]([^"^']+?)['"]''', 1, True)[0]
  1032. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  1033. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1034. phRuntime = self.cm.ph.getDataBeetwenMarkers(item, '<span class="duration">', '</a>', False)[1]
  1035. phRuntime = self._cleanHtmlStr(phRuntime).strip()
  1036. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1037. if phImage.startswith('//'): phImage = 'http:' + phImage
  1038. if phRuntime and not '/premium/' in phUrl:
  1039. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1040. if next:
  1041. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  1042. return valTab
  1043. if 'xhamster' == name:
  1044. printDBG( 'Host listsItems begin name='+name )
  1045. self.MAIN_URL = 'http://xhamster.com'
  1046. COOKIEFILE = os_path.join(GetCookieDir(), 'xhamster.cookie')
  1047. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1048. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1049. sts, data = self.get_Page(url)
  1050. if not sts: return valTab
  1051. printDBG( 'Host listsItems data: '+data )
  1052. data = self.cm.ph.getDataBeetwenMarkers(data, 'letter-block', 'footer', False)[1]
  1053. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  1054. for item in data:
  1055. phTitle = self._cleanHtmlStr(item).strip()
  1056. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](https://xhamster.com/categories/[^"^']+?)['"]''', 1, True)[0]
  1057. if config.plugins.iptvplayer.xhamstertag.value and not phUrl:
  1058. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](https://xhamster.com/tags/[^"^']+?)['"]''', 1, True)[0]
  1059. if phUrl and phTitle: phTitle = phTitle+' (tags)'
  1060. if phUrl and phTitle:
  1061. valTab.append(CDisplayListItem(phTitle.strip(),phTitle.strip(),CDisplayListItem.TYPE_CATEGORY, [phUrl],'xhamster-clips', '', None))
  1062. valTab.insert(0,CDisplayListItem("--- HD ---", "HD", CDisplayListItem.TYPE_CATEGORY,["http://xhamster.com/categories/hd-videos"], 'xhamster-clips', '',None))
  1063. valTab.insert(0,CDisplayListItem("--- Best monthly ---", "Best monthly", CDisplayListItem.TYPE_CATEGORY,["http://xhamster.com/best/monthly"], 'xhamster-clips', '',None))
  1064. valTab.insert(0,CDisplayListItem("--- Pornstars ---", "Pornstars", CDisplayListItem.TYPE_CATEGORY,["http://xhamster.com/pornstars"], 'xhamster-pornostars', '',None))
  1065. valTab.insert(0,CDisplayListItem("--- New ---", "New", CDisplayListItem.TYPE_CATEGORY,["http://xhamster.com/"], 'xhamster-clips', '',None))
  1066. self.SEARCH_proc='xhamster-search'
  1067. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1068. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1069. return valTab
  1070. if 'xhamster-search' == name:
  1071. printDBG( 'Host listsItems begin name='+name )
  1072. valTab = self.listsItems(-1, 'http://www.xhamster.com/search.php?from=suggestion&q=%s&qcat=video' % url.replace(' ','+'), 'xhamster-clips')
  1073. return valTab
  1074. if 'xhamster-clips' == name:
  1075. printDBG( 'Host listsItems begin name='+name )
  1076. COOKIEFILE = os_path.join(GetCookieDir(), 'xhamster.cookie')
  1077. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1078. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1079. sts, data = self.get_Page(url)
  1080. if not sts: return valTab
  1081. printDBG( 'Host listsItems data: '+data )
  1082. next = self.cm.ph.getSearchGroups(data, '''data-page="next"\shref=['"]([^"^']+?)['"]''', 1, True)[0]
  1083. if not next: next = self.cm.ph.getSearchGroups(data, '''rel="next"\shref=['"]([^"^']+?)['"]''', 1, True)[0]
  1084. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="thumb-list__item video-thumb video-thumb--dated">', '</div><div')
  1085. if not data2: data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="thumb-list__item video-thumb">', '</div><div')
  1086. for item in data2:
  1087. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1088. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1089. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1090. phRuntime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0]
  1091. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1092. if next:
  1093. next = next.replace('&amp;','&')
  1094. if next.startswith('/'): next = 'https://xhamster.com' + next
  1095. next = decodeUrl(next)
  1096. valTab.append(CDisplayListItem('Next', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  1097. data2 = None
  1098. return valTab
  1099. if 'xhamster-pornostars' == name:
  1100. printDBG( 'Host listsItems begin name='+name )
  1101. COOKIEFILE = os_path.join(GetCookieDir(), 'xhamster.cookie')
  1102. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1103. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1104. sts, data = self.get_Page(url)
  1105. if not sts: return valTab
  1106. printDBG( 'Host listsItems data: '+data )
  1107. data = self.cm.ph.getDataBeetwenMarkers(data, 'letter-block', 'footer', False)[1]
  1108. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  1109. for item in data:
  1110. phTitle = self._cleanHtmlStr(item).strip()
  1111. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](https://xhamster.com/pornstars/[^"^']+?)['"]''', 1, True)[0]
  1112. if phUrl:
  1113. valTab.append(CDisplayListItem(phTitle.strip(),phTitle.strip(),CDisplayListItem.TYPE_CATEGORY, [phUrl],'xhamster-clips', '', None))
  1114. return valTab
  1115. if 'xhamsterlive' == name:
  1116. printDBG( 'Host listsItems begin name='+name )
  1117. self.MAIN_URL = 'http://xhamsterlive.com'
  1118. url='http://xhamsterlive.com/api/front/models'
  1119. COOKIEFILE = os_path.join(GetCookieDir(), 'xhamsterlive.cookie')
  1120. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1121. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1122. sts, data = self.get_Page(url)
  1123. if not sts: return valTab
  1124. printDBG( 'Host listsItems data: '+data )
  1125. country = ''
  1126. result = simplejson.loads(data)
  1127. try:
  1128. for item in result["models"]:
  1129. ID = str(item["id"])
  1130. Name = str(item["username"])
  1131. BroadcastServer = str(item["broadcastServer"])
  1132. Image = str(item["previewUrl"].replace('\/','/'))
  1133. status = str(item["status"])
  1134. try:
  1135. country = ' [Country: '+str(item["country"]).upper()+']'
  1136. except Exception:
  1137. printExc()
  1138. if status == "public":
  1139. valTab.append(CDisplayListItem(Name,Name+country,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', ID, 1)], 0, Image, None))
  1140. except Exception:
  1141. printExc()
  1142. return valTab
  1143. if 'eporner' == name:
  1144. printDBG( 'Host listsItems begin name='+name )
  1145. self.MAIN_URL = 'http://www.eporner.com'
  1146. COOKIEFILE = os_path.join(GetCookieDir(), 'eporner.cookie')
  1147. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1148. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1149. sts, data = self.get_Page(url)
  1150. if not sts: return valTab
  1151. printDBG( 'Host listsItems data: '+data )
  1152. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'div class="categoriesbox', '</div> </div>')
  1153. data = data.split('class="categoriesbox')
  1154. if len(data): del data[0]
  1155. for item in data:
  1156. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1157. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1158. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1159. phTitle = phTitle.replace(' movies', '').replace('Porn Videos', '')
  1160. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1161. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'eporner-clips', phImage, phUrl))
  1162. valTab.sort(key=lambda poz: poz.name)
  1163. valTab.insert(0,CDisplayListItem("--- 4k ---", "4k", CDisplayListItem.TYPE_CATEGORY,["https://www.eporner.com/category/4k-porn/"], 'eporner-clips', '','/4k/'))
  1164. valTab.insert(0,CDisplayListItem("--- HD ---", "HD", CDisplayListItem.TYPE_CATEGORY,["http://www.eporner.com/hd/"], 'eporner-clips', '','/hd/'))
  1165. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,["http://www.eporner.com/top_rated/"], 'eporner-clips', '','/top_rated/'))
  1166. valTab.insert(0,CDisplayListItem("--- Popular ---", "Popular", CDisplayListItem.TYPE_CATEGORY,["http://www.eporner.com/weekly_top/"], 'eporner-clips', '','/weekly_top/'))
  1167. valTab.insert(0,CDisplayListItem("--- On Air ---", "On Air", CDisplayListItem.TYPE_CATEGORY,["http://www.eporner.com/currently/"], 'eporner-clips', '','/currently/'))
  1168. valTab.insert(0,CDisplayListItem("--- New ---", "New", CDisplayListItem.TYPE_CATEGORY,["http://www.eporner.com/"], 'eporner-clips', '',''))
  1169. self.SEARCH_proc='eporner-search'
  1170. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1171. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1172. return valTab
  1173. if 'eporner-search' == name:
  1174. printDBG( 'Host listsItems begin name='+name )
  1175. valTab = self.listsItems(-1, 'https://www.eporner.com/search/%s/' % url.replace(' ','+'), 'eporner-clips')
  1176. return valTab
  1177. if 'eporner-clips' == name:
  1178. printDBG( 'Host listsItems begin name='+name )
  1179. catUrl = self.currList[Index].possibleTypesOfSearch
  1180. self.MAIN_URL = 'http://www.eporner.com'
  1181. COOKIEFILE = os_path.join(GetCookieDir(), 'eporner.cookie')
  1182. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1183. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1184. sts, data = self.get_Page(url)
  1185. if not sts: return valTab
  1186. printDBG( 'Host listsItems data: '+data )
  1187. next = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  1188. data = data.split('data-vp')
  1189. if len(data): del data[0]
  1190. for item in data:
  1191. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1192. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  1193. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1194. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1195. phRuntime = self.cm.ph.getSearchGroups(item, '''mbtim".+?>([^>]+?)<''', 1, True)[0]
  1196. mbrate = self.cm.ph.getSearchGroups(item, '''mbrate".+?>([^>]+?)<''', 1, True)[0]
  1197. mbvie = self.cm.ph.getSearchGroups(item, '''mbvie".+?>([^>]+?)<''', 1, True)[0]
  1198. if mbrate: mbrate = '['+mbrate+'] '
  1199. if mbvie: mbvie = '[Views: '+mbvie+'] '
  1200. size = self.cm.ph.getSearchGroups(item, '''<span>([^>]+?)</span>''', 1, True)[0]
  1201. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  1202. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1203. if phImage.startswith('//'): phImage = 'http:' + phImage
  1204. valTab.append(CDisplayListItem(decodeHtml(phTitle)+' '+size,'['+phRuntime+'] '+decodeHtml(phTitle)+' '+size+'\n'+mbrate+mbvie,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1205. if next:
  1206. if next.startswith('/'): next = self.MAIN_URL + next
  1207. valTab.append(CDisplayListItem('Next', 'Next: '+ next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', catUrl))
  1208. return valTab
  1209. if 'pornhub' == name:
  1210. printDBG( 'Host listsItems begin name='+name )
  1211. self.MAIN_URL = 'http://www.pornhub.com'
  1212. COOKIEFILE = os_path.join(GetCookieDir(), 'pornhub.cookie')
  1213. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1214. sts, data = self._getPage(url, self.defaultParams)
  1215. if not sts: return valTab
  1216. #printDBG( 'Host listsItems data: '+data )
  1217. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="cat', '</li>')
  1218. #printDBG( 'Host2 getResolvedURL data: '+str(data) )
  1219. for item in data:
  1220. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1221. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1222. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1223. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+phUrl],'pornhub-clips', phImage, None))
  1224. valTab.sort(key=lambda poz: poz.name)
  1225. valTab.insert(0,CDisplayListItem("--- HD ---", "HD", CDisplayListItem.TYPE_CATEGORY,["https://www.pornhub.com/video?c=38"], 'pornhub-clips', 'http://cdn1a.static.pornhub.phncdn.com/images/categories/38.jpg',None))
  1226. valTab.insert(0,CDisplayListItem("--- Longest ---", "Longest", CDisplayListItem.TYPE_CATEGORY,["https://www.pornhub.com/video?o=lg"], 'pornhub-clips', '',None))
  1227. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,["https://www.pornhub.com/video?o=tr"], 'pornhub-clips', '',None))
  1228. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,["https://www.pornhub.com/video?o=mv"], 'pornhub-clips', '',None))
  1229. valTab.insert(0,CDisplayListItem("--- Most Recent ---","Most Recent", CDisplayListItem.TYPE_CATEGORY,["https://www.pornhub.com/video?o=mr"], 'pornhub-clips', '',None))
  1230. self.SEARCH_proc='pornhub-search'
  1231. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1232. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1233. return valTab
  1234. if 'pornhub-search' == name:
  1235. printDBG( 'Host listsItems begin name='+name )
  1236. valTab = self.listsItems(-1, 'https://www.pornhub.com/video/search?search=%s' % url.replace(' ','+'), 'pornhub-clips')
  1237. return valTab
  1238. if 'pornhub-clips' == name:
  1239. printDBG( 'Host listsItems begin name='+name )
  1240. self.MAIN_URL = 'http://www.pornhub.com'
  1241. COOKIEFILE = os_path.join(GetCookieDir(), 'pornhub.cookie')
  1242. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1243. sts, data = self._getPage(url, self.defaultParams)
  1244. if not sts: return valTab
  1245. #printDBG( 'Host2 getResolvedURL data: '+data )
  1246. next = self.cm.ph.getSearchGroups(data, '''"page_next"><a href=['"]([^"^']+?)['"]''')[0]
  1247. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'videoblock', '</li>')
  1248. #printDBG( 'Host2 getResolvedURL data: '+str(data) )
  1249. for item in data:
  1250. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  1251. phImage = self.cm.ph.getSearchGroups(item, '''data-mediumthumb=['"]([^"^']+?)['"]''', 1, True)[0]
  1252. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1253. phRuntime = self.cm.ph.getSearchGroups(item, '''"duration">([^"^']+?)<''', 1, True)[0]
  1254. phAdded = self.cm.ph.getSearchGroups(item, '''class="added">([^"^']+?)<''', 1, True)[0]
  1255. OldImage = self.cm.ph.getSearchGroups(item, '''data-image=['"]([^"^']+?)['"]''', 1, True)[0]
  1256. phUrl = self.MAIN_URL+phUrl
  1257. if not OldImage:
  1258. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime+'] '+decodeHtml(phTitle)+ '\n[Added: '+phAdded+'] ',CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1259. if next:
  1260. valTab.append(CDisplayListItem('Next', 'Next '+re.sub('.+page=', '', next), CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+next.replace('&amp;','&')], name, '', None))
  1261. return valTab
  1262. if 'hdporn' == name:
  1263. printDBG( 'Host listsItems begin name='+name )
  1264. self.MAIN_URL = 'http://www.hdporn.net'
  1265. COOKIEFILE = os_path.join(GetCookieDir(), 'hdporn.cookie')
  1266. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1267. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1268. sts, data = self.get_Page(url)
  1269. if not sts: return
  1270. printDBG( 'Host listsItems data: '+data )
  1271. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="content">', '</div>')
  1272. for item in data:
  1273. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  1274. phImage = self.cm.ph.getSearchGroups(item, '''<img\ssrc=['"]([^"^']+?)['"]''', 1, True)[0]
  1275. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1276. phUrl = self.cm.getFullUrl(phUrl, self.MAIN_URL)
  1277. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'hdporn-clips', phImage, None))
  1278. valTab.sort(key=lambda poz: poz.name)
  1279. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/top-rated/"] , 'hdporn-clips','', None))
  1280. valTab.insert(0,CDisplayListItem("--- Home ---","Home", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL] , 'hdporn-clips','', None))
  1281. return valTab
  1282. if 'hdporn-clips' == name:
  1283. printDBG( 'Host listsItems begin name='+name )
  1284. COOKIEFILE = os_path.join(GetCookieDir(), 'hdporn.cookie')
  1285. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1286. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1287. sts, data = self.get_Page(url)
  1288. if not sts: return
  1289. printDBG( 'Host listsItems data: '+data )
  1290. next = re.findall('<div id="pagination">.*?</div>', data, re.S)
  1291. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="content', '</div>')
  1292. for item in data:
  1293. phTitle = self.cm.ph.getSearchGroups(item, '''alt="([^"]+?)"''', 1, True)[0]
  1294. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1295. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  1296. phRuntime = self.cm.ph.getSearchGroups(item, '''TIME:([^"^']+?)<''', 1, True)[0].strip()
  1297. phUrl = self.cm.getFullUrl(phUrl, self.MAIN_URL)
  1298. valTab.append(CDisplayListItem(phTitle,'['+phRuntime+'] '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1299. if next:
  1300. next = re.findall("</a><a href='(.*?)'>", next[0], re.S)
  1301. if len(next)>0:
  1302. #next = self.cm.getFullUrl(next[0], self.MAIN_URL)
  1303. valTab.append(CDisplayListItem('Next', next[0].replace('.html',''), CDisplayListItem.TYPE_CATEGORY, [self.cm.getFullUrl(next[0], url)], name, '', None))
  1304. return valTab
  1305. if 'beeg' == name:
  1306. printDBG( 'Host listsItems begin name='+name )
  1307. self.MAIN_URL = 'http://beeg.com'
  1308. COOKIEFILE = os_path.join(GetCookieDir(), 'beeg.cookie')
  1309. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1310. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1311. sts, data = self.get_Page(url)
  1312. if not sts: return
  1313. printDBG( 'Host listsItems data: '+data )
  1314. self.beeg_version = self.cm.ph.getSearchGroups(data, '''cpl/(\d+)\.js''', 1, True)[0]
  1315. if not self.beeg_version: self.beeg_version = self.cm.ph.getSearchGroups(data, '''beeg_version = (\d+);''', 1, True)[0]
  1316. printDBG( 'Host beeg_version: '+str(self.beeg_version) )
  1317. url = 'https://beeg.com/static/cpl/%s.js' % self.beeg_version
  1318. sts, data = self.get_Page(url)
  1319. if not sts: return
  1320. printDBG( 'Host listsItems data2: '+data )
  1321. self.beeg_salt = self.cm.ph.getSearchGroups(data, '''beeg_salt=['"]([^"^']+?)['"]''', 1, True)[0]
  1322. self.beeg_api = '//beeg.com/api/v6/'
  1323. printDBG( 'Host self.beeg_salt: '+self.beeg_salt )
  1324. printDBG( 'Host self.beeg_api: '+self.beeg_api )
  1325. url = 'https:%s%s/index/main/0/mobile' % (self.beeg_api, self.beeg_version)
  1326. sts, data = self.get_Page(url)
  1327. if not sts: return
  1328. printDBG( 'Host listsItems data3: '+data )
  1329. result = byteify(simplejson.loads(data))
  1330. for item in result["tags"]:
  1331. phTitle = str(item["tag"]).title()
  1332. phUrl = 'http:%s%s/index/tag/$PAGE$/mobile?tag=%s' % (self.beeg_api, self.beeg_version, urllib.quote(phTitle, '').lower())
  1333. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'beeg-clips', '', None))
  1334. valTab.sort(key=lambda poz: poz.name)
  1335. return valTab
  1336. if 'beeg-clips' == name:
  1337. printDBG( 'Host listsItems begin name='+name )
  1338. self.beegfullhd = config.plugins.iptvplayer.beeg.value
  1339. catUrl = self.currList[Index].possibleTypesOfSearch
  1340. printDBG( 'Host listsItems cat-url: '+str(catUrl) )
  1341. next = url
  1342. if catUrl == None:
  1343. self.page = 0
  1344. else:
  1345. self.page += 1
  1346. url = url.replace('$PAGE$', '%s' % str(self.page))
  1347. printDBG( 'Host current url: '+url )
  1348. printDBG( 'Host current next: '+next )
  1349. printDBG( 'Host current page: '+ str(self.page) )
  1350. COOKIEFILE = os_path.join(GetCookieDir(), 'beeg.cookie')
  1351. sts, data = self.get_Page(url)
  1352. if not sts: return
  1353. printDBG( 'Host listsItems data: '+data )
  1354. try:
  1355. result = byteify(simplejson.loads(data))
  1356. if result:
  1357. for item in result["videos"]:
  1358. phTitle = str(item["title"])
  1359. if not phTitle: phTitle = str(item["ps_name"])
  1360. #phVideoId = str(item["id"])
  1361. try:
  1362. Added = str(item["datetime"])
  1363. except Exception:
  1364. printExc()
  1365. Added = ''
  1366. try:
  1367. Time = str(item["duration"])
  1368. m, s = divmod(int(Time), 60)
  1369. Time = "[%02d:%02d] " % (m, s)
  1370. except Exception:
  1371. printExc()
  1372. Time = ''
  1373. try:
  1374. pid = self.cm.ph.getSearchGroups(str(item["thumbs"]), '''pid['"]:([^"^']+?),''', 1, True)[0].strip()
  1375. start = self.cm.ph.getSearchGroups(str(item["thumbs"]), '''start['"]:([^"^']+?),''', 1, True)[0].strip()
  1376. end = self.cm.ph.getSearchGroups(str(item["thumbs"]), '''end['"]:([^"^']+?),''', 1, True)[0].strip()
  1377. phVideoSvId = str(item["svid"])+'?v=2&p='+pid+'&s='+start+'&e='+end
  1378. except Exception:
  1379. printExc()
  1380. phVideoSvId = ''
  1381. phUrl = 'https:%s%s/video/%s' % (self.beeg_api, self.beeg_version, phVideoSvId)
  1382. try:
  1383. Image = self.cm.ph.getSearchGroups(str(item["thumbs"]), '''image['"]:\s['"]([^"^']+?)['"]''', 1, True)[0]
  1384. phImage = 'http://img.beeg.com/236x177/%s' % Image
  1385. if not Image: phImage = 'https://i.pinimg.com/474x/8e/89/91/8e89916e7e4d8c0b314d548578d4aba5.jpg'
  1386. except:
  1387. phImage = 'https://i.pinimg.com/474x/8e/89/91/8e89916e7e4d8c0b314d548578d4aba5.jpg'
  1388. valTab.append(CDisplayListItem(phTitle,Time+phTitle+'\nAdded: '+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, phVideoSvId))
  1389. except Exception:
  1390. printExc()
  1391. valTab.append(CDisplayListItem('Next', 'Page: '+str(self.page+2), CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'Next'))
  1392. return valTab
  1393. if 'pornrabbit' == name:
  1394. printDBG( 'Host listsItems begin name='+name )
  1395. self.MAIN_URL = 'http://www.pornrabbit.com'
  1396. COOKIEFILE = os_path.join(GetCookieDir(), 'pornrabbit.cookie')
  1397. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1398. sts, data = self.getPage(url, 'pornrabbit.cookie', 'pornrabbit.com', self.defaultParams)
  1399. if not sts: return valTab
  1400. printDBG( 'Host listsItems data: '+data )
  1401. data = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="top-category-list">', 'footer', False)[1]
  1402. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  1403. for item in data:
  1404. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].replace(' Porn Videos','')
  1405. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1406. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1407. if phTitle:
  1408. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'pornrabbit-clips', '', None))
  1409. valTab.sort(key=lambda poz: poz.name)
  1410. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,['https://www.pornrabbit.com/most-viewed/'], 'pornrabbit-clips', '', None))
  1411. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['https://www.pornrabbit.com/top-rated/'], 'pornrabbit-clips', '', None))
  1412. valTab.insert(0,CDisplayListItem("--- New ---","New", CDisplayListItem.TYPE_CATEGORY,['https://www.pornrabbit.com/videos/'], 'pornrabbit-clips', '', None))
  1413. self.SEARCH_proc='pornrabbit-search'
  1414. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1415. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1416. return valTab
  1417. if 'pornrabbit-search' == name:
  1418. printDBG( 'Host listsItems begin name='+name )
  1419. valTab = self.listsItems(-1, 'https://www.pornrabbit.com/%s/' % url.replace(' ','+'), 'pornrabbit-clips')
  1420. return valTab
  1421. if 'pornrabbit-clips' == name:
  1422. printDBG( 'Host listsItems begin name='+name )
  1423. catUrl = self.currList[Index].possibleTypesOfSearch
  1424. COOKIEFILE = os_path.join(GetCookieDir(), 'pornrabbit.cookie')
  1425. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1426. sts, data = self.getPage(url, 'pornrabbit.cookie', 'pornrabbit.com', self.defaultParams)
  1427. if not sts: return valTab
  1428. printDBG( 'Host listsItems data: '+data )
  1429. next = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', 'NEXT', False)[1]
  1430. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<!-- item -->', '<!-- item END -->')
  1431. for item in data:
  1432. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].replace(' Porn Videos','')
  1433. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1434. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1435. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  1436. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1437. Runtime = self.cm.ph.getSearchGroups(item, '''desc">([^>]+?)<''', 1, True)[0]
  1438. if Runtime:
  1439. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Runtime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1440. if next:
  1441. next = re.compile('''href=['"]([^'^"]+?)['"]''').findall(next)
  1442. if next:
  1443. next = next[-1]
  1444. if next.startswith('/'): next = 'https://www.pornrabbit.com' + next
  1445. if next.startswith('page'): next = re.sub('page.+', '', url) + next
  1446. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  1447. return valTab
  1448. if 'pornhd' == name:
  1449. printDBG( 'Host listsItems begin name='+name )
  1450. self.MAIN_URL = 'http://www.pornhd.com'
  1451. COOKIEFILE = os_path.join(GetCookieDir(), 'pornhd.cookie')
  1452. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1453. sts, data = self.getPage(url, 'pornhd.cookie', 'pornhd.com', self.defaultParams)
  1454. if not sts: return valTab
  1455. printDBG( 'Host listsItems data: '+str(data) )
  1456. #data = self.cm.ph.getDataBeetwenMarkers(data, 'class="tag-150', 'class="footer', False)[1]
  1457. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  1458. for item in data:
  1459. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1460. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  1461. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1462. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1463. if phUrl.startswith('/'): phUrl = 'http://www.pornhd.com' + phUrl
  1464. if phTitle:
  1465. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'pornhd-clips', self.FullUrl(phImage), phUrl))
  1466. valTab.sort(key=lambda poz: poz.name)
  1467. valTab.insert(0,CDisplayListItem("--- Channel ---", "Channel", CDisplayListItem.TYPE_CATEGORY,["https://www.pornhd.com/channel"], 'pornhd-pornstars', '',None))
  1468. valTab.insert(0,CDisplayListItem("--- Pornstars ---", "Pornstars", CDisplayListItem.TYPE_CATEGORY,["https://www.pornhd.com/pornstars"], 'pornhd-pornstars', '',None))
  1469. valTab.insert(0,CDisplayListItem("--- New ---", "New", CDisplayListItem.TYPE_CATEGORY,["https://www.pornhd.com/"], 'pornhd-clips', '',None))
  1470. self.SEARCH_proc='pornhd-search'
  1471. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1472. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1473. return valTab
  1474. if 'pornhd-search' == name:
  1475. printDBG( 'Host listsItems begin name='+name )
  1476. valTab = self.listsItems(-1, 'https://www.pornhd.com/search?search=%s' % url.replace(' ','+'), 'pornhd-clips')
  1477. return valTab
  1478. if 'pornhd-clips' == name:
  1479. printDBG( 'Host listsItems begin name='+name )
  1480. catUrl = self.currList[Index].possibleTypesOfSearch
  1481. COOKIEFILE = os_path.join(GetCookieDir(), 'pornhd.cookie')
  1482. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1483. sts, data = self.getPage(url, 'pornhd.cookie', 'pornhd.com', self.defaultParams)
  1484. if not sts: return ''
  1485. printDBG( 'Host listsItems data: '+str(data) )
  1486. next = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', 'Next', False)[1]
  1487. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article class="video-item ">', '</article>')
  1488. for item in data:
  1489. Title = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1490. Image = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0].replace('.webp','.jpg')
  1491. if not Image: Image = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0].replace('.webp','.jpg')
  1492. Url = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1493. Runtime = self.cm.ph.getSearchGroups(item, '''duration">([^"^']+?)<''', 1, True)[0]
  1494. if Url.startswith('/'): Url = 'http://www.pornhd.com' + Url
  1495. valTab.append(CDisplayListItem(decodeHtml(Title),'['+Runtime+'] '+decodeHtml(Title),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', Url, 1)], 0, Image, None))
  1496. if next:
  1497. next = re.compile('''href=['"]([^'^"]+?)['"]''').findall(next)
  1498. if next:
  1499. next = next[-1]
  1500. if next.startswith('/'): next = 'http://www.pornhd.com' + next
  1501. valTab.append(CDisplayListItem('Next', 'Page : '+next.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  1502. return valTab
  1503. if 'pornhd-channel' == name:
  1504. printDBG( 'Host listsItems begin name='+name )
  1505. self.MAIN_URL = 'http://www.pornhd.com'
  1506. COOKIEFILE = os_path.join(GetCookieDir(), 'pornhd.cookie')
  1507. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1508. sts, data = self.getPage(url, 'pornhd.cookie', 'pornhd.com', self.defaultParams)
  1509. if not sts: return ''
  1510. printDBG( 'Host listsItems data: '+str(data) )
  1511. data = self.cm.ph.getDataBeetwenMarkers(data, 'class="tag', '</div>', False)[1]
  1512. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  1513. for item in data:
  1514. Title = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1515. Image = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1516. Url = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1517. if Url.startswith('/'): Url = 'http://www.pornhd.com' + Url
  1518. if Title:
  1519. valTab.append(CDisplayListItem(decodeHtml(Title),decodeHtml(Title),CDisplayListItem.TYPE_CATEGORY, [Url],'pornhd-clips', Image, None))
  1520. return valTab
  1521. if 'pornhd-pornstars' == name:
  1522. printDBG( 'Host listsItems begin name='+name )
  1523. self.MAIN_URL = 'http://www.pornhd.com'
  1524. COOKIEFILE = os_path.join(GetCookieDir(), 'pornhd.cookie')
  1525. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1526. sts, data = self.getPage(url, 'pornhd.cookie', 'pornhd.com', self.defaultParams)
  1527. if not sts: return ''
  1528. printDBG( 'Host listsItems data: '+str(data) )
  1529. cookieHeader = self.cm.getCookieHeader(COOKIEFILE)
  1530. next = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', 'Next', False)[1]
  1531. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article class="small-thumb">', '</article>')
  1532. for item in data:
  1533. Title = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1534. Image = self.FullUrl(self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0])
  1535. if not Image: Image = self.FullUrl(self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0])
  1536. Url = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1537. if Url.startswith('/'): Url = 'http://www.pornhd.com' + Url
  1538. Image = strwithmeta(Image, {'Referer':url, 'Cookie':cookieHeader})
  1539. valTab.append(CDisplayListItem(decodeHtml(Title),decodeHtml(Title),CDisplayListItem.TYPE_CATEGORY, [Url],'pornhd-clips', Image, None))
  1540. if next:
  1541. next = re.compile('''href=['"]([^'^"]+?)['"]''').findall(next)
  1542. if next:
  1543. next = next[-1]
  1544. if next.startswith('/'): next = 'http://www.pornhd.com' + next
  1545. valTab.append(CDisplayListItem('Next', 'Page : '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  1546. return valTab
  1547. if 'AH-ME' == name:
  1548. printDBG( 'Host listsItems begin name='+name )
  1549. self.MAIN_URL = 'http://www.ah-me.com'
  1550. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  1551. try:
  1552. data = self.cm.getURLRequestData(query_data)
  1553. except Exception as e:
  1554. printExc()
  1555. msg = _("Last error:\n%s" % str(e))
  1556. GetIPTVNotify().push('%s' % msg, 'error', 20)
  1557. printDBG( 'Host listsItems query error url:'+url )
  1558. return valTab
  1559. printDBG( 'Host listsItems data: '+data )
  1560. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="moviec', '</div>')
  1561. #printDBG( 'Host2 data: '+str(data) )
  1562. for item in data:
  1563. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1564. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1565. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1566. valTab.append(CDisplayListItem(phTitle,phUrl,CDisplayListItem.TYPE_CATEGORY, [phUrl],'AH-ME-clips', phImage, phUrl))
  1567. valTab.sort(key=lambda poz: poz.name)
  1568. valTab.insert(0,CDisplayListItem("--- Long movies ---", "Long movies", CDisplayListItem.TYPE_CATEGORY,["https://www.ah-me.com/long-movies/page1.html"], 'AH-ME-clips', '',None))
  1569. valTab.insert(0,CDisplayListItem("--- Top rated ---", "Top rated", CDisplayListItem.TYPE_CATEGORY,["https://www.ah-me.com/top-rated/page1.html"], 'AH-ME-clips', '',None))
  1570. valTab.insert(0,CDisplayListItem("--- High definition ---", "High definition", CDisplayListItem.TYPE_CATEGORY,["https://www.ah-me.com/high-definition/page1.html"], 'AH-ME-clips', '',None))
  1571. valTab.insert(0,CDisplayListItem("--- Most favorited ---", "Most favorited", CDisplayListItem.TYPE_CATEGORY,["https://www.ah-me.com/mostfavorites/page1.html"], 'AH-ME-clips', '',None))
  1572. self.SEARCH_proc='ahme-search'
  1573. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1574. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1575. return valTab
  1576. if 'ahme-search' == name:
  1577. printDBG( 'Host listsItems begin name='+name )
  1578. valTab = self.listsItems(-1, 'https://www.ah-me.com/search/%s/' % url.replace(' ','+'), 'AH-ME-clips')
  1579. return valTab
  1580. if 'AH-ME-clips' == name:
  1581. printDBG( 'Host listsItems begin name='+name )
  1582. catUrl = self.currList[Index].possibleTypesOfSearch
  1583. self.MAIN_URL = 'http://www.ah-me.com'
  1584. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  1585. try:
  1586. data = self.cm.getURLRequestData(query_data)
  1587. except:
  1588. printDBG( 'Host listsItems query error url: '+url )
  1589. return valTab
  1590. #printDBG( 'Host listsItems data: '+data )
  1591. next = self.cm.ph.getDataBeetwenMarkers(data, 'next"><a class="color" href="', '">Next', False)[1]
  1592. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="moviec', '/span></p>')
  1593. #printDBG( 'Host2 data: '+str(data) )
  1594. for item in data:
  1595. Title = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1596. Image = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1597. Url = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1598. Runtime = self.cm.ph.getSearchGroups(item, '''class="time">([^"^']+?)<''', 1, True)[0]
  1599. valTab.append(CDisplayListItem(decodeHtml(Title),'['+Runtime+'] '+decodeHtml(Title),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', Url, 1)], 0, Image, None))
  1600. if next:
  1601. printDBG( 'Host next: '+next )
  1602. valTab.append(CDisplayListItem('Next', 'Next', CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  1603. return valTab
  1604. if 'CHATURBATE' == name:
  1605. printDBG( 'Host listsItems begin name='+name )
  1606. self.MAIN_URL = 'https://chaturbate.com'
  1607. COOKIEFILE = os_path.join(GetCookieDir(), 'chaturbate.cookie')
  1608. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1609. self.defaultParams = {'header':self.HTTP_HEADER}
  1610. sts, data = self.get_Page(url)
  1611. if not sts: return
  1612. printDBG( 'Host listsItems data: '+data )
  1613. next_page = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="paging">', '</ul>', False)[1]
  1614. catUrl = self.currList[Index].possibleTypesOfSearch
  1615. if catUrl<>'next':
  1616. valTab.append(CDisplayListItem('Female', 'Female',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/female-cams/'],'CHATURBATE-clips', '', None))
  1617. valTab.append(CDisplayListItem('Featured', 'Featured',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL],'CHATURBATE-clips', '', None))
  1618. valTab.append(CDisplayListItem('Couple', 'Couple',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/couple-cams/'],'CHATURBATE-clips', '', None))
  1619. valTab.append(CDisplayListItem('Transsexual', 'Transsexual',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/transsexual-cams/'],'CHATURBATE-clips', '', None))
  1620. valTab.append(CDisplayListItem('HD', 'HD',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/hd-cams/'],'CHATURBATE-clips', '', None))
  1621. valTab.append(CDisplayListItem('Teen (18+)', 'Teen',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/teen-cams/'],'CHATURBATE-clips', '', None))
  1622. valTab.append(CDisplayListItem('18 to 21', '18 to 21',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/18to21-cams/'],'CHATURBATE-clips', '', None))
  1623. valTab.append(CDisplayListItem('20 to 30', '20 to 30',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/20to30-cams/'],'CHATURBATE-clips', '', None))
  1624. valTab.append(CDisplayListItem('30 to 50', '30 to 50',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/30to50-cams/'],'CHATURBATE-clips', '', None))
  1625. valTab.append(CDisplayListItem('Euro Russian', 'Euro Russian',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/euro-russian-cams/'],'CHATURBATE-clips', '', None))
  1626. valTab.append(CDisplayListItem('Exhibitionist', 'Exhibitionist',CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+'/exhibitionist-cams/'],'CHATURBATE-clips', '', None))
  1627. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a href="/tag/', '</a>')
  1628. for item in data:
  1629. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1630. phTitle = self._cleanHtmlStr(item)
  1631. phUrl = self.MAIN_URL + phUrl
  1632. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'CHATURBATE-clips', '', None))
  1633. if next_page:
  1634. next_page = self.cm.ph.getAllItemsBeetwenMarkers(next_page, '<li', '</li>')
  1635. for item in next_page:
  1636. next = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  1637. if next.startswith('/'): next = self.MAIN_URL + next
  1638. if next == '#': return valTab
  1639. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  1640. return valTab
  1641. if 'CHATURBATE-clips' == name:
  1642. printDBG( 'Host listsItems begin name='+name )
  1643. COOKIEFILE = os_path.join(GetCookieDir(), 'chaturbate.cookie')
  1644. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1645. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1646. sts, data = self.get_Page(url)
  1647. if not sts: return
  1648. printDBG( 'Host listsItems data: '+data )
  1649. cookieHeader = self.cm.getCookieHeader(COOKIEFILE)
  1650. match = re.search('class="endless_separator".*?<li><a href="(.*?)"', data, re.S)
  1651. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="room_list_room', 'viewers</li>')
  1652. #printDBG( 'Host2 data: '+str(data) )
  1653. for item in data:
  1654. Title = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  1655. Image = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1656. Url = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1657. Gender=''
  1658. Age=self.cm.ph.getSearchGroups(item, '''<span class="age gender.">([^>]+?)<''', 1, True)[0]
  1659. Description=''
  1660. Location=self.cm.ph.getSearchGroups(item, '''location" style="display: none;">([^>]+?)<''', 1, True)[0]
  1661. Viewers=''
  1662. bitrate = self.cm.ph.getSearchGroups(item, '''thumbnail_label.*?>([^>]+?)<''', 1, True)[0]
  1663. if Url.startswith('/'): Url = self.MAIN_URL + Url
  1664. Image = strwithmeta(Image, {'Referer':url, 'Cookie':cookieHeader})
  1665. valTab.append(CDisplayListItem(decodeHtml(Title),decodeHtml(Title)+' [Age: '+decodeHtml(Age)+'] [Location: '+decodeHtml(Location)+'] [info: '+bitrate+']',CDisplayListItem.TYPE_VIDEO, [CUrlItem('', Url, 1)], 0, Image, None))
  1666. if match:
  1667. printDBG( 'Host listsItems Next: ' +match.group(1) )
  1668. if match.group(1).startswith('/'): Url = self.MAIN_URL + match.group(1)
  1669. valTab.append(CDisplayListItem('Next', match.group(1), CDisplayListItem.TYPE_CATEGORY, [Url], name, '', None))
  1670. return valTab
  1671. if 'AMATEURPORN' == name:
  1672. printDBG( 'Host listsItems begin name='+name )
  1673. self.MAIN_URL = 'http://www.amateurporn.net'
  1674. COOKIEFILE = os_path.join(GetCookieDir(), 'amateurporn.cookie')
  1675. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1676. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1677. sts, data = self.get_Page(url)
  1678. if not sts: return valTab
  1679. printDBG( 'Host listsItems data: '+data )
  1680. cookieHeader = self.cm.getCookieHeader(COOKIEFILE)
  1681. match = re.search('class="endless_separator".*?<li><a href="(.*?)"', data, re.S)
  1682. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class="item"', '</a>')
  1683. #printDBG( 'Host2 data: '+str(data) )
  1684. for item in data:
  1685. Title = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  1686. Image = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  1687. Url = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1688. Gender=''
  1689. Age=self.cm.ph.getSearchGroups(item, '''<span class="age gender.">([^>]+?)<''', 1, True)[0]
  1690. Description=''
  1691. Location=self.cm.ph.getSearchGroups(item, '''location" style="display: none;">([^>]+?)<''', 1, True)[0]
  1692. Viewers=''
  1693. bitrate = self.cm.ph.getSearchGroups(item, '''thumbnail_label.*?>([^>]+?)<''', 1, True)[0]
  1694. if Url.startswith('/'): Url = self.MAIN_URL + Url
  1695. valTab.append(CDisplayListItem(Title,Url,CDisplayListItem.TYPE_CATEGORY, [Url],'AMATEURPORN-clips', '', None))
  1696. valTab.sort(key=lambda poz: poz.name)
  1697. self.SEARCH_proc='AMATEURPORN-search'
  1698. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1699. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1700. return valTab
  1701. if 'AMATEURPORN-search' == name:
  1702. printDBG( 'Host listsItems begin name='+name )
  1703. valTab = self.listsItems(-1, 'https://www.amateurporn.me/search/%s/' % url.replace(' ','+'), 'AMATEURPORN-clips')
  1704. return valTab
  1705. if 'AMATEURPORN-clips' == name:
  1706. printDBG( 'Host listsItems begin name='+name )
  1707. COOKIEFILE = os_path.join(GetCookieDir(), 'amateurporn.cookie')
  1708. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1709. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1710. sts, data = self.get_Page(url)
  1711. if not sts: return valTab
  1712. printDBG( 'Host listsItems data: '+data )
  1713. next = self.cm.ph.getDataBeetwenMarkers(data, '<li class="next">', '</li>', False)[1]
  1714. data = data.split('<div class="item ">')
  1715. if len(data): del data[0]
  1716. for item in data:
  1717. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('Model ','')
  1718. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1719. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  1720. Runtime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0]
  1721. Added = self.cm.ph.getSearchGroups(item, '''added"><em>([^>]+?)<''', 1, True)[0]
  1722. if Added: Added = 'Added: '+ Added
  1723. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1724. if phImage.startswith('//'): phImage = 'http:' + phImage
  1725. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Runtime+'] '+phTitle+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1726. if next:
  1727. page = self.cm.ph.getSearchGroups(str(next), '''from:([^"^']+?)['"]''')[0]
  1728. next = url + '?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from='+page
  1729. valTab.append(CDisplayListItem('Next', 'Page : '+page, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'Next'))
  1730. return valTab
  1731. if 'FOTKA-PL-KAMERKI' == name:
  1732. printDBG( 'Host listsItems begin name='+name )
  1733. self.MAIN_URL = url
  1734. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  1735. try:
  1736. data = self.cm.getURLRequestData(query_data)
  1737. except Exception as e:
  1738. printExc()
  1739. msg = _("Last error:\n%s" % str(e))
  1740. GetIPTVNotify().push('%s' % msg, 'error', 20)
  1741. printDBG( 'Host listsItems query error url: '+url )
  1742. return valTab
  1743. printDBG( 'Host listsItems data: '+data )
  1744. parse = re.search('"rooms":(.*?),"status":"OK"', data, re.S)
  1745. if not parse: return valTab
  1746. #printDBG( 'Host listsItems parse.group(1): '+parse.group(1) )
  1747. result = simplejson.loads(parse.group(1))
  1748. if result:
  1749. for item in result:
  1750. try:
  1751. Name = str(item["name"])
  1752. Age = str(item["age"])
  1753. Url = str(item["streamUrl"].replace('\/','/'))+' live=1'
  1754. Title = str(item["title"])
  1755. Viewers = str(item["viewers"])
  1756. Image = str(item["av_126"].replace('\/','/'))
  1757. hls = str(item["streamMPEGHLSUrl"].replace('\/','/'))
  1758. try:
  1759. Image = str(item["av_640"].replace('\/','/'))
  1760. except Exception: printExc()
  1761. if config.plugins.iptvplayer.fotka.value == '0': Url = hls.replace('https','http').replace('manifest.hls','index.m3u8')
  1762. valTab.append(CDisplayListItem(Name,'[Age : '+Age+']'+' [Views: '+Viewers+'] '+Title, CDisplayListItem.TYPE_VIDEO, [CUrlItem('', Url, 0)], 0, Image, None))
  1763. except Exception: printExc()
  1764. return valTab
  1765. if 'CAM4-KAMERKI' == name:
  1766. printDBG( 'Host listsItems begin name='+name )
  1767. self.MAIN_URL = 'https://www.cam4.com'
  1768. COOKIEFILE = os_path.join(GetCookieDir(), 'cam4.cookie')
  1769. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1770. self.HTTP_HEADER['Referer'] = url
  1771. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1772. url = 'https://cam4.com/tags?json=true&index=0&count=75&category='
  1773. sts, data = self.get_Page(url, self.defaultParams)
  1774. if not sts: return valTab
  1775. self.page = 1
  1776. printDBG( 'Host listsItems data: '+data )
  1777. try:
  1778. result = byteify(simplejson.loads(data))
  1779. if result:
  1780. for item in result:
  1781. phTitle = str(item["name"])
  1782. valTab.append(CDisplayListItem(phTitle, phTitle, CDisplayListItem.TYPE_CATEGORY, [phTitle], 'CAM4-KAMERKI-clips', '', None))
  1783. except Exception:
  1784. printExc()
  1785. valTab.sort(key=lambda poz: poz.name)
  1786. #valTab.insert(0,CDisplayListItem("--- HD ---", "HD", CDisplayListItem.TYPE_CATEGORY,["hd"], 'CAM4-KAMERKI-clips', '',None))
  1787. valTab.insert(0,CDisplayListItem("--- Poland ---", "Polskie", CDisplayListItem.TYPE_CATEGORY,["female&country=pl"], 'CAM4-KAMERKI-clips', '',None))
  1788. #valTab.insert(0,CDisplayListItem("--- Couples ---", "Pary", CDisplayListItem.TYPE_CATEGORY,["couple"], 'CAM4-KAMERKI-clips', '',None))
  1789. valTab.insert(0,CDisplayListItem("--- Male ---", "Mężczyźni", CDisplayListItem.TYPE_CATEGORY,["male"], 'CAM4-KAMERKI-clips', '',None))
  1790. valTab.insert(0,CDisplayListItem("--- Transsexual ---", "Transseksualiści", CDisplayListItem.TYPE_CATEGORY,["shemale"], 'CAM4-KAMERKI-clips', '',None))
  1791. valTab.insert(0,CDisplayListItem("--- New ---", "Nowe", CDisplayListItem.TYPE_CATEGORY,["new"], 'CAM4-KAMERKI-clips', '',None))
  1792. valTab.insert(0,CDisplayListItem("--- Female ---", "Kobiety", CDisplayListItem.TYPE_CATEGORY,["female"], 'CAM4-KAMERKI-clips', '',None))
  1793. return valTab
  1794. if 'CAM4-KAMERKI-clips' == name:
  1795. printDBG( 'Host listsItems begin name='+name )
  1796. catUrl = self.currList[Index].possibleTypesOfSearch
  1797. printDBG( 'Host listsItems cat-url: '+str(catUrl) )
  1798. if catUrl == None:
  1799. self.page = 1
  1800. else:
  1801. self.page += 1
  1802. COOKIEFILE = os_path.join(GetCookieDir(), 'cam4.cookie')
  1803. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1804. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1805. Url = 'https://www.cam4.com/directoryCams?directoryJson=true&online=true&url=true&gender={0}&page={1}'.format(url, str(self.page))
  1806. sts, data = self.get_Page(Url, self.defaultParams)
  1807. if not sts: return valTab
  1808. printDBG( 'Host getResolvedURL data: '+data )
  1809. try:
  1810. result = byteify(simplejson.loads(data))
  1811. if result:
  1812. for item in result["users"]:
  1813. phTitle = str(item["username"])
  1814. try:
  1815. phImage = 'https://snapshots.xcdnpro.com/thumbnails/{0}?s={1}'.format(str(item["username"]), str(item["thumbnailId"]))
  1816. except Exception:
  1817. printExc()
  1818. phImage = str(item["profileImageLink"])
  1819. #phUrl = str(item["hlsPreviewUrl"])
  1820. try:
  1821. age = str(item["age"])
  1822. countryCode = str(item["countryCode"])
  1823. except Exception:
  1824. printExc()
  1825. phUrl = 'https://www.cam4.com/{0}'.format(str(item["username"]))
  1826. valTab.append(CDisplayListItem(phTitle,'[Age: '+age+'] ' + phTitle+'\nCountry: '+countryCode.upper(),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1827. except Exception:
  1828. printExc()
  1829. valTab.append(CDisplayListItem('Next ', 'Page: '+str(self.page), CDisplayListItem.TYPE_CATEGORY, [url], name, '', 'next'))
  1830. return valTab
  1831. if 'CAMSODA' == name:
  1832. printDBG( 'Host listsItems begin name='+name )
  1833. self.MAIN_URL = 'https://www.camsoda.com/'
  1834. COOKIEFILE = os_path.join(GetCookieDir(), 'camsoda.cookie')
  1835. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1836. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1837. sts, data = self.get_Page(url)
  1838. if not sts: return
  1839. #printDBG( 'Host listsItems data: '+data )
  1840. #"template":["username","display_name","connections","sort_value","subject_html","stream_name","tsize","server_prefix"]
  1841. dane = re.search('"results":(.*?)}]', data, re.S)
  1842. if dane:
  1843. dane = dane.group(1)+'}]'
  1844. printDBG( 'Host listsItems json: '+dane )
  1845. try:
  1846. result = simplejson.loads(dane)
  1847. tsize = '355x200'
  1848. Image = ''
  1849. if result:
  1850. for item in result:
  1851. subject_html = ''
  1852. try:
  1853. Name = str(item["username"]) #.encode("utf-8")
  1854. printDBG( 'Host Name: '+Name )
  1855. except Exception: printExc()
  1856. try:
  1857. Name = str(item["tpl"][1])
  1858. printDBG( 'Host Name: '+Name )
  1859. except Exception: printExc()
  1860. try:
  1861. stream_name = str(item["stream_name"]) #.encode("utf-8")
  1862. printDBG( 'Host stream_name: '+stream_name )
  1863. except Exception: printExc()
  1864. try:
  1865. stream_name = str(item["tpl"][2])
  1866. printDBG( 'Host stream_name: '+stream_name )
  1867. except Exception: printExc()
  1868. try:
  1869. subject_html = str(item["tpl"][5])
  1870. printDBG( 'Host subject_html: '+subject_html )
  1871. except Exception: printExc()
  1872. try:
  1873. enc = stream_name.split('-')[-1]
  1874. except Exception: printExc()
  1875. try:
  1876. Image = str(item["tpl"][9])
  1877. except Exception: printExc()
  1878. videourl = "https://www.camsoda.com/api/v1/video/vtoken/" + Name + "?username=guest_" + str(random.randrange(100, 55555))
  1879. if Image.startswith('//'): Image = 'http:' + Image
  1880. try:
  1881. phImage = urlparser.decorateUrl(phImage, {'Referer': 'http://www.camsoda.com'})
  1882. except: pass
  1883. if config.plugins.iptvplayer.camsoda.value == '1':
  1884. videourl = 'rtmp'+videourl
  1885. stream = 'rtmp'
  1886. else:
  1887. stream = 'm3u8'
  1888. if stream_name:
  1889. valTab.append(CDisplayListItem(stream_name, stream_name+' '+stream+'\n'+subject_html, CDisplayListItem.TYPE_VIDEO, [CUrlItem('', videourl, 1)], 0, Image, None))
  1890. except Exception: printExc()
  1891. return valTab
  1892. if 'STREAMATE' == name:
  1893. printDBG( 'Host listsItems begin name='+name )
  1894. self.MAIN_URL = 'https://streamate.com'
  1895. COOKIEFILE = os_path.join(GetCookieDir(), 'streamate.cookie')
  1896. query_data = { 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
  1897. try:
  1898. data = self.cm.getURLRequestData(query_data)
  1899. except Exception as e:
  1900. printExc()
  1901. return valTab
  1902. printDBG( 'Host listsItems data: '+data )
  1903. data = self.cm.ph.getDataBeetwenMarkers(data, '<div class="cats__content">', 'class="recents__list">', False)[1]
  1904. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  1905. for item in data:
  1906. Title = self._cleanHtmlStr(item).split(' ')[1]
  1907. Title = self.cm.ph.getDataBeetwenMarkers(item, '</span>', '</a>', False)[1]
  1908. Title = str(Title).strip()
  1909. Url = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1910. if Url.startswith('/'): Url = 'https://streamate.com' + Url
  1911. valTab.append(CDisplayListItem(decodeHtml(Title),decodeHtml(Title),CDisplayListItem.TYPE_CATEGORY, [Url],'STREAMATE-clips', '', None))
  1912. return valTab
  1913. if 'STREAMATE-clips' == name:
  1914. printDBG( 'Host listsItems begin name='+name )
  1915. self.MAIN_URL = 'https://streamate.com'
  1916. COOKIEFILE = os_path.join(GetCookieDir(), 'streamate.cookie')
  1917. query_data = { 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
  1918. try:
  1919. data = self.cm.getURLRequestData(query_data)
  1920. except Exception as e:
  1921. printExc()
  1922. return valTab
  1923. printDBG( 'Host listsItems data: '+data )
  1924. next = self.cm.ph.getDataBeetwenMarkers(data, 'class="pagination">', 'Next', False)[1]
  1925. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="js-dynamicsearch" data-status="online"', '</figure>')
  1926. for item in data:
  1927. phTitle = self.cm.ph.getSearchGroups(item, '''data-name=['"]([^"^']+?)['"]''', 1, True)[0]
  1928. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1929. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  1930. phImage = self.cm.ph.getSearchGroups(item, '''data-thumbid=['"]([^"^']+?)['"]''', 1, True)[0]
  1931. age = self.cm.ph.getSearchGroups(item, '''"year">([^>]+?)<''', 1, True)[0].strip()
  1932. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1933. if phImage.startswith('//'): phImage = 'http:' + phImage
  1934. phImage = 'http://m2.nsimg.net/biopic/original4x3/' + phImage
  1935. valTab.append(CDisplayListItem(decodeHtml(phTitle), decodeHtml(phTitle)+' [Age:'+age+']', CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phTitle, 1)], 0, phImage, None))
  1936. if next:
  1937. next = re.compile('''href=['"]([^'^"]+?)['"]''').findall(next)
  1938. if next:
  1939. next = next[-1]
  1940. if next.startswith('/'): next = 'https://streamate.com' + next
  1941. valTab.append(CDisplayListItem('Next', 'Page : '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  1942. return valTab
  1943. if 'NAKED' == name:
  1944. printDBG( 'Host listsItems begin name='+name )
  1945. self.MAIN_URL = 'https://www.naked.com'
  1946. COOKIEFILE = os_path.join(GetCookieDir(), 'naked.cookie')
  1947. host = 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Mobile Safari/537.36'
  1948. header = {'User-Agent': host, 'Accept':'application/json','Accept-Language':'en,en-US;q=0.7,en;q=0.3','X-Requested-With':'XMLHttpRequest','Content-Type':'application/x-www-form-urlencoded'}
  1949. query_data = {'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
  1950. try:
  1951. #data = self.cm.getURLRequestData(query_data)
  1952. sts, data = self.cm.getPage(url, query_data)
  1953. except Exception as e:
  1954. printExc()
  1955. return valTab
  1956. printDBG( 'Host listsItems data: '+data )
  1957. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'data-model-card', '<div class="each-model" data-cam-score=')
  1958. data = data.split('<a class="model-wrapper"')
  1959. if len(data): del data[0]
  1960. for item in data:
  1961. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('Model ','')
  1962. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1963. phImage = self.cm.ph.getSearchGroups(item, '''live-image-src=['"]([^"^']+?)['"]''', 1, True)[0]
  1964. desc = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  1965. age = self.cm.ph.getSearchGroups(item, '''model-age">([^>]+?)<''', 1, True)[0]
  1966. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1967. if phImage.startswith('//'): phImage = 'http:' + phImage
  1968. valTab.append(CDisplayListItem(decodeHtml(phTitle), decodeHtml(phTitle)+'\n'+desc, CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  1969. return valTab
  1970. if 'YOUJIZZ' == name:
  1971. printDBG( 'Host listsItems begin name='+name )
  1972. self.MAIN_URL = 'http://www.youjizz.com'
  1973. COOKIEFILE = os_path.join(GetCookieDir(), 'youjizz.cookie')
  1974. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  1975. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  1976. sts, data = self.get_Page(url)
  1977. if not sts: return
  1978. #printDBG( 'Host listsItems data: '+data )
  1979. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'class="footer-category category-link', 'footer-links', False)[1]
  1980. if len(data2): data = data2
  1981. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li><a href="/categories/', '</li>')
  1982. for item in data:
  1983. phTitle = self.cm.ph.getSearchGroups(item, '''">([^"^']+?)<''', 1, True)[0]
  1984. phTitle = self._cleanHtmlStr(item)
  1985. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  1986. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  1987. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'YOUJIZZ-clips', '', None))
  1988. valTab.sort(key=lambda poz: poz.name)
  1989. valTab.insert(0,CDisplayListItem("--- HD ---", "HD", CDisplayListItem.TYPE_CATEGORY,["http://www.youjizz.com/search/HighDefinition-1.html#"], 'YOUJIZZ-clips', '',None))
  1990. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,["http://www.youjizz.com/top-rated/1.html"], 'YOUJIZZ-clips', '',None))
  1991. valTab.insert(0,CDisplayListItem("--- Newest ---", "Newest", CDisplayListItem.TYPE_CATEGORY,["http://www.youjizz.com/newest-clips/1.html"], 'YOUJIZZ-clips', '',None))
  1992. valTab.insert(0,CDisplayListItem("--- Popular ---", "Popular", CDisplayListItem.TYPE_CATEGORY,["http://www.youjizz.com/most-popular/1.html"], 'YOUJIZZ-clips', '',None))
  1993. self.SEARCH_proc='YOUJIZZ-search'
  1994. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  1995. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  1996. return valTab
  1997. if 'YOUJIZZ-search' == name:
  1998. printDBG( 'Host listsItems begin name='+name )
  1999. valTab = self.listsItems(-1, 'https://www.youjizz.com/search/%s-1.html' % url.replace(' ','+'), 'YOUJIZZ-clips')
  2000. return valTab
  2001. if 'YOUJIZZ-clips' == name:
  2002. printDBG( 'Host listsItems begin name='+name )
  2003. catUrl = self.currList[Index].possibleTypesOfSearch
  2004. self.MAIN_URL = 'http://www.youjizz.com'
  2005. url = url.replace(' ','%20')
  2006. COOKIEFILE = os_path.join(GetCookieDir(), 'youjizz.cookie')
  2007. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2008. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2009. sts, data = self.get_Page(url)
  2010. if not sts: return
  2011. #printDBG( 'Host listsItems data: '+data )
  2012. next=''
  2013. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', '</div>', False)[1]
  2014. next_page = self.cm.ph.getAllItemsBeetwenMarkers(next_page, '<li', '</li>')
  2015. for item in next_page:
  2016. next = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2017. if next.startswith('/'): next = self.MAIN_URL + next
  2018. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="video-thumb', 'format-views')
  2019. for item in data:
  2020. phTitle = self.cm.ph.getSearchGroups(item, '''html'>([^"^']+?)</a>''', 1, True)[0]
  2021. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  2022. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2023. phRuntime = self.cm.ph.getSearchGroups(item, '''"time">([^"^']+?)<''', 1, True)[0]
  2024. if phImage.startswith('//'): phImage = 'http:' + phImage
  2025. valTab.append(CDisplayListItem(decodeHtml(phTitle).strip(),'['+phRuntime+'] '+decodeHtml(phTitle).strip(),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', self.MAIN_URL+phUrl, 1)], 0, phImage, None))
  2026. if next:
  2027. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  2028. return valTab
  2029. if 'DACHIX' == name:
  2030. printDBG( 'Host listsItems begin name='+name )
  2031. self.MAIN_URL = 'http://www.dachix.com'
  2032. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2033. try:
  2034. data = self.cm.getURLRequestData(query_data)
  2035. except Exception as e:
  2036. printExc()
  2037. msg = _("Last error:\n%s" % str(e))
  2038. GetIPTVNotify().push('%s' % msg, 'error', 20)
  2039. printDBG( 'Host listsItems query error url:'+url )
  2040. return valTab
  2041. #printDBG( 'Host listsItems data: '+data )
  2042. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="listing-categories">', '</div>')
  2043. for item in data:
  2044. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2045. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  2046. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2047. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+phUrl+"/videos"],'DACHIX-clips', phImage, None))
  2048. valTab.sort(key=lambda poz: poz.name)
  2049. valTab.insert(0,CDisplayListItem("--- Longest ---", "Longest", CDisplayListItem.TYPE_CATEGORY,["http://www.dachix.com/videos?sort=longest"], 'DACHIX-clips', '',None))
  2050. valTab.insert(0,CDisplayListItem("--- Most Popular ---", "Most Popular", CDisplayListItem.TYPE_CATEGORY,["http://www.dachix.com/videos?sort=popular"], 'DACHIX-clips', '',None))
  2051. valTab.insert(0,CDisplayListItem("--- Most Viewed ---", "Most Viewed", CDisplayListItem.TYPE_CATEGORY,["http://www.dachix.com/videos?sort=viewed"], 'DACHIX-clips', '',None))
  2052. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,["http://www.dachix.com/videos?sort=rated"], 'DACHIX-clips', '',None))
  2053. self.SEARCH_proc='DACHIX-search'
  2054. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2055. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2056. return valTab
  2057. if 'DACHIX-search' == name:
  2058. printDBG( 'Host listsItems begin name='+name )
  2059. valTab = self.listsItems(-1, 'http://www.dachix.com/s/%s' % url.replace(' ','+'), 'DACHIX-clips')
  2060. return valTab
  2061. if 'DACHIX-clips' == name:
  2062. printDBG( 'Host listsItems begin name='+name )
  2063. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2064. try:
  2065. data = self.cm.getURLRequestData(query_data)
  2066. except:
  2067. printDBG( 'Host listsItems query error url: '+url )
  2068. return valTab
  2069. #printDBG( 'Host listsItems data: '+data )
  2070. next = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  2071. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class=\'thumb_container video\'', '</a>')
  2072. for item in data:
  2073. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2074. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  2075. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2076. phRuntime = self.cm.ph.getSearchGroups(item, '''S">([^>]+?)[-<]''', 1, True)[0]
  2077. if phUrl.startswith('/'): phUrl = 'http://www.dachix.com' + phUrl
  2078. if phUrl.startswith('www'): phUrl = 'http://' + phUrl
  2079. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2080. if next:
  2081. if next.startswith('/'): next = 'http://www.dachix.com' + next
  2082. valTab.append(CDisplayListItem('Next', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  2083. return valTab
  2084. if 'DRTUBER' == name:
  2085. printDBG( 'Host listsItems begin name='+name )
  2086. self.MAIN_URL = 'http://www.drtuber.com'
  2087. COOKIEFILE = os_path.join(GetCookieDir(), 'drtuber.cookie')
  2088. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2089. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2090. sts, data = self.get_Page(url)
  2091. if not sts: return
  2092. #printDBG( 'Host listsItems data: '+data )
  2093. data = self.cm.ph.getDataBeetwenMarkers(data, 'contain_cols', '</div> </div> </div> </div>', False)[1]
  2094. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  2095. for item in data:
  2096. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2097. phTitle = self._cleanHtmlStr(item)
  2098. if '/gay/' in phUrl: phTitle = phTitle + ' gay'
  2099. if '/shemale/' in phUrl: phTitle = phTitle + ' shemale'
  2100. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2101. valTab.append(CDisplayListItem(phTitle,phUrl,CDisplayListItem.TYPE_CATEGORY, [phUrl],'DRTUBER-clips', '', None))
  2102. valTab.sort(key=lambda poz: poz.name)
  2103. self.SEARCH_proc='DRTUBER-search'
  2104. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2105. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2106. return valTab
  2107. if 'DRTUBER-search' == name:
  2108. printDBG( 'Host listsItems begin name='+name )
  2109. valTab = self.listsItems(-1, 'http://www.drtuber.com/search/videos/%s' % url.replace(' ','+'), 'DRTUBER-clips')
  2110. return valTab
  2111. if 'DRTUBER-clips' == name:
  2112. printDBG( 'Host listsItems begin name='+name )
  2113. COOKIEFILE = os_path.join(GetCookieDir(), 'drtuber.cookie')
  2114. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2115. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2116. sts, data = self.get_Page(url)
  2117. if not sts: return
  2118. #printDBG( 'Host listsItems data: '+data )
  2119. next = self.cm.ph.getSearchGroups(data, '''class="next"><a href=['"]([^"^']+?)['"]''', 1, True)[0]
  2120. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a href="/video/', '</a>')
  2121. for item in data:
  2122. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  2123. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2124. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2125. phRuntime = self.cm.ph.getSearchGroups(item, '''([\d]?\d\d:\d\d)''', 1, True)[0]
  2126. if phUrl.startswith('/'): phUrl = 'http://www.drtuber.com' + phUrl
  2127. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2128. if next:
  2129. if next.startswith('/'): next = self.MAIN_URL + next
  2130. valTab.append(CDisplayListItem('Next', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  2131. return valTab
  2132. if 'MYFREECAMS' == name:
  2133. printDBG( 'Host listsItems begin name='+name )
  2134. self.MAIN_URL = 'https://www.myfreecams.com/'
  2135. COOKIEFILE = os_path.join(GetCookieDir(), 'myfreecams.cookie')
  2136. rm(COOKIEFILE)
  2137. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  2138. sts, data = self.cm.getPage('https://new.myfreecams.com/server', self.defaultParams)
  2139. if not sts: return valTab
  2140. printDBG( 'Host listsItems data: '+data )
  2141. #serwery = self.cm.ph.getDataBeetwenMarkers(data, 'ServerConfig = ', ';', False)[1]
  2142. try:
  2143. result = byteify(simplejson.loads(data))
  2144. if result:
  2145. self.h5video_servers = result["h5video_servers"]
  2146. self.wzobs_servers = result["wzobs_servers"]
  2147. self.ngvideo_servers = result["ngvideo_servers"]
  2148. #self.websocket_servers = result["websocket_servers"]
  2149. #self.video_servers = result["video_servers"]
  2150. except Exception:
  2151. printExc()
  2152. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  2153. sts, data = self.cm.getPage(self.MAIN_URL, self.defaultParams)
  2154. if not sts: return valTab
  2155. printDBG( 'Host listsItems data: '+data )
  2156. self.cookieHeader = self.cm.getCookieHeader(COOKIEFILE)
  2157. self.baf = 'baf='+self.cm.getCookieItem(COOKIEFILE,'baf')+';'
  2158. self.cid = 'cid='+self.cm.getCookieItem(COOKIEFILE,'cid')+';'
  2159. age = ''
  2160. country = ''
  2161. city = ''
  2162. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class=slm_c>', '</div>')
  2163. for item in data:
  2164. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2165. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2166. phTitle = phUrl.split('/')[-1]
  2167. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  2168. if phImage.startswith('//'): phImage = 'http:' + phImage
  2169. valTab.append(CDisplayListItem(phTitle,age +phTitle+'\n'+city+' '+country,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phTitle, 1)], 0, phImage, None))
  2170. if config.plugins.iptvplayer.xxxsortmfc.value: valTab.sort(key=lambda poz: poz.name)
  2171. return valTab
  2172. if 'TNAFLIX' == name:
  2173. printDBG( 'Host listsItems begin name='+name )
  2174. self.MAIN_URL = 'https://www.tnaflix.com'
  2175. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2176. try:
  2177. data = self.cm.getURLRequestData(query_data)
  2178. except Exception as e:
  2179. printExc()
  2180. msg = _("Last error:\n%s" % str(e))
  2181. GetIPTVNotify().push('%s' % msg, 'error', 20)
  2182. printDBG( 'Host listsItems query error url:'+url )
  2183. return valTab
  2184. printDBG( 'Host listsItems data: '+data )
  2185. data = self.cm.ph.getDataBeetwenMarkers(data, 'Categories</h', 'footer', False)[1]
  2186. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  2187. for item in data:
  2188. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  2189. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2190. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2191. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  2192. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2193. if phImage.startswith('//'): phImage = 'http:' + phImage
  2194. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'TNAFLIX-clips', phImage, None))
  2195. valTab.sort(key=lambda poz: poz.name)
  2196. valTab.insert(0,CDisplayListItem("--- Featured ---", "Featured", CDisplayListItem.TYPE_CATEGORY,["https://www.tnaflix.com/featured/?d=all&period=all"], 'TNAFLIX-clips', '',None))
  2197. valTab.insert(0,CDisplayListItem("--- Most Popular ---", "Most Popular", CDisplayListItem.TYPE_CATEGORY,["https://www.tnaflix.com/popular/?d=all&period=all"], 'TNAFLIX-clips', '',None))
  2198. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,["https://www.tnaflix.com/toprated/?d=all&period=all"], 'TNAFLIX-clips', '',None))
  2199. valTab.insert(0,CDisplayListItem("--- New ---", "New", CDisplayListItem.TYPE_CATEGORY,["https://www.tnaflix.com/new/?d=all&period=all"], 'TNAFLIX-clips', '',None))
  2200. self.SEARCH_proc='TNAFLIX-search'
  2201. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2202. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2203. return valTab
  2204. if 'TNAFLIX-search' == name:
  2205. printDBG( 'Host listsItems begin name='+name )
  2206. valTab = self.listsItems(-1, 'https://www.tnaflix.com/search.php?what=%s&tab=' % url.replace(' ','+'), 'TNAFLIX-clips')
  2207. return valTab
  2208. if 'TNAFLIX-clips' == name:
  2209. printDBG( 'Host listsItems begin name='+name )
  2210. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2211. try:
  2212. data = self.cm.getURLRequestData(query_data)
  2213. except:
  2214. printDBG( 'Host listsItems query error url: '+url )
  2215. return valTab
  2216. #printDBG( 'Host listsItems data: '+data )
  2217. next = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  2218. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'data-vid=', '</li>')
  2219. for item in data:
  2220. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  2221. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2222. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  2223. phRuntime = self.cm.ph.getSearchGroups(item, '''videoDuration'>([^>]+?)<''', 1, True)[0]
  2224. Added = self.cm.ph.getSearchGroups(item, '''floatLeft\'>([^>]+?)<''', 1, True)[0]
  2225. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  2226. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2227. if phImage.startswith('//'): phImage = 'http:' + phImage
  2228. if phTitle:
  2229. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime+'] '+decodeHtml(phTitle)+'\nAdded: '+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2230. if next:
  2231. if next.startswith('/'): next = 'https://www.tnaflix.com' + next
  2232. valTab.append(CDisplayListItem('Next', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  2233. return valTab
  2234. if 'LIVEJASMIN' == name:
  2235. printDBG( 'Host listsItems begin name='+name )
  2236. valTab.insert(0,CDisplayListItem('--- Transgender ---', 'Transgender', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/transgender'], 'LIVEJASMIN-clips', '', None))
  2237. valTab.insert(0,CDisplayListItem('--- Couple ---', 'Couple', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/couple'], 'LIVEJASMIN-clips', '', None))
  2238. valTab.insert(0,CDisplayListItem('--- Mature ---', 'Mature', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/mature'], 'LIVEJASMIN-clips', '', None))
  2239. valTab.insert(0,CDisplayListItem('--- Fetish ---', 'Fetish', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/fetish'], 'LIVEJASMIN-clips', '', None))
  2240. valTab.insert(0,CDisplayListItem('--- Lesbian ---', 'Lesbian', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/lesbian'], 'LIVEJASMIN-clips', '', None))
  2241. valTab.insert(0,CDisplayListItem('--- Soul_mate ---', 'Soul_mate', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/soul_mate'], 'LIVEJASMIN-clips', '', None))
  2242. valTab.insert(0,CDisplayListItem('--- Hot_flirt ---', 'Hot_flirt', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/hot_flirt'], 'LIVEJASMIN-clips', '', None))
  2243. valTab.insert(0,CDisplayListItem('--- Girl ---', 'Girl', CDisplayListItem.TYPE_CATEGORY, ['http://www.livejasmin.com/en/girl'], 'LIVEJASMIN-clips', '', None))
  2244. return valTab
  2245. if 'LIVEJASMIN-clips' == name:
  2246. printDBG( 'Host listsItems begin name='+name )
  2247. self.MAIN_URL = 'http://www.livejasmin.com'
  2248. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2249. try: data = self.cm.getURLRequestData(query_data)
  2250. except Exception as e:
  2251. printExc()
  2252. msg = _("Last error:\n%s" % str(e))
  2253. GetIPTVNotify().push('%s' % msg, 'error', 20)
  2254. printDBG( 'Host listsItems query error cookie' )
  2255. return valTab
  2256. #printDBG( 'Host listsItems data: '+data )
  2257. sessionID = self.cm.ph.getSearchGroups(data, '''"jsm2session":['"]([^"^']+?)['"]''')[0]
  2258. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'listPagePerformers =', '];', False)[1]
  2259. result = simplejson.loads(data2+']')
  2260. phImage = ''
  2261. if result:
  2262. for item in result:
  2263. try:
  2264. phTitle = str(item["pid"])
  2265. phUrl = 'http://www.livejasmin.com/en/chat/'+phTitle+'?session='+sessionID
  2266. try:
  2267. ID = str(item["id"])
  2268. phImage = self.cm.ph.getDataBeetwenMarkers(data, 'container_'+ID, '</picture>', False)[1]
  2269. phImage = self.cm.ph.getSearchGroups(phImage, '''jpg-src=['"]([^"^']+?)['"]''')[0]
  2270. #printDBG( 'Host phImage: '+str(phImage) )
  2271. except Exception:
  2272. printExc()
  2273. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2274. except Exception:
  2275. printExc()
  2276. data2 = None
  2277. return valTab
  2278. if 'EL-LADIES' == name:
  2279. printDBG( 'Host listsItems begin name='+name )
  2280. self.MAIN_URL = 'http://www.el-ladies.com'
  2281. COOKIEFILE = os_path.join(GetCookieDir(), 'ladies.cookie')
  2282. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2283. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2284. sts, data = self.get_Page(url)
  2285. if not sts: return valTab
  2286. printDBG( 'Host listsItems data: '+data )
  2287. data = self.cm.ph.getDataBeetwenMarkers(data, 'Niches', 'Archive', False)[1]
  2288. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  2289. for item in data:
  2290. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  2291. if not phTitle: phTitle = self._cleanHtmlStr(item)
  2292. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2293. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  2294. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2295. phTitle = decodeHtml(phTitle)
  2296. #phUrl = '%s/?search=%s&fun=0&niche=%s&pnum=%s&hd=%s' % (self.MAIN_URL, phTitle, ID, str(1), 1)
  2297. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'EL-LADIES-clips', '', None))
  2298. valTab.sort(key=lambda poz: poz.name)
  2299. valTab.insert(0,CDisplayListItem("--- New ---", "New", CDisplayListItem.TYPE_CATEGORY,["http://just.eroprofile.com/rss.xml"], 'EL-LADIES-new', '',None))
  2300. self.SEARCH_proc='EL-LADIES-search'
  2301. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2302. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2303. return valTab
  2304. if 'EL-LADIES-search' == name:
  2305. printDBG( 'Host listsItems begin name='+name )
  2306. valTab = self.listsItems(-1, 'http://search.el-ladies.com/?hd=0&search=%s&fun=0&niche=0' % url.replace(' ','+'), 'EL-LADIES-clips')
  2307. return valTab
  2308. if 'EL-LADIES-clips' == name:
  2309. printDBG( 'Host listsItems begin name='+name )
  2310. COOKIEFILE = os_path.join(GetCookieDir(), 'ladies.cookie')
  2311. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2312. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2313. sts, data = self.get_Page(url)
  2314. if not sts: return valTab
  2315. printDBG( 'Host listsItems data: '+data )
  2316. data = data.split('<div class="cnt">')
  2317. if len(data): del data[0]
  2318. for item in data:
  2319. phTitle = self._cleanHtmlStr(item)
  2320. if '\n' in phTitle: phTitle = phTitle.split('\n')[0]
  2321. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2322. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  2323. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2324. if phImage.startswith('//'): phImage = 'http:' + phImage
  2325. valTab.append(CDisplayListItem(decodeHtml(phTitle), decodeHtml(phTitle), CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2326. return valTab
  2327. if 'EL-LADIES-new' == name:
  2328. printDBG( 'Host listsItems begin name='+name )
  2329. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2330. try:
  2331. data = self.cm.getURLRequestData(query_data)
  2332. except:
  2333. printDBG( 'Host listsItems query error url: '+url )
  2334. return valTab
  2335. #printDBG( 'Host listsItems data: '+data )
  2336. phMovies = re.findall('CDATA\[(.*?)\].*?src="(.*?)".*?<link>(.*?)</link>', data, re.S)
  2337. if phMovies:
  2338. for (phTitle, phImage, phUrl) in phMovies:
  2339. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2340. return valTab
  2341. if 'EXTREMETUBE' == name:
  2342. printDBG( 'Host listsItems begin name='+name )
  2343. self.MAIN_URL = 'https://www.extremetube.com'
  2344. COOKIEFILE = os_path.join(GetCookieDir(), 'extremetube.cookie')
  2345. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2346. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2347. sts, data = self.get_Page(url)
  2348. if not sts: return valTab
  2349. printDBG( 'Host listsItems data: '+data )
  2350. data = self.cm.ph.getDataBeetwenMarkers(data, 'Categories</h1>', 'footer', False)[1]
  2351. printDBG( 'Host listsItems data: '+data )
  2352. if '<option value' in data:
  2353. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<option value', '</option>')
  2354. elif 'fromPage=categories' in data:
  2355. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class="thumb-cat', '</a>')
  2356. else:
  2357. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  2358. for item in data:
  2359. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  2360. if not phTitle: phTitle = self._cleanHtmlStr(item)
  2361. phUrl = self.cm.ph.getSearchGroups(item, '''value=['"]([^"^']+?)['"]''', 1, True)[0]
  2362. if not phUrl: phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2363. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2364. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  2365. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2366. #phUrl = phUrl.replace('?fromPage=categories', '') + '?format=json&page=$PAGE$'
  2367. #if not 'json' in phUrl: phUrl = phUrl + '?format=json&page=$PAGE$'
  2368. if phTitle != "Select a Category":
  2369. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'EXTREMETUBE-clips', phImage, None))
  2370. valTab.sort(key=lambda poz: poz.name)
  2371. self.SEARCH_proc='EXTREMETUBE-search'
  2372. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2373. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2374. return valTab
  2375. if 'EXTREMETUBE-search' == name:
  2376. printDBG( 'Host listsItems begin name='+name )
  2377. valTab = self.listsItems(-1, 'https://www.extremetube.com/videos?search=%s' % url.replace(' ','+'), 'EXTREMETUBE-clips')
  2378. return valTab
  2379. if 'EXTREMETUBE-clips' == name:
  2380. printDBG( 'Host listsItems begin name='+name )
  2381. COOKIEFILE = os_path.join(GetCookieDir(), 'extremetube.cookie')
  2382. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2383. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2384. sts, data = self.get_Page(url)
  2385. if not sts: return valTab
  2386. printDBG( 'Host listsItems data: '+data )
  2387. next = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  2388. data = data.split('<li id="obj')
  2389. if len(data): del data[0]
  2390. for item in data:
  2391. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  2392. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2393. phImage = self.cm.ph.getSearchGroups(item, '''data-srcmedium=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  2394. Runtime = self.cm.ph.getSearchGroups(item, '''data-duration=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  2395. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2396. if phImage.startswith('//'): phImage = 'http:' + phImage
  2397. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Runtime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2398. if next:
  2399. if next.startswith('/'): next = self.MAIN_URL + next
  2400. valTab.append(CDisplayListItem('Next', 'Next: '+ next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  2401. return valTab
  2402. if 'XXXLIST' == name:
  2403. printDBG( 'Host listsItems begin name='+name )
  2404. self.MAIN_URL = 'xxxlist.txt'
  2405. URLLIST_FILE = 'xxxlist.txt'
  2406. self.filespath = config.plugins.iptvplayer.xxxlist.value
  2407. self.sortList = config.plugins.iptvplayer.xxxsortuj.value
  2408. self.currFileHost = IPTVFileHost()
  2409. self.currFileHost.addFile(self.filespath + URLLIST_FILE, encoding='utf-8')
  2410. tmpList = self.currFileHost.getGroups(self.sortList)
  2411. for item in tmpList:
  2412. if '' == item: title = (_("Other"))
  2413. else: title = item
  2414. valTab.append(CDisplayListItem(title,title,CDisplayListItem.TYPE_CATEGORY, [title],'XXXLIST-clips', '', None))
  2415. return valTab
  2416. if 'XXXLIST-clips' == name:
  2417. printDBG( 'Host listsItems begin name='+name )
  2418. desc = ''
  2419. icon = ''
  2420. tmpList = self.currFileHost.getAllItems(self.sortList)
  2421. for item in tmpList:
  2422. if item['group'] == url:
  2423. Title = item['title_in_group']
  2424. Url = item['url']
  2425. if item.get('icon', '') != '':
  2426. icon = item.get('icon', '')
  2427. if item.get('desc', '') != '':
  2428. desc = item['desc']
  2429. if Url.endswith('.mjpg') or Url.endswith('.cgi'):
  2430. valTab.append(CDisplayListItem(Title, Url,CDisplayListItem.TYPE_PICTURE, [CUrlItem('', Url, 1)], 0, '', None))
  2431. else:
  2432. valTab.append(CDisplayListItem(Title, Url+'\n'+desc,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', Url, 1)], 0, icon, None))
  2433. elif url == (_("Other")) and item['group'] == '':
  2434. Title = item['full_title']
  2435. Url = item['url']
  2436. if item.get('icon', '') != '':
  2437. icon = item.get('icon', '')
  2438. if item.get('desc', '') != '':
  2439. desc = item['desc']
  2440. if Url.endswith('.mjpg') or Url.endswith('.cgi'):
  2441. valTab.append(CDisplayListItem(Title, Url,CDisplayListItem.TYPE_PICTURE, [CUrlItem('', Url, 1)], 0, '', None))
  2442. else:
  2443. valTab.append(CDisplayListItem(Title, Url+'\n'+desc,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', Url, 1)], 0, icon, None))
  2444. return valTab
  2445. if 'BONGACAMS' == name:
  2446. printDBG( 'Host listsItems begin name='+name )
  2447. self.MAIN_URL = 'https://pl.bongacams.com'
  2448. COOKIEFILE = os_path.join(GetCookieDir(), 'bongacams.cookie')
  2449. #self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2450. #self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2451. #sts, data = self.get_Page(url)
  2452. #if not sts: return valTab
  2453. #printDBG( 'Host listsItems data: '+data )
  2454. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  2455. #for item in data:
  2456. # phTitle = self._cleanHtmlStr(item).strip()
  2457. # phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('/','')
  2458. # valTab.append(CDisplayListItem(phTitle,phUrl,CDisplayListItem.TYPE_CATEGORY, [phUrl],'BONGACAMS-clips', '', None))
  2459. valTab.insert(0,CDisplayListItem("--- Couples ---", "Pary", CDisplayListItem.TYPE_CATEGORY,["couples"], 'BONGACAMS-clips', '',None))
  2460. valTab.insert(0,CDisplayListItem("--- Male ---", "Mężczyźni", CDisplayListItem.TYPE_CATEGORY,["male"], 'BONGACAMS-clips', '',None))
  2461. valTab.insert(0,CDisplayListItem("--- Transsexual ---", "Transseksualiści", CDisplayListItem.TYPE_CATEGORY,["transsexual"], 'BONGACAMS-clips', '',None))
  2462. valTab.insert(0,CDisplayListItem("--- New ---", "Nowe", CDisplayListItem.TYPE_CATEGORY,["new"], 'BONGACAMS-clips', '',None))
  2463. valTab.insert(0,CDisplayListItem("--- Female ---", "Kobiety", CDisplayListItem.TYPE_CATEGORY,["females"], 'BONGACAMS-clips', '',None))
  2464. return valTab
  2465. if 'BONGACAMS-clips' == name:
  2466. printDBG( 'Host listsItems begin name='+name )
  2467. catUrl = self.currList[Index].possibleTypesOfSearch
  2468. next = url
  2469. if catUrl == None:
  2470. self.page = 1
  2471. else:
  2472. self.page += 1
  2473. COOKIEFILE = os_path.join(GetCookieDir(), 'bongacams.cookie')
  2474. url = 'https://en.bongacams.com/tools/listing_v3.php?livetab=%s&online_only=true&offset=%s&category=%s' % (url, str((self.page*24)-24), url)
  2475. host = 'Mozilla/5.0 (iPad; CPU OS 8_1_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B466 Safari/600.1.4'
  2476. header = {'User-Agent': host, 'Accept':'application/json','Accept-Language':'en,en-US;q=0.7,en;q=0.3','X-Requested-With':'XMLHttpRequest','Content-Type':'application/x-www-form-urlencoded', 'Referer':'https://en.bongacams.com/', 'Origin':'https://en.bongacams.com'}
  2477. self.defaultParams = { 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
  2478. sts, data = self.cm.getPage(url, self.defaultParams)
  2479. if not sts: return valTab
  2480. printDBG( 'second bonga-clips data: '+data )
  2481. x = 0
  2482. result = byteify(simplejson.loads(data))
  2483. if result:
  2484. try:
  2485. for item in result["models"]:
  2486. age = ''
  2487. phImage = ''
  2488. #printDBG( 'Host item: '+str(item) )
  2489. try:
  2490. online = str(item["online"])
  2491. room = str(item["room"])
  2492. phTitle = str(item["username"])
  2493. phTitle2 = str(item["display_name"])
  2494. except Exception:
  2495. printExc()
  2496. continue
  2497. try:
  2498. phImage = str(item["thumb_image"])
  2499. if phImage.startswith('//'): phImage = 'http:' + phImage
  2500. except Exception:
  2501. printExc()
  2502. bitrate = ''
  2503. try:
  2504. bitrate = str(item["vq"])
  2505. except Exception:
  2506. printExc()
  2507. try:
  2508. age = ' [Age: '+str(item["display_age"])+'] '
  2509. except Exception:
  2510. printExc()
  2511. printDBG( 'Host phTitle: '+phTitle )
  2512. printDBG( 'Host online: '+online )
  2513. printDBG( 'Host room: '+room )
  2514. phUrl = phTitle
  2515. if room != 'vip' and online == 'True':
  2516. x += 1
  2517. valTab.append(CDisplayListItem(phTitle2+' ['+bitrate.upper()+']',phTitle2+' ('+phTitle+') '+age+' ['+bitrate.upper()+']',CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2518. printDBG( 'Host ile: '+str(x) )
  2519. except Exception:
  2520. printExc()
  2521. valTab.append(CDisplayListItem('Next', 'Page: '+str(self.page+1), CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'Next'))
  2522. return valTab
  2523. if 'RUSPORN' == name:
  2524. printDBG( 'Host listsItems begin name='+name )
  2525. self.MAIN_URL = 'http://rusporn.tv'
  2526. url = 'https://rusvidos.tv/index2.php'
  2527. COOKIEFILE = os_path.join(GetCookieDir(), 'rusporn.cookie')
  2528. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2529. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2530. sts, data = self.get_Page(url)
  2531. if not sts: return valTab
  2532. printDBG( 'Host listsItems data: '+data )
  2533. data = self.cm.ph.getDataBeetwenMarkers(data, 'category-list', '<div class="cls">', False)[1]
  2534. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  2535. for item in data:
  2536. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)[<"]''', 1, True)[0]
  2537. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2538. printDBG( 'Host listsItems phUrl: ' +phUrl )
  2539. printDBG( 'Host listsItems phTitle: '+phTitle )
  2540. valTab.append(CDisplayListItem(phTitle,phUrl,CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'RUSPORN-clips', '', phUrl))
  2541. self.SEARCH_proc='RUSPORN-search'
  2542. #valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2543. #valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2544. return valTab
  2545. if 'RUSPORN-search' == name:
  2546. printDBG( 'Host listsItems begin name='+name )
  2547. valTab = self.listsItems(-1, 'https://rusvidos.tv/poisk/?q=%s' % url.replace(' ','+'), 'RUSPORN-clips')
  2548. return valTab
  2549. if 'RUSPORN-clips' == name:
  2550. printDBG( 'Host listsItems begin name='+name )
  2551. catUrl = self.currList[Index].possibleTypesOfSearch
  2552. sts, data = self.get_Page(url)
  2553. if not sts: return valTab
  2554. printDBG( 'Host listsItems data: '+data )
  2555. next = self.cm.ph.getSearchGroups(data, '''class="next".*?from:(\d)"''', 1, True)[0]
  2556. data = data.split('class="item')
  2557. if len(data): del data[0]
  2558. for item in data:
  2559. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  2560. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2561. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2562. if 'base64' in phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  2563. if phImage.startswith('//'): phImage = 'http:' + phImage
  2564. Time = self.cm.ph.getSearchGroups(item, '''</i>([^>]+?)<''', 1, True)[0]
  2565. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time.strip()+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2566. if next:
  2567. next_page = url.replace('&'+url.split('&')[-1],'')+'&from='+str(next)
  2568. if '/search/' in url: next_page = url.replace('&'+url.split('&')[-1],'')+'&from_videos='+str(next)
  2569. valTab.append(CDisplayListItem('Next', next_page.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  2570. return valTab
  2571. if 'PORN720' == name:
  2572. printDBG( 'Host listsItems begin name='+name )
  2573. self.MAIN_URL = 'http://porn720.net'
  2574. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2575. try:
  2576. data = self.cm.getURLRequestData(query_data)
  2577. except Exception as e:
  2578. printExc()
  2579. msg = _("Last error:\n%s" % str(e))
  2580. GetIPTVNotify().push('%s' % msg, 'error', 20)
  2581. printDBG( 'Host listsItems query error url:'+url )
  2582. return valTab
  2583. printDBG( 'Host listsItems data: '+data )
  2584. data = self.cm.ph.getDataBeetwenMarkers(data, 'id="menu-menu', 'class="sub-header', False)[1]
  2585. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  2586. for item in data:
  2587. phTitle = self._cleanHtmlStr(item)
  2588. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2589. valTab.append(CDisplayListItem(phUrl.split('/')[-1],phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORN720-clips', '', phUrl))
  2590. return valTab
  2591. if 'PORN720-clips' == name:
  2592. printDBG( 'Host listsItems begin name='+name )
  2593. catUrl = self.currList[Index].possibleTypesOfSearch
  2594. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2595. try:
  2596. data = self.cm.getURLRequestData(query_data)
  2597. except:
  2598. printDBG( 'Host listsItems query error url: '+url )
  2599. return valTab
  2600. printDBG( 'Host listsItems data: '+data )
  2601. next = re.search('rel="next".*?href="(.*?)"', data, re.S)
  2602. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<figure', '</figure>')
  2603. for item in data:
  2604. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  2605. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2606. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2607. Time = self.cm.ph.getSearchGroups(item, '''clock-o"></i>([^>]+?)<''', 1, True)[0].strip()
  2608. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2609. if next:
  2610. phUrl = next.group(1)
  2611. valTab.append(CDisplayListItem('Next ', 'Page: '+phUrl, CDisplayListItem.TYPE_CATEGORY, [phUrl], name, '', catUrl))
  2612. return valTab
  2613. if 'PORNTREX' == name:
  2614. printDBG( 'Host listsItems begin name='+name )
  2615. self.MAIN_URL = 'http://www.porntrex.com'
  2616. self.format4k = config.plugins.iptvplayer.xxx4k.value
  2617. COOKIEFILE = os_path.join(GetCookieDir(), 'porntrex.cookie')
  2618. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  2619. sts, data = self.cm.getPage(url, self.defaultParams)
  2620. if not sts: return valTab
  2621. self.page = 0
  2622. #printDBG( 'Host listsItems data: '+data )
  2623. #data = self.cm.ph.getDataBeetwenMarkers(data, 'class="list-categories', 'footer', False)[1]
  2624. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="item"', '</a>')
  2625. for item in data:
  2626. #printDBG( 'Host item data: '+str(item) )
  2627. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  2628. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2629. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2630. if phImage.startswith('//'): phImage = 'https:' + phImage
  2631. try:
  2632. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  2633. except: pass
  2634. if phTitle:
  2635. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORNTREX-clips', phImage, None))
  2636. valTab.sort(key=lambda poz: poz.name)
  2637. self.SEARCH_proc='PORNTREX-search'
  2638. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2639. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2640. return valTab
  2641. if 'PORNTREX-search' == name:
  2642. printDBG( 'Host listsItems begin name='+name )
  2643. valTab = self.listsItems(-1, 'https://www.porntrex.com/search/%s/' % url.replace(' ','+'), 'PORNTREX-clips')
  2644. return valTab
  2645. if 'PORNTREX-clips' == name:
  2646. printDBG( 'Host listsItems begin name='+name )
  2647. catUrl = self.currList[Index].possibleTypesOfSearch
  2648. if catUrl == None:
  2649. self.page = 1
  2650. else:
  2651. self.page += 1
  2652. if not '/search/' in url:
  2653. url = url + '?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=%s' % self.page
  2654. else:
  2655. if self.page>1:
  2656. url = url + '?mode=async&function=get_block&block_id=list_videos_videos&q=dildo&category_ids=&sort_by=post_date&from_videos=%s&from_albums=%s' % (self.page, self.page)
  2657. COOKIEFILE = os_path.join(GetCookieDir(), 'porntrex.cookie')
  2658. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  2659. sts, data = self.cm.getPage(url, self.defaultParams)
  2660. if not sts: return valTab
  2661. printDBG( 'Host listsItems data: '+data )
  2662. next = self.cm.ph.getSearchGroups(data, '''<li class="next"><a href="#videos".*?data-parameters="sort_by:post_date;from:([^"^']+?)['"]''', 1, True)[0]
  2663. if not next: next = self.cm.ph.getSearchGroups(data, '''<li class="next"><a href="#.*?from_albums:([^"^']+?)['"]''', 1, True)[0]
  2664. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="video-', '</li></ul></div>')
  2665. #printDBG( 'Host2 getResolvedURL data: '+str(data) )
  2666. for item in data:
  2667. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  2668. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  2669. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  2670. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2671. Time = self.cm.ph.getSearchGroups(item, '''fa-clock-o"></i>([^"^']+?)<''', 1, True)[0].strip()
  2672. if phImage.startswith('//'): phImage = 'https:' + phImage
  2673. try:
  2674. phImage = urlparser.decorateUrl(phImage, {'Referer': phUrl})
  2675. except: pass
  2676. if not '>Private<' in item:
  2677. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2678. if next:
  2679. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [url], name, '', 'next'))
  2680. return valTab
  2681. if 'PORNDOE' == name:
  2682. printDBG( 'Host listsItems begin name='+name )
  2683. self.MAIN_URL = 'http://porndoe.com'
  2684. COOKIEFILE = os_path.join(GetCookieDir(), 'porndoe.cookie')
  2685. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2686. self.HTTP_HEADER['Referer'] = url
  2687. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2688. sts, data = self.get_Page(url, self.defaultParams)
  2689. if not sts: return valTab
  2690. printDBG( 'Host listsItems data: '+data )
  2691. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  2692. for item in data:
  2693. phTitle = self._cleanHtmlStr(item).strip()
  2694. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/category/[^"^']+?)['"]''', 1, True)[0]
  2695. if phUrl:
  2696. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+phUrl],'PORNDOE-clips', '', None))
  2697. valTab.sort(key=lambda poz: poz.name)
  2698. valTab.insert(0,CDisplayListItem("--- By duration ---", "By duration", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=duration-down'], 'PORNDOE-clips', '',None))
  2699. valTab.insert(0,CDisplayListItem("--- Most popular ---", "Most popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=likes-down'], 'PORNDOE-clips', '',None))
  2700. valTab.insert(0,CDisplayListItem("--- Most viewed ---", "Most viewed", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=views-down'], 'PORNDOE-clips', '',None))
  2701. valTab.insert(0,CDisplayListItem("--- Most recent ---", "Most recent", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos'], 'PORNDOE-clips', '',None))
  2702. self.SEARCH_proc='porndoe-search'
  2703. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2704. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2705. return valTab
  2706. if 'porndoe-search' == name:
  2707. printDBG( 'Host listsItems begin name='+name )
  2708. valTab = self.listsItems(-1, 'http://porndoe.com/search?keywords=%s' % url.replace(' ','+'), 'PORNDOE-clips')
  2709. return valTab
  2710. if 'PORNDOE-clips' == name:
  2711. printDBG( 'Host listsItems begin name='+name )
  2712. catUrl = self.currList[Index].possibleTypesOfSearch
  2713. self.MAIN_URL = 'http://porndoe.com'
  2714. host = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'
  2715. COOKIEFILE = os_path.join(GetCookieDir(), 'porndoe.cookie')
  2716. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2717. self.HTTP_HEADER['Referer'] = url
  2718. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2719. sts, data = self.get_Page(url, self.defaultParams)
  2720. if not sts: return valTab
  2721. printDBG( 'Host listsItems data: '+data )
  2722. next = self.cm.ph.getSearchGroups(data, '''<link\srel=['"]next['"]\shref=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  2723. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'data-id=', 'item -->')
  2724. data = data.split('data-id=')
  2725. if len(data): del data[0]
  2726. for item in data:
  2727. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  2728. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2729. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  2730. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''img src=['"]([^"^']+?)['"]''', 1, True)[0]
  2731. if phUrl.startswith('/'): phUrl = 'https://www.porndoe.com'+ phUrl
  2732. phImage = urlparser.decorateUrl(phImage, {'Referer': phUrl, 'User-Agent': host})
  2733. Time = self.cm.ph.getSearchGroups(item, '''([\d]?\d\d:\d\d)''', 1, True)[0]
  2734. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2735. if next:
  2736. if next.startswith('/'): next = self.MAIN_URL + next
  2737. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  2738. return valTab
  2739. if 'PORNFROMCZECH' == name:
  2740. printDBG( 'Host listsItems begin name='+name )
  2741. self.MAIN_URL = 'http://www.pornfromczech.com'
  2742. COOKIEFILE = os_path.join(GetCookieDir(), 'pornfromczech.cookie')
  2743. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2744. sts, data = self.getPage(url, 'pornfromczech.cookie', 'pornfromczech.com', self.defaultParams)
  2745. if not sts: return valTab
  2746. printDBG( 'Host listsItems data: '+str(data) )
  2747. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li id="menu-item', '</li>')
  2748. for item in data:
  2749. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2750. phTitle = self._cleanHtmlStr(item)
  2751. valTab.append(CDisplayListItem(decodeHtml(phTitle),phUrl,CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORNFROMCZECH-clips', '', phUrl))
  2752. self.SEARCH_proc='PORNFROMCZECH-search'
  2753. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2754. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2755. return valTab
  2756. if 'PORNFROMCZECH-search' == name:
  2757. printDBG( 'Host listsItems begin name='+name )
  2758. valTab = self.listsItems(-1, 'http://pornfromczech.com/?s=%s&x=0&y=0' % url.replace(' ','+'), 'PORNFROMCZECH-clips')
  2759. return valTab
  2760. if 'PORNFROMCZECH-clips' == name:
  2761. printDBG( 'Host listsItems begin name='+name )
  2762. COOKIEFILE = os_path.join(GetCookieDir(), 'pornfromczech.cookie')
  2763. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2764. sts, data = self.getPage(url, 'pornfromczech.cookie', 'pornfromczech.com', self.defaultParams)
  2765. if not sts: return valTab
  2766. printDBG( 'Host listsItems data: '+str(data) )
  2767. Movies = re.findall('<div\sclass="thumb">.*?<a\shref="(.*?)".*?title="(.*?)">.*?<img\ssrc="(.*?)".*?<p class="duration">(.*?)</p>', data, re.S)
  2768. if Movies:
  2769. for (phUrl, phTitle, phImage, Time) in Movies:
  2770. Time = Time.strip()
  2771. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  2772. valTab.append(CDisplayListItem(decodeHtml(phTitle), '['+Time+'] '+decodeHtml(phTitle), CDisplayListItem.TYPE_CATEGORY, [phUrl], 'PORNFROMCZECH-serwer', phImage, decodeHtml(phTitle)))
  2773. match = re.search('rel="next" href="(.*?)"', data, re.S)
  2774. if match:
  2775. phUrl = match.group(1)
  2776. valTab.append(CDisplayListItem('Next ', 'Page: '+phUrl, CDisplayListItem.TYPE_CATEGORY, [phUrl], name, '', None))
  2777. return valTab
  2778. if 'PORNFROMCZECH-serwer' == name:
  2779. printDBG( 'Host listsItems begin name='+name )
  2780. catUrl = self.currList[Index].possibleTypesOfSearch
  2781. COOKIEFILE = os_path.join(GetCookieDir(), 'pornfromczech.cookie')
  2782. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2783. sts, data = self.getPage(url, 'pornfromczech.cookie', 'pornfromczech.com', self.defaultParams)
  2784. if not sts: return valTab
  2785. printDBG( 'Host listsItems data: '+str(data) )
  2786. phserwer = ''
  2787. phName = catUrl
  2788. data = ph.IFRAME.findall(data)
  2789. for item in data:
  2790. phUrl = self.cm.getFullUrl(item[1])
  2791. phserwer = phUrl.split('/')[2]+' - '
  2792. if 'exosrv' in phUrl: continue
  2793. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  2794. valTab.append(CDisplayListItem(phserwer+phName,phUrl,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, '', None))
  2795. return valTab
  2796. if 'FILMYPORNO' == name:
  2797. printDBG( 'Host listsItems begin name='+name )
  2798. self.MAIN_URL = 'http://www.filmyporno.tv'
  2799. COOKIEFILE = os_path.join(GetCookieDir(), 'filmyporno.cookie')
  2800. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2801. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2802. sts, data = self.get_Page(url)
  2803. if not sts: return valTab
  2804. #printDBG( 'Host listsItems data: '+data )
  2805. #data = self.cm.ph.getDataBeetwenMarkers(data, '<h2>Kategorie', 'footer-top-col', False)[1]
  2806. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'item--channel col', '</div>')
  2807. for item in data:
  2808. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  2809. phImage = self.cm.ph.getSearchGroups(item, '''img\ssrc=['"]([^"^']+?)['"]''', 1, True)[0]
  2810. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2811. if phImage.startswith('//'): phImage = 'http:' + phImage
  2812. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'FILMYPORNO-clips', phImage, phUrl))
  2813. valTab.insert(0,CDisplayListItem("--- NAJDŁUŻSZE ---", "NAJDŁUŻSZE", CDisplayListItem.TYPE_CATEGORY,["http://www.filmyporno.tv/longest/"], 'FILMYPORNO-clips', '',None))
  2814. valTab.insert(0,CDisplayListItem("--- NAJCZĘŚCIEJ DYSKUTOWANE ---","NAJCZĘŚCIEJ DYSKUTOWANE", CDisplayListItem.TYPE_CATEGORY,["http://www.filmyporno.tv/most-discussed/"], 'FILMYPORNO-clips', '',None))
  2815. valTab.insert(0,CDisplayListItem("--- NAJLEPIEJ OCENIONE ---", "NAJLEPIEJ OCENIONE", CDisplayListItem.TYPE_CATEGORY,["http://www.filmyporno.tv/top-rated/"], 'FILMYPORNO-clips', '',None))
  2816. valTab.insert(0,CDisplayListItem("--- NAJPOPULARNIEJSZE ---", "NAJPOPULARNIEJSZE", CDisplayListItem.TYPE_CATEGORY,["http://www.filmyporno.tv/most-viewed/"], 'FILMYPORNO-clips', '',None))
  2817. valTab.insert(0,CDisplayListItem("--- NOWE FILMY ---", "NOWE FILMY", CDisplayListItem.TYPE_CATEGORY,["http://www.filmyporno.tv/videos/"], 'FILMYPORNO-clips', '',None))
  2818. self.SEARCH_proc='FILMYPORNO-search'
  2819. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2820. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2821. return valTab
  2822. if 'FILMYPORNO-search' == name:
  2823. printDBG( 'Host listsItems begin name='+name )
  2824. valTab = self.listsItems(-1, 'https://www.filmyporno.tv/search/%s/' % url.replace(' ','+'), 'FILMYPORNO-clips')
  2825. return valTab
  2826. if 'FILMYPORNO-clips' == name:
  2827. printDBG( 'Host listsItems begin name='+name )
  2828. catUrl = self.currList[Index].possibleTypesOfSearch
  2829. COOKIEFILE = os_path.join(GetCookieDir(), 'filmyporno.cookie')
  2830. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2831. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2832. sts, data = self.get_Page(url)
  2833. if not sts: return valTab
  2834. #printDBG( 'Host listsItems data: '+data )
  2835. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'rel="next"', '/>', False)[1]
  2836. next_page = self.cm.ph.getSearchGroups(next_page, '''href=['"]([^"^']+?)['"]''')[0]
  2837. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'item-col col', '</div>')
  2838. for item in data:
  2839. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  2840. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2841. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2842. Time = self.cm.ph.getSearchGroups(item, '''time">([^"^']+?)<''', 1, True)[0]
  2843. if phImage.startswith('//'): phImage = 'http:' + phImage
  2844. Time = Time.strip()
  2845. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2846. if next_page:
  2847. url = re.sub('page.+', '', url)
  2848. valTab.append(CDisplayListItem('Next ', 'Page: '+url+next_page, CDisplayListItem.TYPE_CATEGORY, [url+next_page], name, '', None))
  2849. return valTab
  2850. if 'CLIPHUNTER' == name:
  2851. printDBG( 'Host listsItems begin name='+name )
  2852. self.MAIN_URL = 'http://www.cliphunter.com'
  2853. COOKIEFILE = os_path.join(GetCookieDir(), 'cliphunter.cookie')
  2854. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2855. self.HTTP_HEADER['Referer'] = url
  2856. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2857. sts, data = self.get_Page(url, self.defaultParams)
  2858. if not sts: return valTab
  2859. #printDBG( 'Host listsItems data: '+data )
  2860. parse = re.search('id="submenu-categories">(.*?)</div>', data, re.S)
  2861. if parse:
  2862. phCats = re.findall('href="(/categories/.*?)".*?>(.*?)<', parse.group(1), re.S)
  2863. if phCats:
  2864. for (phUrl, phTitle) in phCats:
  2865. phUrl = 'http://www.cliphunter.com%s/' % phUrl.replace(' ','%20')
  2866. if phTitle <> "More ... " and phTitle <> "HD":
  2867. valTab.append(CDisplayListItem(decodeHtml(phTitle),phUrl,CDisplayListItem.TYPE_CATEGORY, [phUrl],'CLIPHUNTER-clips', '', phUrl))
  2868. self.SEARCH_proc='CLIPHUNTER-search'
  2869. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2870. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2871. return valTab
  2872. if 'CLIPHUNTER-search' == name:
  2873. printDBG( 'Host listsItems begin name='+name )
  2874. valTab = self.listsItems(-1, 'http://www.cliphunter.com/search/%s' % url.replace(' ','+'), 'CLIPHUNTER-clips')
  2875. return valTab
  2876. if 'CLIPHUNTER-clips' == name:
  2877. printDBG( 'Host listsItems begin name='+name )
  2878. catUrl = self.currList[Index].possibleTypesOfSearch
  2879. COOKIEFILE = os_path.join(GetCookieDir(), 'cliphunter.cookie')
  2880. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2881. self.HTTP_HEADER['Referer'] = url
  2882. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2883. sts, data = self.get_Page(url, self.defaultParams)
  2884. if not sts: return valTab
  2885. printDBG( 'Host listsItems data: '+data )
  2886. match = re.search('rel="next" href="(.*?)"', data, re.S)
  2887. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li mId=', '</li>')
  2888. for item in data:
  2889. phTitle = self.cm.ph.getSearchGroups(item, '''vttl.*?">([^>]+?)<''', 1, True)[0].strip()
  2890. if not phTitle: phTitle = self._cleanHtmlStr(item).split(' ')[4].strip()
  2891. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2892. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  2893. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2894. Time = self.cm.ph.getSearchGroups(item, '''pop-execute">([^>]+?)<''', 1, True)[0]
  2895. if phImage.startswith('//'): phImage = 'http:' + phImage
  2896. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  2897. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2898. Time = Time.strip()
  2899. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  2900. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2901. if match:
  2902. next = match.group(1)
  2903. if next.startswith('/'): next = self.MAIN_URL + next
  2904. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  2905. return valTab
  2906. if 'EMPFLIX' == name:
  2907. self.MAIN_URL = 'https://www.empflix.com'
  2908. COOKIEFILE = os_path.join(GetCookieDir(), 'empflix.cookie')
  2909. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2910. self.HTTP_HEADER['Referer'] = url
  2911. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2912. sts, data = self.get_Page(url, self.defaultParams)
  2913. if not sts: return
  2914. #printDBG( 'Host listsItems data: '+data )
  2915. genre = re.findall('"thumb"\shref="(.*?)".*?src="(.*?)".*?title="(.*?)"', data, re.S)
  2916. if genre:
  2917. for (phUrl, phImage, phTitle) in genre:
  2918. phTitle = decodeHtml(phTitle).strip()
  2919. phImage = 'http:'+phImage
  2920. if not phTitle == "All":
  2921. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+phUrl],'EMPFLIX-clips', phImage, None))
  2922. valTab.insert(0,CDisplayListItem("--- Featured ---", "Featured", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/featured/?d=all&period=all"], 'EMPFLIX-clips', '',None))
  2923. valTab.insert(0,CDisplayListItem("--- Most Popular ---", "Most Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/popular/?d=all&period=all"], 'EMPFLIX-clips', '',None))
  2924. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/toprated/?d=all&period=all"], 'EMPFLIX-clips', '',None))
  2925. valTab.insert(0,CDisplayListItem("--- New ---", "New", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/new/?d=all&period=all"], 'EMPFLIX-clips', '',None))
  2926. self.SEARCH_proc='EMPFLIX-search'
  2927. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2928. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2929. return valTab
  2930. if 'EMPFLIX-search' == name:
  2931. printDBG( 'Host listsItems begin name='+name )
  2932. valTab = self.listsItems(-1, 'https://www.empflix.com/search.php?what=%s&tab=' % url.replace(' ','+'), 'EMPFLIX-clips')
  2933. return valTab
  2934. if 'EMPFLIX-clips' == name:
  2935. COOKIEFILE = os_path.join(GetCookieDir(), 'empflix.cookie')
  2936. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  2937. self.HTTP_HEADER['Referer'] = url
  2938. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  2939. sts, data = self.get_Page(url, self.defaultParams)
  2940. if not sts: return valtab
  2941. printDBG( 'Host listsItems data: '+data )
  2942. match = re.findall('<a class="llNav".*?href="(.*?)"', data, re.S)
  2943. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'data-vid=', '</li>')
  2944. for item in data:
  2945. phTitle = self.cm.ph.getSearchGroups(item, '''data-name=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  2946. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  2947. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  2948. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  2949. phRuntime = self.cm.ph.getSearchGroups(item, '''videoDuration\'>([^>]+?)<''', 1, True)[0]
  2950. Added = self.cm.ph.getSearchGroups(item, '''floatLeft\'>([^>]+?)<''', 1, True)[0]
  2951. if phImage.startswith('//'): phImage = 'http:' + phImage
  2952. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  2953. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  2954. if phTitle:
  2955. valTab.append(CDisplayListItem(phTitle,'['+phRuntime+'] '+phTitle+'\nAdded: '+ Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  2956. if match:
  2957. phUrl = match[0]
  2958. printDBG( 'Host listsItems page phUrl: '+phUrl )
  2959. valTab.append(CDisplayListItem('Next', 'Page: '+phUrl.split('/')[-1].replace('?d=all',''), CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+phUrl], name, '', None))
  2960. return valTab
  2961. if 'THUMBZILLA' == name:
  2962. printDBG( 'Host listsItems begin name='+name )
  2963. self.MAIN_URL = 'http://www.thumbzilla.com'
  2964. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2965. try:
  2966. data = self.cm.getURLRequestData(query_data)
  2967. except Exception as e:
  2968. printExc()
  2969. msg = _("Last error:\n%s" % str(e))
  2970. GetIPTVNotify().push('%s' % msg, 'error', 20)
  2971. printDBG( 'Host listsItems query error url:'+url )
  2972. return valTab
  2973. #printDBG( 'Host listsItems data: '+data )
  2974. Cats = re.findall('href="(/categories/.*?)".*?click\',\s\'(.*?)\'', data, re.S)
  2975. if Cats:
  2976. for (phUrl, phTitle) in Cats:
  2977. phTitle = decodeHtml(phTitle)
  2978. if not phTitle == "All":
  2979. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [self.MAIN_URL+phUrl],'THUMBZILLA-clips', '', None))
  2980. valTab.insert(0,CDisplayListItem("--- Homemade ---", "Homemade", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/homemade"], 'THUMBZILLA-clips', '',None))
  2981. valTab.insert(0,CDisplayListItem("--- HD Videos ---","HD Videos", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/hd"], 'THUMBZILLA-clips', '',None))
  2982. valTab.insert(0,CDisplayListItem("--- Popular Videos ---", "Popular Videos", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/popular"], 'THUMBZILLA-clips', '',None))
  2983. valTab.insert(0,CDisplayListItem("--- Top Videos ---", "Top Videos", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/top"], 'THUMBZILLA-clips', '',None))
  2984. valTab.insert(0,CDisplayListItem("--- Trending ---", "Trending", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/trending"], 'THUMBZILLA-clips', '',None))
  2985. valTab.insert(0,CDisplayListItem("--- Newest ---", "Newest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/newest"], 'THUMBZILLA-clips', '',None))
  2986. self.SEARCH_proc='THUMBZILLA-search'
  2987. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  2988. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  2989. return valTab
  2990. if 'THUMBZILLA-search' == name:
  2991. printDBG( 'Host listsItems begin name='+name )
  2992. valTab = self.listsItems(-1, 'http://www.thumbzilla.com/tags/%s' % url.replace(' ','+'), 'THUMBZILLA-clips')
  2993. return valTab
  2994. if 'THUMBZILLA-clips' == name:
  2995. printDBG( 'Host listsItems begin name='+name )
  2996. self.MAIN_URL = 'http://www.thumbzilla.com'
  2997. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  2998. try:
  2999. data = self.cm.getURLRequestData(query_data)
  3000. except:
  3001. printDBG( 'Host listsItems query error url: '+url )
  3002. return valTab
  3003. #printDBG( 'Host listsItems data: '+data )
  3004. phMovies = re.findall('href="(/video/.*?)".*?src="(.*?)".*?"title">(.*?)<.*?"duration">(.*?)<', data, re.S)
  3005. if phMovies:
  3006. for ( phUrl, phImage, phTitle, phRuntime) in phMovies:
  3007. if phUrl[:2] == "//":
  3008. phUrl = "http:" + phUrl
  3009. else:
  3010. phUrl = self.MAIN_URL + phUrl
  3011. if phImage[:2] == "//":
  3012. phImage = "http:" + phImage
  3013. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3014. match = re.findall('"next" href="(.*?)"', data, re.S)
  3015. if match:
  3016. phUrl = match[0]
  3017. valTab.append(CDisplayListItem('Next', 'Page: '+phUrl, CDisplayListItem.TYPE_CATEGORY, [phUrl], name, '', None))
  3018. self.MAIN_URL = ''
  3019. return valTab
  3020. if 'ADULTTV' == name:
  3021. printDBG( 'Host listsItems begin name='+name )
  3022. self.MAIN_URL = 'http://www.adulttvlive.net'
  3023. COOKIEFILE = os_path.join(GetCookieDir(), 'adulttv.cookie')
  3024. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3025. sts, data = self.getPage(url, 'adulttv.cookie', 'adulttv.net', self.defaultParams)
  3026. if not sts: return ''
  3027. printDBG( 'Host listsItems data1: '+data )
  3028. next_page = self.cm.ph.getSearchGroups(data, '''<link\s*rel=['"]next['"]\s*href=['"]([^"^']+?)['"]''', 1, True)[0]
  3029. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  3030. for item in data:
  3031. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  3032. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  3033. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3034. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3035. if phImage.startswith('//'): phImage = 'http:' + phImage
  3036. if phImage.startswith('/'): phImage = 'http://www.adulttvlive.net' + phImage
  3037. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  3038. if phUrl.startswith('/'): phUrl = 'http://www.adulttvlive.net' + phUrl
  3039. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3040. catUrl = self.currList[Index].possibleTypesOfSearch
  3041. if catUrl == None:
  3042. valTab.insert(0,CDisplayListItem('BSX24','BSX24',CDisplayListItem.TYPE_VIDEO, [CUrlItem('', 'http://publish.thewebstream.co:1935/bsx24/livestream/playlist.m3u8', 0)], 0, 'http://ero-tv.org/wp-content/uploads/2014/08/babestation24.gif', None))
  3043. valTab.insert(0,CDisplayListItem('PassionXXX','PassionXXX',CDisplayListItem.TYPE_VIDEO, [CUrlItem('', 'http://publish.thewebstream.co:1935/ppv/_definst_/rampanttv_passionxxx/playlist.m3u8', 0)], 0, 'https://pbs.twimg.com/profile_images/1001362356264464384/fQVOhNLk_400x400.jpg', None))
  3044. if next_page:
  3045. valTab.append(CDisplayListItem('Next', 'Page: '+next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', 'next'))
  3046. return valTab
  3047. if 'YUVUTU' == name:
  3048. printDBG( 'Host listsItems begin name='+name )
  3049. self.MAIN_URL = 'http://www.yuvutu.com'
  3050. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  3051. try:
  3052. data = self.cm.getURLRequestData(query_data)
  3053. except Exception as e:
  3054. printExc()
  3055. msg = _("Last error:\n%s" % str(e))
  3056. GetIPTVNotify().push('%s' % msg, 'error', 20)
  3057. printDBG( 'Host listsItems query error url:'+url )
  3058. return valTab
  3059. #printDBG( 'Host listsItems data: '+data )
  3060. self.page = 1
  3061. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="yv-element', 'videos</span>')
  3062. for item in data:
  3063. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3064. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  3065. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3066. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  3067. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3068. phTitle = re.sub(' - .+', '', phTitle)
  3069. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'YUVUTU-clips', phImage, None))
  3070. return valTab
  3071. if 'YUVUTU-clips' == name:
  3072. printDBG( 'Host listsItems begin name='+name )
  3073. catUrl = self.currList[Index].possibleTypesOfSearch
  3074. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  3075. try:
  3076. data = self.cm.getURLRequestData(query_data)
  3077. except:
  3078. printDBG( 'Host listsItems query error url: '+url )
  3079. return valTab
  3080. #printDBG( 'Host listsItems data: '+data )
  3081. self.page += 1
  3082. phMovies = re.findall('class="thumb-image">.*?href="(.*?)".*?src="(.*?)".*?title="(.*?)"', data, re.S)
  3083. if phMovies:
  3084. for ( phUrl, phImage, phTitle ) in phMovies:
  3085. phTitle = phTitle.replace(' - ','')
  3086. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', self.MAIN_URL+phUrl, 1)], 0, phImage, None))
  3087. url = re.sub('page.+', '', url)
  3088. valTab.append(CDisplayListItem('Next', 'Page: '+str(self.page), CDisplayListItem.TYPE_CATEGORY, [url+'page/'+str(self.page)+'/'], name, '', None))
  3089. return valTab
  3090. if 'PORNICOM' == name:
  3091. printDBG( 'Host listsItems begin name='+name )
  3092. self.MAIN_URL = 'http://pornicom.com'
  3093. COOKIEFILE = os_path.join(GetCookieDir(), 'pornicom.cookie')
  3094. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3095. self.HTTP_HEADER['Referer'] = url
  3096. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3097. sts, data = self.get_Page(url, self.defaultParams)
  3098. if not sts: return valtab
  3099. printDBG( 'Host listsItems data: '+data )
  3100. data = self.cm.ph.getDataBeetwenMarkers(data, '<div class="items-list">', 'footer', False)[1]
  3101. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="item">', 'quantity')
  3102. for item in data:
  3103. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  3104. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3105. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3106. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3107. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORNICOM-clips', phImage, None))
  3108. valTab.insert(0,CDisplayListItem("--- Most popular ---", "Most popular", CDisplayListItem.TYPE_CATEGORY,['http://www.pornicom.com/most-popular/'], 'PORNICOM-clips', '',None))
  3109. valTab.insert(0,CDisplayListItem("--- Latest updates ---", "Latest updates", CDisplayListItem.TYPE_CATEGORY,['http://www.pornicom.com/latest-updates/'], 'PORNICOM-clips', '',None))
  3110. valTab.insert(0,CDisplayListItem("--- Top rated ---", "Top rated", CDisplayListItem.TYPE_CATEGORY,['http://www.pornicom.com/top-rated/'], 'PORNICOM-clips', '',None))
  3111. self.SEARCH_proc='pornicom-search'
  3112. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3113. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3114. return valTab
  3115. if 'pornicom-search' == name:
  3116. printDBG( 'Host listsItems begin name='+name )
  3117. valTab = self.listsItems(-1, 'http://www.pornicom.com/search/?q=%s' % url.replace(' ','+'), 'PORNICOM-clips')
  3118. return valTab
  3119. if 'PORNICOM-clips' == name:
  3120. printDBG( 'Host listsItems begin name='+name )
  3121. self.MAIN_URL = 'http://pornicom.com'
  3122. COOKIEFILE = os_path.join(GetCookieDir(), 'pornicom.cookie')
  3123. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3124. self.HTTP_HEADER['Referer'] = url
  3125. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3126. sts, data = self.get_Page(url, self.defaultParams)
  3127. if not sts: return valtab
  3128. printDBG( 'Host listsItems data: '+data )
  3129. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', '</div>', False)[1]
  3130. next_page = self.cm.ph.getDataBeetwenMarkers(next_page, '</span>', 'Page', False)[1]
  3131. next_page = self.cm.ph.getSearchGroups(next_page, '''href=['"]([^"^']+?)['"]''')[0]
  3132. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  3133. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="link"', 'views-info')
  3134. for item in data:
  3135. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3136. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3137. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  3138. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''<img\sclass="thumb"\ssrc=['"]([^"^']+?)['"]''', 1, True)[0]
  3139. Time = self.cm.ph.getSearchGroups(item, '''"duration">([^"^']+?)<''', 1, True)[0].strip()
  3140. if not Time: Time = self.cm.ph.getSearchGroups(item, '''"duration" content=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3141. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  3142. valTab.append(CDisplayListItem(phTitle,'['+Time+'] '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3143. if next_page:
  3144. numer = next_page.split('/')[-2]
  3145. valTab.append(CDisplayListItem('Next', 'Next '+numer, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3146. return valTab
  3147. if 'HDZOG' == name:
  3148. printDBG( 'Host listsItems begin name='+name )
  3149. self.MAIN_URL = 'http://www.hdzog.com'
  3150. COOKIEFILE = os_path.join(GetCookieDir(), 'hdzog.cookie')
  3151. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3152. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3153. sts, data = self.get_Page(url)
  3154. if not sts: return valTab
  3155. #printDBG( 'Host getResolvedURL data: '+data )
  3156. data = self.cm.ph.getDataBeetwenMarkers(data, 'class="thumbs-categories">', 'video thumbs list', False)[1]
  3157. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  3158. for item in data:
  3159. phTitle = self.cm.ph.getSearchGroups(item, '''"title">([^"^']+?)<''', 1, True)[0]
  3160. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3161. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3162. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'HDZOG-clips', phImage, None))
  3163. valTab.insert(0,CDisplayListItem("--- Longest ---", "Longest", CDisplayListItem.TYPE_CATEGORY,['http://www.hdzog.com/longest/'], 'HDZOG-clips', '',None))
  3164. valTab.insert(0,CDisplayListItem("--- Popular ---", "Popular", CDisplayListItem.TYPE_CATEGORY,['http://www.hdzog.com/popular/'], 'HDZOG-clips', '',None))
  3165. valTab.insert(0,CDisplayListItem("--- Newest ---", "Newest", CDisplayListItem.TYPE_CATEGORY,['http://www.hdzog.com/new/'], 'HDZOG-clips', '',None))
  3166. self.SEARCH_proc='hdzog-search'
  3167. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3168. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3169. return valTab
  3170. if 'hdzog-search' == name:
  3171. printDBG( 'Host listsItems begin name='+name )
  3172. valTab = self.listsItems(-1, 'https://hdzog.com/search/%s/' % url.replace(' ','+'), 'HDZOG-clips')
  3173. return valTab
  3174. if 'HDZOG-clips' == name:
  3175. printDBG( 'Host listsItems begin name='+name )
  3176. COOKIEFILE = os_path.join(GetCookieDir(), 'hdzog.cookie')
  3177. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3178. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3179. sts, data = self.get_Page(url)
  3180. if not sts: return valTab
  3181. #printDBG( 'Host listsItems data: '+data )
  3182. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'class="next">', '</li>', False)[1]
  3183. next_page = self.cm.ph.getSearchGroups(next_page, '''href=['"]([^"^']+?)['"]''')[0]
  3184. if next_page.startswith('/'): next_page = 'http://www.hdzog.com' + next_page
  3185. data = self.cm.ph.getDataBeetwenMarkers(data, 'class="thumbs-videos">', 'video thumbs list', False)[1]
  3186. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a href', '</a>')
  3187. for item in data:
  3188. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3189. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3190. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3191. Time = self.cm.ph.getSearchGroups(item, '''class="time">([^"^']+?)<''', 1, True)[0]
  3192. valTab.append(CDisplayListItem(phTitle,'['+Time+'] '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3193. if next_page:
  3194. numer = next_page.split('/')[-2]
  3195. valTab.append(CDisplayListItem('Next', 'Next '+numer, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3196. return valTab
  3197. if 'PORNOMENGE' == name:
  3198. printDBG( 'Host listsItems begin name='+name )
  3199. self.MAIN_URL = 'https://www.pornomenge.com'
  3200. COOKIEFILE = os_path.join(GetCookieDir(), 'pornomenge.cookie')
  3201. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3202. sts, data = self.getPage(url, 'pornomenge.cookie', 'pornomenge.com', self.defaultParams)
  3203. if not sts: return ''
  3204. #printDBG( 'Host listsItems data: '+data )
  3205. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="wrap-box-escena">', '</h4>')
  3206. for item in data:
  3207. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  3208. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''">([^"^']+?)</a>''', 1, True)[0]
  3209. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3210. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3211. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORNOMENGE-clips', '', None))
  3212. valTab.sort(key=lambda poz: poz.name)
  3213. valTab.insert(0,CDisplayListItem("--- Kanale ---", "Kanale", CDisplayListItem.TYPE_CATEGORY,['https://www.pornomenge.com/websites/videos/'], 'PORNOMENGE-clips', '',None))
  3214. valTab.insert(0,CDisplayListItem("--- Pornostars ---", "Pornostars", CDisplayListItem.TYPE_CATEGORY,['https://www.pornomenge.com/pornostars/'], 'PORNOMENGE-Pornostars', '',None))
  3215. valTab.insert(0,CDisplayListItem("--- Beste Videos ---", "Beste Videos", CDisplayListItem.TYPE_CATEGORY,['https://www.pornomenge.com/am-meisten-gestimmt/m/'], 'PORNOMENGE-clips', '',None))
  3216. self.SEARCH_proc='PORNOMENGE-search'
  3217. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3218. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3219. return valTab
  3220. if 'PORNOMENGE-search' == name:
  3221. printDBG( 'Host listsItems begin name='+name )
  3222. valTab = self.listsItems(-1, 'https://www.heuteporno.com/suchen/?q=%s' % url.replace(' ','+'), 'PORNOMENGE-clips')
  3223. return valTab
  3224. if 'PORNOMENGE-clips' == name:
  3225. printDBG( 'Host listsItems begin name='+name )
  3226. COOKIEFILE = os_path.join(GetCookieDir(), 'pornomenge.cookie')
  3227. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3228. sts, data = self.getPage(url, 'pornomenge.cookie', 'pornomenge.com', self.defaultParams)
  3229. if not sts: return ''
  3230. #printDBG( 'Host listsItems data: '+data )
  3231. next_page = self.cm.ph.getSearchGroups(data, '''data-ajax-url=['"]([^"^']+?)['"]''')[0]
  3232. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  3233. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="wrap-box-escena">', 'class="votar-escena')
  3234. for item in data:
  3235. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3236. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3237. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  3238. Time = self.cm.ph.getSearchGroups(item, '''duracion">([^"^']+?)<''', 1, True)[0]
  3239. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3240. if phImage.startswith('//'): phImage = 'http:' + phImage
  3241. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3242. if next_page:
  3243. if next_page.startswith('aHR'): next_page = urllib.unquote(base64.b64decode(next_page))
  3244. if '/?page=0' in next_page: next_page = next_page.replace('page=0','page=2')
  3245. numer = next_page.split('=')[-1]
  3246. valTab.append(CDisplayListItem('Next', 'Next '+numer, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3247. return valTab
  3248. if 'PORNOMENGE-Pornostars' == name:
  3249. printDBG( 'Host listsItems begin name='+name )
  3250. COOKIEFILE = os_path.join(GetCookieDir(), 'pornomenge.cookie')
  3251. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3252. sts, data = self.getPage(url, 'pornomenge.cookie', 'pornomenge.com', self.defaultParams)
  3253. if not sts: return ''
  3254. #printDBG( 'Host listsItems data: '+data )
  3255. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'rel="next"', '/>', False)[1]
  3256. next_page = self.cm.ph.getSearchGroups(next_page, '''href=['"]([^"^']+?)['"]''')[0]
  3257. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  3258. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="wrap-box-chica">', 'class="clear"></div>')
  3259. for item in data:
  3260. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3261. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3262. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3263. Time = self.cm.ph.getSearchGroups(item, '''duracion">([^"^']+?)<''', 1, True)[0]
  3264. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3265. if phImage.startswith('//'): phImage = 'http:' + phImage
  3266. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORNOMENGE-clips', '', None))
  3267. if next_page:
  3268. numer = next_page.split('=')[-1]
  3269. valTab.append(CDisplayListItem('Next', 'Next '+numer, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3270. return valTab
  3271. if 'TUBEPORNCLASSIC' == name:
  3272. printDBG( 'Host listsItems begin name='+name )
  3273. self.MAIN_URL = 'http://tubepornclassic.com'
  3274. COOKIEFILE = os_path.join(GetCookieDir(), 'tubepornclassic.cookie')
  3275. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3276. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3277. sts, data = self.get_Page(url)
  3278. if not sts: return valTab
  3279. #host = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
  3280. #header = {'Cookie': 'language=en', 'User-Agent': host, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
  3281. #try: data = self.cm.getURLRequestData({ 'url': url, 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  3282. #except Exception as e:
  3283. # printExc()
  3284. # msg = _("Last error:\n%s" % str(e))
  3285. # GetIPTVNotify().push('%s' % msg, 'error', 20)
  3286. # printDBG( 'Host getResolvedURL query error url: '+url )
  3287. # return valTab
  3288. printDBG( 'Host listsItems data: '+data )
  3289. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, 'name="category_dirs', '</li>')
  3290. if not data2:
  3291. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="list-item', '</li>')
  3292. for item in data2:
  3293. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  3294. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3295. if phUrl.startswith('/'): phUrl = 'http://tubepornclassic.com' + phUrl
  3296. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'TUBEPORNCLASSIC-clips', '', None))
  3297. valTab.insert(0,CDisplayListItem("--- Most Viewed ---", "Most Viewed", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/most-popular/'], 'TUBEPORNCLASSIC-clips', '',None))
  3298. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/top-rated/'], 'TUBEPORNCLASSIC-clips', '',None))
  3299. valTab.insert(0,CDisplayListItem("--- Latest ---", "Latest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/latest-updates/'], 'TUBEPORNCLASSIC-clips', '',None))
  3300. self.SEARCH_proc='TUBEPORNCLASSIC-search'
  3301. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3302. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3303. data2 = None
  3304. return valTab
  3305. if 'TUBEPORNCLASSIC-search' == name:
  3306. printDBG( 'Host listsItems begin name='+name )
  3307. valTab = self.listsItems(-1, 'http://en.tubepornclassic.com/search/%s/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&from_videos=1' % url.replace(' ', '+'), 'TUBEPORNCLASSIC-clips')
  3308. return valTab
  3309. if 'TUBEPORNCLASSIC-clips' == name:
  3310. printDBG( 'Host listsItems begin name='+name )
  3311. self.MAIN_URL = 'http://tubepornclassic.com'
  3312. #url = url.replace('//tubepornclassic.com','//de.tubepornclassic.com')
  3313. COOKIEFILE = os_path.join(GetCookieDir(), 'tubepornclassic.cookie')
  3314. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3315. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3316. sts, data = self.get_Page(url)
  3317. if not sts: return valTab
  3318. printDBG( 'Host listsItems data: '+data )
  3319. next_page = self.cm.ph.getDataBeetwenMarkers(data, '<li class="next">', '</li>', False)[1]
  3320. next_page = self.cm.ph.getSearchGroups(next_page, '''href=['"]([^"^']+?)['"]''')[0]
  3321. if next_page.startswith('/'): next_page = 'http://tubepornclassic.com' + next_page
  3322. data2 = self.cm.ph.getDataBeetwenMarkers(data, '<div class="list-videos">', 'class="footer', False)[1]
  3323. if not data2:
  3324. data2 = self.cm.ph.getDataBeetwenMarkers(data, '<div class="list-videos">', 'class="pagination"', False)[1]
  3325. data = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<a', '</a>')
  3326. for item in data:
  3327. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3328. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3329. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  3330. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3331. Time = self.cm.ph.getSearchGroups(item, '''duration">([^"^']+?)<''', 1, True)[0]
  3332. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3333. if phImage.startswith('//'): phImage = 'http:' + phImage
  3334. if phTitle:
  3335. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3336. if next_page<>'#search' and next_page<>'':
  3337. numer = next_page.split('/')[-2]
  3338. valTab.append(CDisplayListItem('Next', 'Next '+numer, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3339. data2 = None
  3340. return valTab
  3341. if 'KOLOPORNO' == name:
  3342. printDBG( 'Host listsItems begin name='+name )
  3343. self.MAIN_URL = 'https://www.koloporno.com'
  3344. COOKIEFILE = os_path.join(GetCookieDir(), 'koloporno.cookie')
  3345. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3346. sts, data = self.getPage(url, 'koloporno.cookie', 'koloporno.com', self.defaultParams)
  3347. if not sts: return ''
  3348. #printDBG( 'Host listsItems data: '+data )
  3349. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="wrap-box-escena">', '</h4>')
  3350. for item in data:
  3351. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  3352. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''">([^"^']+?)</a>''', 1, True)[0]
  3353. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3354. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3355. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'KOLOPORNO-clips', '', None))
  3356. valTab.sort(key=lambda poz: poz.name)
  3357. valTab.insert(0,CDisplayListItem("--- Pornstars ---", "Pornstars", CDisplayListItem.TYPE_CATEGORY,['https://www.koloporno.com/pornstars/'], 'KOLOPORNO-Pornostars', '',None))
  3358. valTab.insert(0,CDisplayListItem("--- Najlepsze Filmy ---", "Najlepsze Filmy", CDisplayListItem.TYPE_CATEGORY,['https://www.koloporno.com/najlepiej-oceniane/m/'], 'KOLOPORNO-clips', '',None))
  3359. self.SEARCH_proc='KOLOPORNO-search'
  3360. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3361. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3362. return valTab
  3363. if 'KOLOPORNO-search' == name:
  3364. printDBG( 'Host listsItems begin name='+name )
  3365. valTab = self.listsItems(-1, 'https://www.koloporno.com/search/?q=%s' % url.replace(' ','+'), 'KOLOPORNO-clips')
  3366. return valTab
  3367. if 'KOLOPORNO-clips' == name:
  3368. printDBG( 'Host listsItems begin name='+name )
  3369. self.MAIN_URL = 'https://www.koloporno.com'
  3370. COOKIEFILE = os_path.join(GetCookieDir(), 'koloporno.cookie')
  3371. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3372. sts, data = self.getPage(url, 'koloporno.cookie', 'koloporno.com', self.defaultParams)
  3373. if not sts: return ''
  3374. printDBG( 'Host listsItems data: '+data )
  3375. next_page = self.cm.ph.getSearchGroups(data, '''data-ajax-url=['"]([^"^']+?)['"]''')[0]
  3376. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  3377. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="wrap-box-escena">', 'class="votar-escena')
  3378. for item in data:
  3379. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3380. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3381. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  3382. Time = self.cm.ph.getSearchGroups(item, '''duracion">([^"^']+?)<''', 1, True)[0]
  3383. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3384. if phImage.startswith('//'): phImage = 'http:' + phImage
  3385. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3386. if next_page:
  3387. if next_page.startswith('aHR'): next_page = urllib.unquote(base64.b64decode(next_page))
  3388. if '/?page=0' in next_page: next_page = next_page.replace ('page=0','page=2')
  3389. numer = next_page.split('=')[-1]
  3390. valTab.append(CDisplayListItem('Next', 'Next '+numer, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3391. return valTab
  3392. if 'KOLOPORNO-Pornostars' == name:
  3393. printDBG( 'Host listsItems begin name='+name )
  3394. COOKIEFILE = os_path.join(GetCookieDir(), 'koloporno.cookie')
  3395. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3396. sts, data = self.getPage(url, 'koloporno.cookie', 'koloporno.com', self.defaultParams)
  3397. if not sts: return ''
  3398. #printDBG( 'Host listsItems data: '+data )
  3399. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'rel="next"', '/>', False)[1]
  3400. next_page = self.cm.ph.getSearchGroups(next_page, '''href=['"]([^"^']+?)['"]''')[0]
  3401. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  3402. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="wrap-box-chica">', 'class="clear"></div>')
  3403. for item in data:
  3404. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3405. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3406. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3407. Time = self.cm.ph.getSearchGroups(item, '''duracion">([^"^']+?)<''', 1, True)[0]
  3408. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3409. if phImage.startswith('//'): phImage = 'http:' + phImage
  3410. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'KOLOPORNO-clips', '', None))
  3411. if next_page:
  3412. numer = next_page.split('/')[-1]
  3413. valTab.append(CDisplayListItem('Next', 'Next '+numer, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3414. return valTab
  3415. if 'REALGFPORN' == name:
  3416. printDBG( 'Host listsItems begin name='+name )
  3417. self.MAIN_URL = 'https://www.realgfporn.com'
  3418. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  3419. try:
  3420. data = self.cm.getURLRequestData(query_data)
  3421. except Exception as e:
  3422. printExc()
  3423. msg = _("Last error:\n%s" % str(e))
  3424. GetIPTVNotify().push('%s' % msg, 'error', 20)
  3425. printDBG( 'Host listsItems query error url:'+url )
  3426. return valTab
  3427. #printDBG( 'Host listsItems data: '+data )
  3428. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="video-spot">', 'clearfix')
  3429. for item in data:
  3430. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3431. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  3432. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3433. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3434. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'REALGFPORN-clips', phImage, None))
  3435. valTab.sort(key=lambda poz: poz.name)
  3436. valTab.insert(0,CDisplayListItem("--- Longest ---", "Longest", CDisplayListItem.TYPE_CATEGORY,['https://www.realgfporn.com/longest/'], 'REALGFPORN-clips', '',None))
  3437. valTab.insert(0,CDisplayListItem("--- Most Viewed ---", "Most Viewed", CDisplayListItem.TYPE_CATEGORY,['https://www.realgfporn.com/most-viewed/'], 'REALGFPORN-clips', '',None))
  3438. valTab.insert(0,CDisplayListItem("--- Top Rated ---", "Top Rated", CDisplayListItem.TYPE_CATEGORY,['https://www.realgfporn.com/top-rated/'], 'REALGFPORN-clips', '',None))
  3439. valTab.insert(0,CDisplayListItem("--- Most Recent ---", "Most Recent", CDisplayListItem.TYPE_CATEGORY,['https://www.realgfporn.com/most-recent/'], 'REALGFPORN-clips', '',None))
  3440. self.SEARCH_proc='REALGFPORN-search'
  3441. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3442. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3443. return valTab
  3444. if 'REALGFPORN-search' == name:
  3445. printDBG( 'Host listsItems begin name='+name )
  3446. valTab = self.listsItems(-1, 'https://www.realgfporn.com/search/%s/page1.html' % url.replace(' ','+'), 'REALGFPORN-clips')
  3447. return valTab
  3448. if 'REALGFPORN-clips' == name:
  3449. printDBG( 'Host listsItems begin name='+name )
  3450. self.MAIN_URL = 'https://www.realgfporn.com'
  3451. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  3452. try:
  3453. data = self.cm.getURLRequestData(query_data)
  3454. except:
  3455. printDBG( 'Host listsItems query error url: '+url )
  3456. return valTab
  3457. printDBG( 'Host listsItems data: '+data )
  3458. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', 'Next', False)[1]
  3459. next_page = re.compile('href="(.*?)"').findall(next_page)
  3460. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="video-spot', '</strong>')
  3461. for item in data:
  3462. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3463. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](https://www.realgfporn.com/videos/[^"^']+?)['"]''', 1, True)[0]
  3464. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0].replace(' ','%20')
  3465. Time = self.cm.ph.getSearchGroups(item, '''duration">([^"^']+?)<''', 1, True)[0]
  3466. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3467. if phImage.startswith('//'): phImage = 'http:' + phImage
  3468. if Time<>'Link' and phUrl:
  3469. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3470. if next_page:
  3471. url = re.sub('page.+', '', url)
  3472. valTab.append(CDisplayListItem('Next', url+next_page[-1], CDisplayListItem.TYPE_CATEGORY, [url+next_page[-1]], name, '', None))
  3473. return valTab
  3474. if 'PLAYVIDS' == name:
  3475. printDBG( 'Host listsItems begin name='+name )
  3476. self.MAIN_URL = 'https://www.playvids.com'
  3477. COOKIEFILE = os_path.join(GetCookieDir(), 'playvids.cookie')
  3478. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3479. sts, data = self.getPage(url, 'playvids.cookie', 'playvids.com', self.defaultParams)
  3480. if not sts: return ''
  3481. if 'Rate Limit Exceeded' in data:
  3482. msg = _("Last error:\n%s" % 'Rate Limit Exceeded')
  3483. GetIPTVNotify().push('%s' % msg, 'error', 20)
  3484. printDBG( 'Host listsItems data: '+str(data) )
  3485. data = self.cm.ph.getDataBeetwenMarkers(data, '<div class="category-list', 'card-promotion', False)[1]
  3486. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  3487. for item in data:
  3488. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3489. phTitle = phUrl.split('/')[-1].replace('-',' ').replace('%20',' ').replace('%26','-')
  3490. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0].replace(' ','%20')
  3491. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3492. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  3493. if phTitle:
  3494. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'PLAYVIDS-clips', phImage, None))
  3495. valTab.sort(key=lambda poz: poz.name)
  3496. valTab.insert(0,CDisplayListItem("--- Pornstar ---", "Pornstar", CDisplayListItem.TYPE_CATEGORY,['https://www.playvids.com/pornstars&jsclick=1'], 'PLAYVIDS-pornstar', '',None))
  3497. valTab.insert(0,CDisplayListItem("--- Channels ---", "Channels", CDisplayListItem.TYPE_CATEGORY,['https://www.playvids.com/channels&jsclick=1'], 'PLAYVIDS-channels', '',None))
  3498. valTab.insert(0,CDisplayListItem("--- Trending ---", "Trending", CDisplayListItem.TYPE_CATEGORY,['https://www.playvids.com/Trending-Porn'], 'PLAYVIDS-clips', '',None))
  3499. self.SEARCH_proc='PLAYVIDS-search'
  3500. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3501. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3502. return valTab
  3503. if 'PLAYVIDS-search' == name:
  3504. printDBG( 'Host listsItems begin name='+name )
  3505. valTab = self.listsItems(-1, 'https://www.playvids.com/sq?q=%s&jsclick=1&content=straight' % url.replace(' ','+'), 'PLAYVIDS-clips')
  3506. return valTab
  3507. if 'PLAYVIDS-clips' == name:
  3508. printDBG( 'Host listsItems begin name='+name )
  3509. self.MAIN_URL = 'https://www.playvids.com'
  3510. COOKIEFILE = os_path.join(GetCookieDir(), 'playvids.cookie')
  3511. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3512. sts, data = self.getPage(url, 'playvids.cookie', 'playvids.com', self.defaultParams)
  3513. if not sts: return ''
  3514. printDBG( 'Host listsItems data: '+str(data) )
  3515. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'class="pagination"', '</ul>', False)[1]
  3516. catUrl = self.currList[Index].possibleTypesOfSearch
  3517. if catUrl == 'channels':
  3518. data = data.split('<div id=')
  3519. else:
  3520. data = data.split('<div class="card thumbs_rotate')
  3521. if len(data): del data[0]
  3522. for item in data:
  3523. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  3524. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3525. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0].replace(' ','%20')
  3526. Time = self.cm.ph.getSearchGroups(item, '''duration">([^"^']+?)<''', 1, True)[0]
  3527. added = self.cm.ph.getSearchGroups(item, '''addition">([^"^']+?)<''', 1, True)[0]
  3528. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3529. if phImage.startswith('//'): phImage = 'http:' + phImage
  3530. if phTitle and Time:
  3531. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle)+'\n'+added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3532. if next_page:
  3533. match = re.compile('href="(.*?)"').findall(next_page)
  3534. if match:
  3535. next_page = self.MAIN_URL+match[-1]
  3536. printDBG( 'Host listsItems next_page: ' +next_page )
  3537. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3538. return valTab
  3539. if 'PLAYVIDS-channels' == name:
  3540. printDBG( 'Host listsItems begin name='+name )
  3541. self.MAIN_URL = 'https://www.playvids.com'
  3542. COOKIEFILE = os_path.join(GetCookieDir(), 'playvids.cookie')
  3543. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3544. sts, data = self.getPage(url, 'playvids.cookie', 'playvids.com', self.defaultParams)
  3545. if not sts: return ''
  3546. printDBG( 'Host listsItems data: '+str(data) )
  3547. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'class="pagination"', '</ul>', False)[1]
  3548. #data = self.cm.ph.getDataBeetwenMarkers(data, 'Popular channels', 'pagination', False)[1]
  3549. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="card">', '</div>')
  3550. data = data.split('<div class="card">')
  3551. if len(data): del data[0]
  3552. for item in data:
  3553. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3554. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('%20',' ').replace('%26','-')
  3555. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0].replace(' ','%20')
  3556. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3557. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  3558. if phTitle:
  3559. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'PLAYVIDS-clips', phImage, 'channels'))
  3560. if next_page:
  3561. match = re.compile('href="(.*?)"').findall(next_page)
  3562. if match:
  3563. next_page = self.MAIN_URL+match[-1]
  3564. printDBG( 'Host listsItems next_page: ' +next_page )
  3565. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3566. return valTab
  3567. if 'PLAYVIDS-pornstar' == name:
  3568. printDBG( 'Host listsItems begin name='+name )
  3569. self.MAIN_URL = 'https://www.playvids.com'
  3570. COOKIEFILE = os_path.join(GetCookieDir(), 'playvids.cookie')
  3571. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3572. sts, data = self.getPage(url, 'playvids.cookie', 'playvids.com', self.defaultParams)
  3573. if not sts: return ''
  3574. printDBG( 'Host listsItems data: '+str(data) )
  3575. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'class="pagination"', '</ul>', False)[1]
  3576. #data = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="stars_list">', '</ul>', False)[1]
  3577. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  3578. data = data.split('<div class="card">')
  3579. if len(data): del data[0]
  3580. for item in data:
  3581. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3582. phTitle = phUrl.split('/')[-1].replace('-',' ')
  3583. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0].replace(' ','%20')
  3584. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3585. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  3586. if phTitle:
  3587. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'PLAYVIDS-clips', phImage, None))
  3588. if next_page:
  3589. match = re.compile('href="(.*?)"').findall(next_page)
  3590. if match:
  3591. next_page = self.MAIN_URL+match[-1]
  3592. printDBG( 'Host listsItems next_page: ' +next_page )
  3593. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3594. return valTab
  3595. if '4TUBE' == name:
  3596. printDBG( 'Host listsItems begin name='+name )
  3597. self.MAIN_URL = 'https://www.4tube.com'
  3598. COOKIEFILE = os_path.join(GetCookieDir(), '4tube.cookie')
  3599. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3600. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3601. sts, data = self.get_Page(url)
  3602. if not sts: return valTab
  3603. printDBG( 'Host listsItems data: '+data )
  3604. data = self.cm.ph.getDataBeetwenMarkers(data, '>Categories<', '>Channels<', False)[1]
  3605. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  3606. for item in data:
  3607. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3608. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].lower().replace('sex movies','')
  3609. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3610. if phTitle:
  3611. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'4TUBE-clips', '', None))
  3612. valTab.sort(key=lambda poz: poz.name)
  3613. valTab.insert(0,CDisplayListItem("--- Channels ---","Channels", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/channels"] , '4TUBE-channels', '',None))
  3614. valTab.insert(0,CDisplayListItem("--- Pornstars ---","Pornstars", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/pornstars"], '4TUBE-channels','',None))
  3615. valTab.insert(0,CDisplayListItem("--- Most viewed ---","Most viewed", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/videos?sort=views&time=month"], '4TUBE-clips', '',None))
  3616. valTab.insert(0,CDisplayListItem("--- Highest Rated ---","Highest Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/videos?sort=rating&time=month"], '4TUBE-clips', '',None))
  3617. valTab.insert(0,CDisplayListItem("--- Lastest ---","Lastest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/videos"], '4TUBE-clips', '',None))
  3618. self.SEARCH_proc='4TUBE-search'
  3619. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3620. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3621. return valTab
  3622. if '4TUBE-search' == name:
  3623. printDBG( 'Host listsItems begin name='+name )
  3624. valTab = self.listsItems(-1, self.MAIN_URL+'/search?q=%s' % url.replace(' ','+'), '4TUBE-clips')
  3625. return valTab
  3626. if '4TUBE-channels' == name:
  3627. COOKIEFILE = os_path.join(GetCookieDir(), '4tube.cookie')
  3628. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3629. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3630. sts, data = self.get_Page(url)
  3631. if not sts: return valTab
  3632. printDBG( 'Host listsItems data: '+data )
  3633. next_page = self.cm.ph.getSearchGroups(data, '''<link\srel="next"\shref=['"]([^"^']+?)['"]''', 1, True)[0]
  3634. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class="thumb-link"', '</div></a></div>')
  3635. for item in data:
  3636. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  3637. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  3638. phVid = self.cm.ph.getSearchGroups(item, '''icon-video"></i>([^"^']+?)<''', 1, True)[0]
  3639. phImage = self.cm.ph.getSearchGroups(item, '''img\sdata-original=['"]([^"^']+?)['"]''', 1, True)[0]
  3640. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3641. valTab.append(CDisplayListItem(phTitle,'[Video: '+phVid+'] '+phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl], '4TUBE-clips', phImage, None))
  3642. if next_page:
  3643. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3644. return valTab
  3645. if '4TUBE-clips' == name:
  3646. COOKIEFILE = os_path.join(GetCookieDir(), '4tube.cookie')
  3647. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3648. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3649. sts, data = self.get_Page(url)
  3650. if not sts: return valTab
  3651. printDBG( 'Host listsItems data: '+data )
  3652. self.MAIN_URL = url.split('com/')[0]+'com'
  3653. next_page = self.cm.ph.getSearchGroups(data, '''<link\srel="next"\shref=['"]([^"^']+?)['"]''', 1, True)[0]
  3654. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="col thumb_video"', '</div></div>')
  3655. for item in data:
  3656. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  3657. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  3658. phImage = self.cm.ph.getSearchGroups(item, '''img data-master=['"]([^"^']+?)['"]''', 1, True)[0]
  3659. phRuntime = self.cm.ph.getSearchGroups(item, '''"duration-top">([^"^']+?)<''', 1, True)[0]
  3660. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3661. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phRuntime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3662. if next_page:
  3663. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3664. return valTab
  3665. if 'HomeMoviesTube' == name:
  3666. printDBG( 'Host listsItems begin name='+name )
  3667. self.MAIN_URL = 'http://www.homemoviestube.com'
  3668. COOKIEFILE = os_path.join(GetCookieDir(), 'homemoviestube.cookie')
  3669. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  3670. sts, data = self.cm.getPage(url, self.defaultParams)
  3671. if not sts: return valTab
  3672. #printDBG( 'Host listsItems data: '+data )
  3673. data = self.cm.ph.getDataBeetwenMarkers(data, 'class="films', 'footer', False)[1]
  3674. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="category-item', 'category-counter')
  3675. for item in data:
  3676. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3677. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  3678. phImage = self.cm.ph.getSearchGroups(item, '''img src=['"]([^"^']+?)['"]''', 1, True)[0]
  3679. if phImage.startswith('//'): phImage = 'http:' + phImage
  3680. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  3681. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  3682. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3683. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'HomeMoviesTube-clips', phImage, None))
  3684. valTab.sort(key=lambda poz: poz.name)
  3685. valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/longest/"], 'HomeMoviesTube-clips','',None))
  3686. valTab.insert(0,CDisplayListItem("--- Most viewed ---","Most viewed", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/most-viewed/"], 'HomeMoviesTube-clips', '',None))
  3687. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/top-rated/"], 'HomeMoviesTube-clips', '',None))
  3688. valTab.insert(0,CDisplayListItem("--- Most Recent ---","Most Recent", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/most-recent/"], 'HomeMoviesTube-clips', '',None))
  3689. valTab.insert(0,CDisplayListItem("--- Latest Videos ---","Latest Videos", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'HomeMoviesTube-clips', '',None))
  3690. self.SEARCH_proc='HomeMoviesTube-search'
  3691. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3692. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3693. return valTab
  3694. if 'HomeMoviesTube-search' == name:
  3695. printDBG( 'Host listsItems begin name='+name )
  3696. valTab = self.listsItems(-1, self.MAIN_URL+'/search/%s/page1.html' % url.replace(' ','+'), 'HomeMoviesTube-clips')
  3697. return valTab
  3698. if 'HomeMoviesTube-clips' == name:
  3699. printDBG( 'Host listsItems begin name='+name )
  3700. self.MAIN_URL = 'http://www.homemoviestube.com'
  3701. COOKIEFILE = os_path.join(GetCookieDir(), 'homemoviestube.cookie')
  3702. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  3703. sts, data = self.cm.getPage(url, self.defaultParams)
  3704. if not sts: return valTab
  3705. printDBG( 'Host listsItems data: '+data )
  3706. next_page = self.cm.ph.getSearchGroups(data, '''<li\sclass='next'><a href=['"]([^"^']+?)['"]''', 1, True)[0]
  3707. if re.search('id="featured-videos"', data, re.S):
  3708. data = self.cm.ph.getDataBeetwenMarkers(data, '<!-- featured-end', '</html>', False)[1]
  3709. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="film-item', 'stat-rated')
  3710. for item in data:
  3711. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3712. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  3713. phImage = self.cm.ph.getSearchGroups(item, '''this\.src=['"]([^"^']+?)['"]''', 1, True)[0].replace(' ','%20')
  3714. phRuntime = self.cm.ph.getSearchGroups(item, '''"film-time">([^"^']+?)<''', 1, True)[0]
  3715. added = self.cm.ph.getSearchGroups(item, '''"stat-added">([^"^']+?)<''', 1, True)[0]
  3716. if phImage.startswith('//'): phImage = 'http:' + phImage
  3717. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  3718. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  3719. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3720. valTab.append(CDisplayListItem(phTitle,'['+phRuntime+'] '+phTitle+'\n'+added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3721. if next_page:
  3722. if next_page.startswith('page'): next_page = '/' + next_page
  3723. next_page = re.sub('page.+', '', url)+next_page
  3724. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3725. return valTab
  3726. if 'MOVIEFAP' == name:
  3727. printDBG( 'Host listsItems begin name='+name )
  3728. self.MAIN_URL = 'http://www.moviefap.com'
  3729. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  3730. try:
  3731. data = self.cm.getURLRequestData(query_data)
  3732. except Exception as e:
  3733. printExc()
  3734. msg = _("Last error:\n%s" % str(e))
  3735. GetIPTVNotify().push('%s' % msg, 'error', 20)
  3736. printDBG( 'Host listsItems query error url:'+url )
  3737. return valTab
  3738. #printDBG( 'Host listsItems data: '+data )
  3739. data = self.cm.ph.getDataBeetwenMarkers(data, 'Categories</h1>', '</ul>', False)[1]
  3740. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  3741. for item in data:
  3742. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3743. phTitle = self._cleanHtmlStr(item)
  3744. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  3745. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3746. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'MOVIEFAP-clips', '', None))
  3747. valTab.sort(key=lambda poz: poz.name)
  3748. valTab.insert(0,CDisplayListItem("--- Most Recent ---","Most Recent", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/browse/?category=mr&page="], 'MOVIEFAP-clips', '',None))
  3749. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/browse/?category=tr&page="], 'MOVIEFAP-clips', '',None))
  3750. valTab.insert(0,CDisplayListItem("--- Being Watched ---","Being Watched", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/browse/?category=bw&page="], 'MOVIEFAP-clips', '',None))
  3751. self.SEARCH_proc='MOVIEFAP-search'
  3752. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3753. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3754. return valTab
  3755. if 'MOVIEFAP-search' == name:
  3756. printDBG( 'Host listsItems begin name='+name )
  3757. valTab = self.listsItems(-1, self.MAIN_URL+'/search/%s' % url.replace(' ','+'), 'MOVIEFAP-clips')
  3758. return valTab
  3759. if 'MOVIEFAP-clips' == name:
  3760. printDBG( 'Host listsItems begin name='+name )
  3761. self.MAIN_URL = 'http://www.moviefap.com'
  3762. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  3763. try:
  3764. data = self.cm.getURLRequestData(query_data)
  3765. except:
  3766. printDBG( 'Host listsItems query error url: '+url )
  3767. return valTab
  3768. #printDBG( 'Host listsItems data: '+data )
  3769. next = self.cm.ph.getDataBeetwenMarkers(data, 'class="current"', 'next', False)[1]
  3770. next_page = self.cm.ph.getSearchGroups(next, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3771. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="video', '</div></div>')
  3772. for item in data:
  3773. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3774. phImage = self.cm.ph.getSearchGroups(item, '''img\ssrc=['"]([^"^']+?)['"]''', 1, True)[0]
  3775. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  3776. phRuntime = self.cm.ph.getSearchGroups(item, '''"videoleft">([^"^']+?)<''', 1, True)[0]
  3777. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3778. valTab.append(CDisplayListItem(phTitle,'['+phRuntime+'] '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3779. if next_page:
  3780. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  3781. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3782. return valTab
  3783. if 'yourporn' == name:
  3784. printDBG( 'Host listsItems begin name='+name )
  3785. self.MAIN_URL = 'https://sxyprn.com'
  3786. COOKIEFILE = os_path.join(GetCookieDir(), 'yourporn.cookie')
  3787. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3788. sts, data = self._getPage(url, self.defaultParams)
  3789. if not sts: return valTab
  3790. printDBG( 'Host listsItems data: '+str(data) )
  3791. data = self.cm.ph.getAllItemsBeetwenMarkers(data, "<a class='tdn'", '</a>')
  3792. for item in data:
  3793. #printDBG( 'Host listsItems item: '+str(item) )
  3794. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3795. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3796. phTitle = self.cm.ph.getSearchGroups(item, '''>#([^#]+?)<''', 1, True)[0]
  3797. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  3798. if phUrl.startswith('/'): phUrl = 'https://sxyprn.com' + phUrl
  3799. if phImage.startswith('//'): phImage = 'http:' + phImage
  3800. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'yourporn-clips', phImage, None))
  3801. valTab.sort(key=lambda poz: poz.name)
  3802. valTab.insert(0,CDisplayListItem("--- Top Viewed ---","Top Viewed", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/popular/top-viewed.html"], 'yourporn-clips', '',None))
  3803. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/popular/top-rated.html"], 'yourporn-clips', '',None))
  3804. self.SEARCH_proc='yourporn-search'
  3805. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3806. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3807. return valTab
  3808. if 'yourporn-search' == name:
  3809. printDBG( 'Host listsItems begin name='+name )
  3810. valTab = self.listsItems(-1, 'https://sxyprn.com/%s.html' % url.replace(' ','+'), 'yourporn-clips')
  3811. return valTab
  3812. if 'yourporn-clips' == name:
  3813. printDBG( 'Host listsItems begin name='+name )
  3814. self.MAIN_URL = 'https://sxyprn.com'
  3815. COOKIEFILE = os_path.join(GetCookieDir(), 'yourporn.cookie')
  3816. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3817. sts, data = self._getPage(url, self.defaultParams)
  3818. if not sts: return
  3819. printDBG( 'Host listsItems data: '+str(data) )
  3820. next_page = self.cm.ph.getSearchGroups(data, '''<link rel='next' href=['"]([^"^']+?)['"]''', 1, True)[0]
  3821. data = data.split('data-postid=')
  3822. for item in data:
  3823. #printDBG( 'Host listsItems item: '+str(item) )
  3824. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/post/[^"^']+?)['"]''', 1, True)[0]
  3825. if not phUrl: phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](http[^"^']+?)['"]''', 1, True)[0]
  3826. phImage = self.cm.ph.getSearchGroups(item, '''src=['"](//[^"^']+?)['"]''', 1, True)[0]
  3827. phTitle = self.cm.ph.getSearchGroups(item, '''html\'\stitle=['"]([^"^']+?)['"]''', 1, True)[0]
  3828. printDBG( 'Host phTitle1: '+phTitle )
  3829. if len(phTitle)<4: phTitle = self.cm.ph.getSearchGroups(item, '''data-title=['"]([^"^'^{]+?)['"}]''', 1, True)[0]
  3830. if len(phTitle)<4: phTitle = self.cm.ph.getSearchGroups(item, '''class=\'tdn\'\stitle=['"]([^"^'^{]+?)['"}]''', 1, True)[0]
  3831. printDBG( 'Host phTitle2: '+phTitle )
  3832. if ' porn blog' in phTitle or len(phTitle)<4: phTitle = self.cm.ph.getSearchGroups(item, '''blog">([^"^']+?)<''', 1, True)[0]
  3833. printDBG( 'Host phTitle3: '+phTitle )
  3834. if len(phTitle)<4: phTitle = self.cm.ph.getSearchGroups(item, '''title\'>([^>]+?)<''', 1, True)[0]
  3835. printDBG( 'Host phTitle4: '+phTitle )
  3836. if len(phTitle)<4: phTitle = self.cm.ph.getSearchGroups(item, '''text_el">([^>]+?)<''', 1, True)[0]
  3837. printDBG( 'Host phTitle5: '+phTitle )
  3838. #if len(phTitle)<4: phTitle = 'No Title'
  3839. phRuntime = self.cm.ph.getSearchGroups(item, '''>(\d\d:\d\d)<''', 1, True)[0]
  3840. if not phRuntime: phRuntime = self.cm.ph.getSearchGroups(item, '''>(\d\d:\d\d:\d\d)<''', 1, True)[0]
  3841. if phUrl.startswith('/'): phUrl = 'https://sxyprn.com' + phUrl
  3842. if phImage.startswith('//'): phImage = 'http:' + phImage
  3843. phTitle = phTitle.replace('\n','')
  3844. Title = phTitle[:95].split('#')[0]
  3845. if 'External Link' in item:
  3846. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](https://gounlimited[^"^']+?)['"]''', 1, True)[0]
  3847. phRuntime = 'External Link'
  3848. if phUrl.startswith('https://gounlimited.to'):
  3849. if not 'embed' in phUrl:
  3850. phUrl = 'https://gounlimited.to' + '/embed-'+ phUrl.split('/')[3] +'.html'
  3851. if phRuntime=='': continue
  3852. printDBG( 'Host phTitle6: '+phTitle )
  3853. printDBG( 'Host phUrl: '+phUrl )
  3854. printDBG( 'Host phImage: '+phImage )
  3855. if phTitle:
  3856. valTab.append(CDisplayListItem(decodeHtml(Title),'['+phRuntime+'] '+decodeHtml(phTitle[:95]),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3857. if next_page:
  3858. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  3859. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3860. return valTab
  3861. if 'freeomovie' == name:
  3862. printDBG( 'Host listsItems begin name='+name )
  3863. self.MAIN_URL = 'http://www.freeomovie.com/'
  3864. COOKIEFILE = os_path.join(GetCookieDir(), 'freeomovie.cookie')
  3865. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3866. sts, data = self.getPage4k(url, 'freeomovie.cookie', 'freeomovie.com', self.defaultParams)
  3867. if not sts: return ''
  3868. #printDBG( 'Host listsItems data: '+str(data) )
  3869. data = self.cm.ph.getDataBeetwenMarkers(data, 'Categories<', '</div>', False)[1]
  3870. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  3871. for item in data:
  3872. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3873. phTitle = self._cleanHtmlStr(item)
  3874. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  3875. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3876. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'freeomovie-clips', '', None))
  3877. valTab.sort(key=lambda poz: poz.name)
  3878. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['http://www.freeomovie.com'], 'freeomovie-clips', '',None))
  3879. self.SEARCH_proc='freeomovie-search'
  3880. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3881. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3882. return valTab
  3883. if 'freeomovie-search' == name:
  3884. printDBG( 'Host listsItems begin name='+name )
  3885. valTab = self.listsItems(-1, 'http://www.freeomovie.com/?s=%s' % url.replace(' ','+'), 'freeomovie-clips')
  3886. return valTab
  3887. if 'freeomovie-clips' == name:
  3888. printDBG( 'Host listsItems begin name='+name )
  3889. self.MAIN_URL = 'http://www.freeomovie.com/'
  3890. COOKIEFILE = os_path.join(GetCookieDir(), 'freeomovie.cookie')
  3891. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3892. sts, data = self.getPage4k(url, 'freeomovie.cookie', 'freeomovie.com', self.defaultParams)
  3893. if not sts: return ''
  3894. printDBG( 'Host listsItems data: '+str(data) )
  3895. next_page = self.cm.ph.getSearchGroups(data, '''<link\s*rel=['"]next['"]\s*href=['"]([^"^']+?)['"]''', 1, True)[0]
  3896. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="boxtitle">', 'class="metargt">')
  3897. for item in data:
  3898. #printDBG( 'Host listsItems item: '+str(item) )
  3899. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3900. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  3901. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  3902. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3903. if phImage.startswith('/'): phImage = 'http:' + phImage
  3904. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  3905. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [ phUrl], 'freeomovie-serwer', phImage, phImage))
  3906. if next_page:
  3907. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  3908. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  3909. return valTab
  3910. if 'freeomovie-serwer' == name:
  3911. printDBG( 'Host listsItems begin name='+name )
  3912. catUrl = self.currList[Index].possibleTypesOfSearch
  3913. COOKIEFILE = os_path.join(GetCookieDir(), 'freeomovie.cookie')
  3914. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3915. sts, data = self.getPage4k(url, 'freeomovie.cookie', 'freeomovie.com', self.defaultParams)
  3916. if not sts: return ''
  3917. printDBG( 'Host listsItems data: '+str(data) )
  3918. Title = self.cm.ph.getSearchGroups(data, '''"headline":['"]([^"^']+?)['"&]''', 1, True)[0]
  3919. if not Title: Title = self.cm.ph.getSearchGroups(data, '''<title>([^>]+?)<''', 1, True)[0]
  3920. data = self.cm.ph.getDataBeetwenMarkers(data, '<div id="videocont"', '</div>', False)[1]
  3921. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  3922. for item in data:
  3923. phUrl = self.cm.ph.getSearchGroups(item, '''(http[^"^']+?)['"&]''', 1, True)[0]
  3924. phTitle = phUrl.split('/')[2]
  3925. if phTitle=='': phTitle=phUrl
  3926. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  3927. if not 'filecrypt' in phTitle:
  3928. valTab.append(CDisplayListItem(decodeHtml(Title)+' > '+phTitle,decodeHtml(Title)+' > '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, catUrl, None))
  3929. if 'KATESTUBE' == name:
  3930. printDBG( 'Host listsItems begin name='+name )
  3931. self.MAIN_URL = 'https://www.katestube.com'
  3932. COOKIEFILE = os_path.join(GetCookieDir(), 'katestube.cookie')
  3933. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3934. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3935. sts, data = self.get_Page(url)
  3936. if not sts: return valTab
  3937. printDBG( 'Host listsItems data: '+data )
  3938. #data = self.cm.ph.getDataBeetwenMarkers(data, 'class="thumbs-list">', 'footer', False)[1]
  3939. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="thumb">', '</div>')
  3940. for item in data:
  3941. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3942. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  3943. phImage = self.cm.ph.getSearchGroups(item, '''img src=['"]([^"^']+?)['"]''', 1, True)[0]
  3944. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  3945. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3946. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'KATESTUBE-clips', phImage, None))
  3947. valTab.sort(key=lambda poz: poz.name)
  3948. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,['https://www.katestube.com/most-popular/'], 'KATESTUBE-clips', '',None))
  3949. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['https://www.katestube.com/top-rated/'], 'KATESTUBE-clips', '',None))
  3950. valTab.insert(0,CDisplayListItem("--- Latest ---","Latest", CDisplayListItem.TYPE_CATEGORY,['https://www.katestube.com/latest-updates/'], 'KATESTUBE-clips', '',None))
  3951. self.SEARCH_proc='KATESTUBE-search'
  3952. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  3953. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  3954. return valTab
  3955. if 'KATESTUBE-search' == name:
  3956. printDBG( 'Host listsItems begin name='+name )
  3957. valTab = self.listsItems(-1, 'https://www.katestube.com/search/?q=%s' % url.replace(' ','+'), 'KATESTUBE-clips')
  3958. return valTab
  3959. if 'KATESTUBE-clips' == name:
  3960. printDBG( 'Host listsItems begin name='+name )
  3961. COOKIEFILE = os_path.join(GetCookieDir(), 'katestube.cookie')
  3962. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3963. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3964. sts, data = self.get_Page(url)
  3965. if not sts: return valTab
  3966. printDBG( 'Host listsItems data: '+data )
  3967. next_page = ph.findall(data, '<a data=', 'Next')
  3968. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="thumb"', '</div>')
  3969. for item in data:
  3970. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3971. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  3972. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''<img\ssrc=['"]([^"^']+?)['"]''', 1, True)[0]
  3973. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  3974. phTime = self.cm.ph.getSearchGroups(item, '''duration" class="length">([^"^']+?)<''', 1, True)[0].strip()
  3975. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  3976. if phImage.startswith('/'): phImage = 'http:' + phImage
  3977. valTab.append(CDisplayListItem(phTitle,'['+phTime+'] '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  3978. if next_page:
  3979. next = self.cm.ph.getSearchGroups(next_page[-1], '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3980. if next.startswith('/'): next = 'https://www.katestube.com' + next
  3981. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  3982. return valTab
  3983. if 'ZBIORNIKMINI' == name:
  3984. printDBG( 'Host listsItems begin name='+name )
  3985. self.MAIN_URL = 'https://mini.zbiornik.com'
  3986. COOKIEFILE = os_path.join(GetCookieDir(), 'zbiornikmini.cookie')
  3987. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  3988. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  3989. sts, data = self.get_Page(url)
  3990. if not sts: return valTab
  3991. printDBG( 'Host listsItems data: '+data )
  3992. data2 = self.cm.ph.getDataBeetwenMarkers(data, '<div class="collapse navbar-collapse" id="photos-menu">', '</div>', False)[1]
  3993. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<a href=', '</a>')
  3994. for item in data2:
  3995. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  3996. phTitle = self._cleanHtmlStr(item)
  3997. if phUrl.startswith('/'): phUrl = 'https://mini.zbiornik.com' + phUrl
  3998. printDBG( 'Host phTitle: '+phTitle )
  3999. printDBG( 'Host phUrl: '+phUrl )
  4000. if len(phUrl)>3:
  4001. if phTitle<>'2004' and phTitle<>'2005' and phTitle<>'2006':
  4002. valTab.append(CDisplayListItem(phTitle,phUrl.split('/')[-1], CDisplayListItem.TYPE_CATEGORY,[phUrl],'ZBIORNIKMINI-filmy','https://static.zbiornik.com/upimg/0160d9c44a354d20e81f0e6df5fe832e.jpg',None))
  4003. valTab.insert(0,CDisplayListItem("--- Ranking ---","Ranking", CDisplayListItem.TYPE_CATEGORY,['https://mini.zbiornik.com/ludzie/ranking'], 'ZBIORNIKMINI-ranking', '',None))
  4004. valTab.insert(0,CDisplayListItem("--- Wyświetl profile ---","Wyświetl profile", CDisplayListItem.TYPE_CATEGORY,['https://mini.zbiornik.com/ludzie/szukaj/0,1,1,1,0,1:0:0:0:18:50:2:0:0:1:0'], 'ZBIORNIKMINI-szukaj', '',None))
  4005. data2 = None
  4006. return valTab
  4007. if 'ZBIORNIKMINI-szukaj' == name:
  4008. printDBG( 'Host listsItems begin name='+name )
  4009. COOKIEFILE = os_path.join(GetCookieDir(), 'zbiornikmini.cookie')
  4010. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4011. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4012. sts, data = self.get_Page(url)
  4013. if not sts: return valTab
  4014. printDBG( 'Host listsItems data: '+data )
  4015. next_page = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="pager">', '</ul>', False)[1]
  4016. if next_page:
  4017. next_page = re.compile('href="(.*?)"').findall(next_page)
  4018. if next_page[-1].startswith('/'): next_page = 'https://mini.zbiornik.com' + next_page[-1]
  4019. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="search-profile-box">', '</h5>')
  4020. for item in data:
  4021. phImage = self.cm.ph.getSearchGroups(item, '''url\(['"]([^"^']+?)['"]''', 1, True)[0]
  4022. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?filmy)['"]''', 1, True)[0]
  4023. phTitle = self._cleanHtmlStr(item)
  4024. if phUrl.startswith('/'): phUrl = 'https://mini.zbiornik.com' + phUrl
  4025. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl], 'ZBIORNIKMINI-filmy', phImage, None))
  4026. if next_page:
  4027. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4028. return valTab
  4029. if 'ZBIORNIKMINI-ranking' == name:
  4030. printDBG( 'Host listsItems begin name='+name )
  4031. COOKIEFILE = os_path.join(GetCookieDir(), 'zbiornikmini.cookie')
  4032. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4033. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4034. sts, data = self.get_Page(url)
  4035. if not sts: return valTab
  4036. printDBG( 'Host listsItems data: '+data )
  4037. next_page = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="pager">', '</ul>', False)[1]
  4038. if next_page:
  4039. next_page = re.compile('href="(.*?)"').findall(next_page)
  4040. if next_page[-1].startswith('/'): next_page = 'https://mini.zbiornik.com' + next_page[-1]
  4041. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="panel-body">', '</h3>')
  4042. for item in data:
  4043. phImage = self.cm.ph.getSearchGroups(item, '''url\(['"]([^"^']+?)['"]''', 1, True)[0]
  4044. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4045. phTitle = self._cleanHtmlStr(item)
  4046. if phUrl.startswith('/'): phUrl = 'https://mini.zbiornik.com' + phUrl +'/filmy'
  4047. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl], 'ZBIORNIKMINI-filmy', phImage, None))
  4048. if next_page:
  4049. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4050. return valTab
  4051. if 'ZBIORNIKMINI-filmy' == name:
  4052. printDBG( 'Host listsItems begin name='+name )
  4053. COOKIEFILE = os_path.join(GetCookieDir(), 'zbiornikmini.cookie')
  4054. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4055. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4056. sts, data = self.get_Page(url)
  4057. if not sts: return valTab
  4058. printDBG( 'Host listsItems data: '+data )
  4059. next_page = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="pager">', '</ul>', False)[1]
  4060. if next_page:
  4061. next_page = re.compile('href="(.*?)"').findall(next_page)
  4062. if next_page[-1].startswith('/'): next_page = 'https://mini.zbiornik.com' + next_page[-1]
  4063. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a href="/film/', '</a></div> </div>')
  4064. if not data2: data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a href="/film/', '</a>')
  4065. for item in data2:
  4066. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4067. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4068. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)\n''', 1, True)[0]
  4069. exTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)Widoczne''', 1, True)[0]
  4070. Name = re.compile('cropped-info"><a href="/(.*?)"').findall(item)
  4071. if Name:
  4072. Name = Name[-1]
  4073. else:
  4074. Name = ''
  4075. if phUrl.startswith('/'): phUrl = 'https://mini.zbiornik.com' + phUrl
  4076. if phTitle<>'#01':
  4077. valTab.append(CDisplayListItem(Name+' - '+decodeHtml(phTitle),Name+' - '+decodeHtml(exTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4078. if Name != '' and config.plugins.iptvplayer.xxxzbiornik.value:
  4079. valTab.append(CDisplayListItem(Name, Name, CDisplayListItem.TYPE_CATEGORY, ['https://mini.zbiornik.com/' +Name+'/filmy'], name, '', None))
  4080. valTab.append(CDisplayListItem(Name+' fotki', Name, CDisplayListItem.TYPE_CATEGORY, ['https://mini.zbiornik.com/' +Name+'/zdjecia'], 'ZBIORNIKMINI-fotki', '', None))
  4081. if next_page:
  4082. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4083. data2 = None
  4084. return valTab
  4085. if 'ZBIORNIKMINI-fotki' == name:
  4086. printDBG( 'Host listsItems begin name='+name )
  4087. COOKIEFILE = os_path.join(GetCookieDir(), 'zbiornikmini.cookie')
  4088. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4089. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4090. sts, data = self.get_Page(url)
  4091. if not sts: return valTab
  4092. printDBG( 'Host listsItems data: '+data )
  4093. next_page = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="pager">', '</ul>', False)[1]
  4094. if next_page:
  4095. next_page = re.compile('href="(.*?)"').findall(next_page)
  4096. if next_page[-1].startswith('/'): next_page = 'https://mini.zbiornik.com' + next_page[-1]
  4097. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="cropped-wrap">', '</div>')
  4098. if not data2: data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a href="/film/', '</a>')
  4099. for item in data2:
  4100. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4101. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4102. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)\n''', 1, True)[0]
  4103. exTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)Widoczne''', 1, True)[0]
  4104. Name = re.compile('cropped-info"><a href="/(.*?)"').findall(item)
  4105. if Name:
  4106. Name = Name[-1]
  4107. else:
  4108. Name = ''
  4109. if phUrl.startswith('/'): phUrl = 'https://mini.zbiornik.com' + phUrl
  4110. if phTitle<>'#01':
  4111. valTab.append(CDisplayListItem(phTitle, phTitle,CDisplayListItem.TYPE_PICTURE, [CUrlItem('', phImage, 0)], 0, phImage, None))
  4112. if next_page:
  4113. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4114. data2 = None
  4115. return valTab
  4116. if 'vporn' == name:
  4117. printDBG( 'Host listsItems begin name='+name )
  4118. self.MAIN_URL = 'https://www.vporn.com'
  4119. COOKIEFILE = os_path.join(GetCookieDir(), 'vporn.cookie')
  4120. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4121. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4122. sts, data = self.get_Page(url)
  4123. if not sts: return valTab
  4124. printDBG( 'Host listsItems data: '+data )
  4125. data2 = self.cm.ph.getDataBeetwenMarkers(data, '>All Categories<', '</div>', False)[1]
  4126. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<a', '</a>')
  4127. for item in data2:
  4128. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4129. phTitle = self.cm.ph.getSearchGroups(item, '''categoryName">([^>]+?)<''', 1, True)[0]
  4130. #phTitle = self._cleanHtmlStr(item)
  4131. phImage = self.cm.ph.getSearchGroups(item, '''<img src=['"]([^"^']+?)['"]''', 1, True)[0]
  4132. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  4133. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4134. if phUrl and phTitle:
  4135. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'vporn-clips', phImage, None))
  4136. valTab.sort(key=lambda poz: poz.name)
  4137. valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,['http://www.vporn.com/longest/'], 'vporn-clips', '',None))
  4138. valTab.insert(0,CDisplayListItem("--- Most Votes ---","Most Votes", CDisplayListItem.TYPE_CATEGORY,['http://www.vporn.com/votes/'], 'vporn-clips', '',None))
  4139. valTab.insert(0,CDisplayListItem("--- Most Comments ---","Most Comments", CDisplayListItem.TYPE_CATEGORY,['http://www.vporn.com/comments/'], 'vporn-clips', '',None))
  4140. valTab.insert(0,CDisplayListItem("--- Most Favorited ---","Most Favorited", CDisplayListItem.TYPE_CATEGORY,['http://www.vporn.com/favorites/'], 'vporn-clips', '',None))
  4141. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,['http://www.vporn.com/views/'], 'vporn-clips', '',None))
  4142. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['http://www.vporn.com/rating/'], 'vporn-clips', '',None))
  4143. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['http://www.vporn.com/newest/'], 'vporn-clips', '',None))
  4144. self.SEARCH_proc='vporn-search'
  4145. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4146. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4147. return valTab
  4148. if 'vporn-search' == name:
  4149. printDBG( 'Host listsItems begin name='+name )
  4150. valTab = self.listsItems(-1, 'https://www.vporn.com/search?q=%s' % url.replace(' ','+'), 'vporn-clips')
  4151. return valTab
  4152. if 'vporn-clips' == name:
  4153. printDBG( 'Host listsItems begin name='+name )
  4154. COOKIEFILE = os_path.join(GetCookieDir(), 'vporn.cookie')
  4155. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4156. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4157. sts, data = self.get_Page(url)
  4158. if not sts: return valTab
  4159. printDBG( 'Host listsItems data: '+data )
  4160. next_page = self.cm.ph.getDataBeetwenMarkers(data, '<link rel="next"', '>', False)[1]
  4161. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="thumb"', '</div>')
  4162. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="video"', 'Rating')
  4163. for item in data:
  4164. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4165. phImage = self.cm.ph.getSearchGroups(item, '''<img src=['"]([^"^']+?)['"]''', 1, True)[0]
  4166. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4167. phTime = self.cm.ph.getSearchGroups(item, '''"time">([^"^']+?)<''', 1, True)[0].strip()
  4168. if phUrl.startswith('/'): phUrl = 'https://www.vporn.com' + phUrl
  4169. if phImage.startswith('//'): phImage = 'http:' + phImage
  4170. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4171. if next_page:
  4172. next = self.cm.ph.getSearchGroups(next_page, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4173. if next.startswith('/'): next = 'https://www.vporn.com' + next
  4174. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  4175. return valTab
  4176. if 'hotmovs' == name:
  4177. printDBG( 'Host listsItems begin name='+name )
  4178. self.MAIN_URL = 'http://hotmovs.com'
  4179. COOKIEFILE = os_path.join(GetCookieDir(), 'hotmovs.cookie')
  4180. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4181. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4182. sts, data = self.get_Page(url)
  4183. if not sts: return valTab
  4184. printDBG( 'Host getResolvedURL data: '+data )
  4185. #data = self.cm.ph.getDataBeetwenMarkers(data, 'class="cats-all categories-list">', '</div>', False)[1]
  4186. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  4187. for item in data:
  4188. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4189. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4190. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4191. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  4192. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4193. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'hotmovs-clips', phImage, None))
  4194. valTab.sort(key=lambda poz: poz.name)
  4195. valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,['http://hotmovs.com/longest/'], 'hotmovs-clips', '',None))
  4196. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,['http://hotmovs.com/most-popular/'], 'hotmovs-clips', '',None))
  4197. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['http://hotmovs.com/top-rated/'], 'hotmovs-clips', '',None))
  4198. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['http://hotmovs.com/latest-updates/'], 'hotmovs-clips', '',None))
  4199. self.SEARCH_proc='hotmovs-search'
  4200. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4201. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4202. return valTab
  4203. if 'hotmovs-search' == name:
  4204. printDBG( 'Host listsItems begin name='+name )
  4205. valTab = self.listsItems(-1, 'http://hotmovs.com/search/?q=%s' % url.replace(' ','+'), 'hotmovs-clips')
  4206. return valTab
  4207. if 'hotmovs-clips' == name:
  4208. printDBG( 'Host listsItems begin name='+name )
  4209. COOKIEFILE = os_path.join(GetCookieDir(), 'hotmovs.cookie')
  4210. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4211. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4212. sts, data = self.get_Page(url)
  4213. if not sts: return valTab
  4214. printDBG( 'Host getResolvedURL data: '+data )
  4215. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'class="next"', '</a>', False)[1]
  4216. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'data-video-id=', '</article>')
  4217. for item in data:
  4218. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4219. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4220. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4221. phTime = self.cm.ph.getSearchGroups(item, '''class="thumbnail__info__right">([^"^']+?)<''', 1, True)[0].strip()
  4222. if phUrl.startswith('/'): phUrl = 'http://hotmovs.com' + phUrl
  4223. if phImage.startswith('//'): phImage = 'http:' + phImage
  4224. valTab.append(CDisplayListItem(phTitle,'['+phTime+'] '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4225. if next_page:
  4226. next = self.cm.ph.getSearchGroups(next_page, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4227. if next.startswith('/'): next = 'http://hotmovs.com' + next
  4228. if '/categories/' in next: next = next+'?mode=async&function=get_block&block_id=sphinx_list_cat_videos_videos_list'
  4229. if next <> '#search':
  4230. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  4231. return valTab
  4232. if 'pornoxo' == name:
  4233. printDBG( 'Host listsItems begin name='+name )
  4234. self.MAIN_URL = 'https://www.pornoxo.com'
  4235. COOKIEFILE = os_path.join(GetCookieDir(), 'pornoxo.cookie')
  4236. host = "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; androVM for VirtualBox ('Tablet' version with phone caps) Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
  4237. header = {'User-Agent': host, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
  4238. try: data = self.cm.getURLRequestData({ 'url': url, 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  4239. except Exception as e:
  4240. printExc()
  4241. msg = _("Last error:\n%s" % str(e))
  4242. GetIPTVNotify().push('%s' % msg, 'error', 20)
  4243. printDBG( 'Host getResolvedURL query error url: '+url )
  4244. return ''
  4245. printDBG( 'Host getResolvedURL data: '+data )
  4246. data = self.cm.ph.getDataBeetwenMarkers(data, 'title="Main Page"', 'Top Users</div>', False)[1]
  4247. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  4248. for item in data:
  4249. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4250. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].replace('Tube','')
  4251. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  4252. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4253. if phTitle.startswith('+'): phTitle = ''
  4254. if phTitle<>'':
  4255. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'pornoxo-clips', '', None))
  4256. valTab.sort(key=lambda poz: poz.name)
  4257. valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,['https://www.pornoxo.com/videos/longest/'], 'pornoxo-clips', '',None))
  4258. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,['https://www.pornoxo.com/videos/most-popular/today/'], 'pornoxo-clips', '',None))
  4259. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['https://www.pornoxo.com/videos/top-rated/'], 'pornoxo-clips', '',None))
  4260. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['https://www.pornoxo.com/videos/newest/'], 'pornoxo-clips', '',None))
  4261. self.SEARCH_proc='pornoxo-search'
  4262. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4263. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4264. return valTab
  4265. if 'pornoxo-search' == name:
  4266. printDBG( 'Host listsItems begin name='+name )
  4267. valTab = self.listsItems(-1, 'https://www.pornoxo.com/search/%s/?sort=mw&so=y' % url.replace(' ','+'), 'pornoxo-clips')
  4268. return valTab
  4269. if 'pornoxo-clips' == name:
  4270. printDBG( 'Host listsItems begin name='+name )
  4271. COOKIEFILE = os_path.join(GetCookieDir(), 'pornoxo.cookie')
  4272. host = "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; androVM for VirtualBox ('Tablet' version with phone caps) Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
  4273. header = {'Referer':url, 'User-Agent': host, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
  4274. try: data = self.cm.getURLRequestData({ 'url': url, 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  4275. except:
  4276. printDBG( 'Host getResolvedURL query error url: '+url )
  4277. return ''
  4278. printDBG( 'Host getResolvedURL data: '+data )
  4279. next = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  4280. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'vidItem', 'class="clear"')
  4281. for item in data:
  4282. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4283. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4284. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4285. phTime = self.cm.ph.getSearchGroups(item, '''([\d]?\d\d:\d\d)''', 1, True)[0]
  4286. if phUrl.startswith('/'): phUrl = 'https://www.pornoxo.com' + phUrl
  4287. if phImage.startswith('//'): phImage = 'http:' + phImage
  4288. valTab.append(CDisplayListItem(phTitle,'['+phTime+'] '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4289. if next:
  4290. if next.startswith('/'): next = 'https://www.pornoxo.com' + next
  4291. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  4292. return valTab
  4293. if 'pinflix' == name:
  4294. printDBG( 'Host listsItems begin name='+name )
  4295. self.MAIN_URL = 'https://www.pinflix.com'
  4296. COOKIEFILE = os_path.join(GetCookieDir(), 'pinflix.cookie')
  4297. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4298. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4299. sts, data = self.get_Page(url)
  4300. if not sts: return valTab
  4301. printDBG( 'Host listsItems data: '+data )
  4302. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  4303. for item in data:
  4304. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4305. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4306. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  4307. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4308. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  4309. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4310. if phImage.startswith('//'): phImage = 'http:' + phImage
  4311. if phTitle:
  4312. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'pinflix-clips', phImage, None))
  4313. valTab.sort(key=lambda poz: poz.name)
  4314. valTab.insert(0,CDisplayListItem("--- Pornstars ---","Pornstars", CDisplayListItem.TYPE_CATEGORY,['http://www.pinflix.com/pornstars'], 'pinflix-pornstars', '',None))
  4315. valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,['http://www.pinflix.com/?order=longest'], 'pinflix-clips', '',None))
  4316. valTab.insert(0,CDisplayListItem("--- Featured ---","Featured", CDisplayListItem.TYPE_CATEGORY,['http://www.pinflix.com/?order=featured'], 'pinflix-clips', '',None))
  4317. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['http://www.pinflix.com/?order=top-rated'], 'pinflix-clips', '',None))
  4318. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,['http://www.pinflix.com/?order=most-popular'], 'pinflix-clips', '',None))
  4319. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['http://www.pinflix.com/?order=newest'], 'pinflix-clips', '',None))
  4320. self.SEARCH_proc='pinflix-search'
  4321. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4322. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4323. return valTab
  4324. if 'pinflix-search' == name:
  4325. printDBG( 'Host listsItems begin name='+name )
  4326. valTab = self.listsItems(-1, 'https://www.pinflix.com/search?search=%s' % url.replace(' ','+'), 'pinflix-clips')
  4327. return valTab
  4328. if 'pinflix-clips' == name:
  4329. printDBG( 'Host listsItems begin name='+name )
  4330. COOKIEFILE = os_path.join(GetCookieDir(), 'pinflix.cookie')
  4331. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4332. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4333. sts, data = self.get_Page(url)
  4334. if not sts: return valTab
  4335. printDBG( 'Host listsItems data: '+data )
  4336. next_page = self.cm.ph.getSearchGroups(data, '''data-next-page=['"]([^"^']+?)['"]''', 1, True)[0]
  4337. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  4338. for item in data:
  4339. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4340. phImage = self.cm.ph.getSearchGroups(item, '''srcset=['"]([^"^']+?\.jpg)['"]''', 1, True)[0]
  4341. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4342. phTitle = self.cm.ph.getSearchGroups(item, '''img alt="([^"]+?)"''', 1, True)[0]
  4343. phTime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0]
  4344. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4345. if phImage.startswith('//'): phImage = 'http:' + phImage
  4346. if 'video-item' in item:
  4347. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4348. if next_page:
  4349. url = re.sub('&page.+', '', url)
  4350. url = re.sub('\?page.+', '', url)
  4351. if '?order' in url:
  4352. next_page = url+'&page='+next_page
  4353. else:
  4354. next_page = url+'?page='+next_page
  4355. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4356. return valTab
  4357. if 'pinflix-pornstars' == name:
  4358. printDBG( 'Host listsItems begin name='+name )
  4359. COOKIEFILE = os_path.join(GetCookieDir(), 'pinflix.cookie')
  4360. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4361. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4362. sts, data = self.get_Page(url)
  4363. if not sts: return valTab
  4364. printDBG( 'Host listsItems data: '+data )
  4365. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'page active">', '<', False)[1]
  4366. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  4367. for item in data:
  4368. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4369. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4370. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4371. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  4372. if phUrl.startswith('/'): phUrl = 'https://www.pinflix.com' + phUrl
  4373. if phTitle:
  4374. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'pinflix-clips', phImage, None))
  4375. if next_page:
  4376. next_page = 'https://www.pinflix.com/pornstars?page=' + str(int(next_page)+1)
  4377. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4378. return valTab
  4379. if 'upornia' == name:
  4380. printDBG( 'Host listsItems begin name='+name )
  4381. self.MAIN_URL = 'http://www.upornia.com'
  4382. COOKIEFILE = os_path.join(GetCookieDir(), 'upornia.cookie')
  4383. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4384. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4385. sts, data = self.get_Page(url)
  4386. if not sts: return valTab
  4387. #printDBG( 'Host listsItems data: '+data )
  4388. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  4389. for item in data:
  4390. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4391. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4392. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4393. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  4394. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4395. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'upornia-clips', phImage, None))
  4396. valTab.sort(key=lambda poz: poz.name)
  4397. valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,['http://www.upornia.com/longest/'], 'upornia-clips', '',None))
  4398. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,['http://www.upornia.com/most-popular/'], 'upornia-clips', '',None))
  4399. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['http://www.upornia.com/top-rated/'], 'upornia-clips', '',None))
  4400. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['http://www.upornia.com/latest-updates/'], 'upornia-clips', '',None))
  4401. self.SEARCH_proc='upornia-search'
  4402. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4403. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4404. return valTab
  4405. if 'upornia-search' == name:
  4406. printDBG( 'Host listsItems begin name='+name )
  4407. valTab = self.listsItems(-1, 'https://upornia.com/search/?q=%s' % url.replace(' ','+'), 'upornia-clips')
  4408. return valTab
  4409. if 'upornia-clips' == name:
  4410. printDBG( 'Host listsItems begin name='+name )
  4411. COOKIEFILE = os_path.join(GetCookieDir(), 'upornia.cookie')
  4412. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4413. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4414. sts, data = self.get_Page(url)
  4415. if not sts: return valTab
  4416. printDBG( 'Host listsItems data: '+data )
  4417. next_page = self.cm.ph.getSearchGroups(data, '''<li class="next">[^>]+?href=['"]([^"^']+?)['"]''', 1, True)[0]
  4418. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  4419. for item in data:
  4420. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4421. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  4422. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4423. phTitle = self.cm.ph.getSearchGroups(item, '''alt="([^"]+?)"''', 1, True)[0]
  4424. phTime = self.cm.ph.getSearchGroups(item, '''right">([^>]+?)<''', 1, True)[0]
  4425. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4426. if phImage.startswith('/'): phImage = 'http:' + phImage
  4427. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4428. if next_page:
  4429. if next_page.startswith('/'): next_page = 'https://upornia.com' + next_page
  4430. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4431. return valTab
  4432. if 'txxx' == name:
  4433. printDBG( 'Host listsItems begin name='+name )
  4434. self.MAIN_URL = 'https://www.txxx.com'
  4435. url = 'https://txxx.com/api/json/categories/14400/str.all.json'
  4436. COOKIEFILE = os_path.join(GetCookieDir(), 'txxx.cookie')
  4437. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4438. sts, data = self.getPage(url, 'txxx.cookie', 'txxx.com', self.defaultParams)
  4439. if not sts: return valTab
  4440. self.page=1
  4441. printDBG( 'Host data:%s' % data )
  4442. try:
  4443. result = byteify(simplejson.loads(data))
  4444. for item in result["categories"]:
  4445. phUrl = 'https://txxx.com/categories/%s/1/?sort=latest-updates&date=day&type=all' % str(item["dir"])
  4446. phUrl = 'https://txxx.com/api/json/videos/86400/str/latest-updates/60/categories.%s.%s.all..day.json' % (str(item["dir"]), str(self.page))
  4447. phTitle = str(item["title"])
  4448. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'txxx-clips', '', None))
  4449. except Exception:
  4450. printExc()
  4451. valTab.sort(key=lambda poz: poz.name)
  4452. #valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,['https://www.txxx.com/longest/'], 'txxx-clips', '',None))
  4453. #valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,['https://www.txxx.com/most-popular/'], 'txxx-clips', '',None))
  4454. #valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['https://www.txxx.com/top-rated/'], 'txxx-clips', '',None))
  4455. #valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['https://www.txxx.com/latest-updates/'], 'txxx-clips', '',None))
  4456. self.SEARCH_proc='txxx-search'
  4457. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4458. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4459. return valTab
  4460. if 'txxx-search' == name:
  4461. printDBG( 'Host listsItems begin name='+name )
  4462. valTab = self.listsItems(-1, 'https://txxx.com/api/videos.php?params=86400/str/relevance/60/search..1.all..day&s=%s' % url.replace(' ','+'), 'txxx-clips')
  4463. return valTab
  4464. if 'txxx-clips' == name:
  4465. printDBG( 'Host listsItems begin name='+name )
  4466. catUrl = self.currList[Index].possibleTypesOfSearch
  4467. printDBG( 'Host listsItems cat-url: '+str(catUrl) )
  4468. next = url
  4469. if catUrl == None:
  4470. self.page = 1
  4471. else:
  4472. self.page += 1
  4473. COOKIEFILE = os_path.join(GetCookieDir(), 'txxx.cookie')
  4474. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4475. sts, data = self.getPage(url, 'txxx.cookie', 'txxx.com', self.defaultParams)
  4476. if not sts: return ''
  4477. printDBG( 'Host listsItems data: '+data )
  4478. try:
  4479. result = byteify(simplejson.loads(data))
  4480. for item in result["videos"]:
  4481. phTitle = str(item["title"])
  4482. video_id = str(item["video_id"])
  4483. scr = str(item["scr"])
  4484. phUrl = "https://txxx.com/api/videofile.php?video_id=%s&lifetime=8640000" % video_id
  4485. phTime = str(item["duration"])
  4486. added = str(item["post_date"])
  4487. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\nAdded: '+added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, scr, None))
  4488. except Exception:
  4489. printExc()
  4490. next_page = url.replace('.'+str(self.page)+'.','.'+str(self.page+1)+'.')
  4491. valTab.append(CDisplayListItem('Next', 'Page: '+str(self.page+1), CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', 'next'))
  4492. return valTab
  4493. if 'hclips' == name:
  4494. printDBG( 'Host listsItems begin name='+name )
  4495. self.MAIN_URL = 'http://www.hclips.com'
  4496. url = 'https://hclips.com/api/json/categories/14400/str.all.json'
  4497. COOKIEFILE = os_path.join(GetCookieDir(), 'hclips.cookie')
  4498. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4499. sts, data = self.getPage(url, 'hclips.cookie', 'hclips.com', self.defaultParams)
  4500. if not sts: return valTab
  4501. self.page=1
  4502. printDBG( 'Host data:%s' % data )
  4503. try:
  4504. result = byteify(simplejson.loads(data))
  4505. for item in result["categories"]:
  4506. phUrl = 'https://hclips.com/categories/%s/1/?sort=latest-updates&date=day&type=all' % str(item["dir"])
  4507. phUrl = 'https://hclips.com/api/json/videos/86400/str/latest-updates/60/categories.%s.%s.all..day.json' % (str(item["dir"]), str(self.page))
  4508. phTitle = str(item["title"])
  4509. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'hclips-clips', '', None))
  4510. except Exception:
  4511. printExc()
  4512. valTab.sort(key=lambda poz: poz.name)
  4513. #valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,['https://www.hclips.com/longest/'], 'hclips-clips', '',None))
  4514. #valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,['https://www.hclips.com/most-popular/'], 'hclips-clips', '',None))
  4515. #valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['https://www.hclips.com/top-rated/'], 'hclips-clips', '',None))
  4516. #valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['https://www.hclips.com/latest-updates/'], 'hclips-clips', '',None))
  4517. self.SEARCH_proc='hclips-search'
  4518. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4519. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4520. return valTab
  4521. if 'hclips-search' == name:
  4522. printDBG( 'Host listsItems begin name='+name )
  4523. valTab = self.listsItems(-1, 'https://hclips.com/api/videos.php?params=86400/str/relevance/60/search..1.all..day&s=%s' % url.replace(' ','+'), 'hclips-clips')
  4524. return valTab
  4525. if 'hclips-clips' == name:
  4526. printDBG( 'Host listsItems begin name='+name )
  4527. catUrl = self.currList[Index].possibleTypesOfSearch
  4528. printDBG( 'Host listsItems cat-url: '+str(catUrl) )
  4529. next = url
  4530. if catUrl == None:
  4531. self.page = 1
  4532. else:
  4533. self.page += 1
  4534. COOKIEFILE = os_path.join(GetCookieDir(), 'hclips.cookie')
  4535. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4536. sts, data = self.getPage(url, 'hclips.cookie', 'hclips.com', self.defaultParams)
  4537. if not sts: return ''
  4538. printDBG( 'Host listsItems data: '+data )
  4539. try:
  4540. result = byteify(simplejson.loads(data))
  4541. for item in result["videos"]:
  4542. phTitle = str(item["title"])
  4543. video_id = str(item["video_id"])
  4544. scr = str(item["scr"])
  4545. phUrl = "https://hclips.com/api/videofile.php?video_id=%s&lifetime=8640000" % video_id
  4546. phTime = str(item["duration"])
  4547. added = str(item["post_date"])
  4548. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\nAdded: '+added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, scr, None))
  4549. except Exception:
  4550. printExc()
  4551. next_page = url.replace('.'+str(self.page)+'.','.'+str(self.page+1)+'.')
  4552. valTab.append(CDisplayListItem('Next', 'Page: '+str(self.page+1), CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', 'next'))
  4553. return valTab
  4554. if 'sunporno' == name:
  4555. printDBG( 'Host listsItems begin name='+name )
  4556. self.MAIN_URL = 'https://www.sunporno.com'
  4557. COOKIEFILE = os_path.join(GetCookieDir(), 'sunporno.cookie')
  4558. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4559. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4560. sts, data = self.get_Page(url)
  4561. if not sts: return valTab
  4562. printDBG( 'Host listsItems data: '+data )
  4563. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="thumb-container', '</div>')
  4564. for item in data:
  4565. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4566. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4567. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4568. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4569. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  4570. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4571. if phImage.startswith('//'): phImage = 'http:' + phImage
  4572. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  4573. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'sunporno-clips', phImage, None))
  4574. valTab.sort(key=lambda poz: poz.name)
  4575. #valTab.insert(0,CDisplayListItem("--- Longest ---","Longest", CDisplayListItem.TYPE_CATEGORY,['https://www.sunporno.com/long-movies/date-last-week/'], 'sunporno-clips', '',None))
  4576. valTab.insert(0,CDisplayListItem("--- Most viewed ---","Most viewed", CDisplayListItem.TYPE_CATEGORY,['https://www.sunporno.com/most-viewed/date-last-week/'], 'sunporno-clips', '',None))
  4577. #valTab.insert(0,CDisplayListItem("--- HD Porn ---","HD Porn", CDisplayListItem.TYPE_CATEGORY,['https://www.sunporno.com/high-definition/date-last-week/'], 'sunporno-clips', '',None))
  4578. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['https://www.sunporno.com/top-rated/date-last-week/'], 'sunporno-clips', '',None))
  4579. valTab.insert(0,CDisplayListItem("--- Recent videos ---","Recent videos", CDisplayListItem.TYPE_CATEGORY,['https://www.sunporno.com/most-recent/date-last-week/'], 'sunporno-clips', '',None))
  4580. self.SEARCH_proc='sunporno-search'
  4581. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4582. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4583. return valTab
  4584. if 'sunporno-search' == name:
  4585. printDBG( 'Host listsItems begin name='+name )
  4586. valTab = self.listsItems(-1, 'https://www.sunporno.com/search/%s/' % url.replace(' ','+'), 'sunporno-clips')
  4587. return valTab
  4588. if 'sunporno-clips' == name:
  4589. printDBG( 'Host listsItems begin name='+name )
  4590. COOKIEFILE = os_path.join(GetCookieDir(), 'sunporno.cookie')
  4591. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4592. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4593. sts, data = self.get_Page(url)
  4594. if not sts: return valTab
  4595. printDBG( 'Host listsItems data: '+data )
  4596. next_page = self.cm.ph.getSearchGroups(data, '''pag-next"\shref=['"]([^"^']+?)['"]''', 1, True)[0]
  4597. data = data.split('data-id=')
  4598. if len(data): del data[0]
  4599. for item in data:
  4600. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4601. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  4602. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4603. phTitle = self.cm.ph.getSearchGroups(item, '''title="([^"]+?)"''', 1, True)[0]
  4604. phTime = self.cm.ph.getSearchGroups(item, '''"btime">([^>]+?)<''', 1, True)[0]
  4605. if phUrl.startswith('/'): phUrl = 'https://www.sunporno.com' + phUrl
  4606. if phImage.startswith('/'): phImage = 'http:' + phImage
  4607. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4608. if next_page:
  4609. if next_page.startswith('/'): next_page = 'https://www.sunporno.com' + next_page
  4610. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4611. return valTab
  4612. if 'sexu' == name:
  4613. printDBG( 'Host listsItems begin name='+name )
  4614. self.MAIN_URL = 'http://sexu.com'
  4615. COOKIEFILE = os_path.join(GetCookieDir(), 'sexu.cookie')
  4616. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4617. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4618. sts, data = self.get_Page(url)
  4619. if not sts: return valTab
  4620. printDBG( 'Host listsItems data: '+data )
  4621. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li', '</li>')
  4622. for item in data:
  4623. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/tag[^"^']+?)['"]''', 1, True)[0]
  4624. phTitle = self._cleanHtmlStr(item).strip()
  4625. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4626. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4627. if phUrl:
  4628. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'sexu-clips', '', None))
  4629. valTab.sort(key=lambda poz: poz.name)
  4630. valTab.insert(0,CDisplayListItem("--- Trending ---","Trending", CDisplayListItem.TYPE_CATEGORY,['http://sexu.com/trending/1'], 'sexu-clips', '',None))
  4631. #valTab.insert(0,CDisplayListItem("--- Hall of Fame ---","Hall of Fame", CDisplayListItem.TYPE_CATEGORY,['http://sexu.com/all/1'], 'sexu-clips', '',None))
  4632. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,['http://sexu.com/1'], 'sexu-clips', '',None))
  4633. self.SEARCH_proc='sexu-search'
  4634. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4635. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4636. return valTab
  4637. if 'sexu-search' == name:
  4638. printDBG( 'Host listsItems begin name='+name )
  4639. valTab = self.listsItems(-1, 'http://sexu.com/search?q=%s' % url.replace(' ','+'), 'sexu-clips')
  4640. return valTab
  4641. if 'sexu-clips' == name:
  4642. printDBG( 'Host listsItems begin name='+name )
  4643. COOKIEFILE = os_path.join(GetCookieDir(), 'sexu.cookie')
  4644. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4645. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4646. sts, data = self.get_Page(url)
  4647. if not sts: return valTab
  4648. printDBG( 'Host listsItems data: '+data )
  4649. next_page = self.cm.ph.getSearchGroups(data, '''pagination__arrow--next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  4650. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="grid__item">', '</li>')
  4651. for item in data:
  4652. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4653. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  4654. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4655. phTitle = self.cm.ph.getSearchGroups(item, '''alt="([^"]+?)"''', 1, True)[0]
  4656. phTime = self.cm.ph.getSearchGroups(item, '''counter">([^>]+?)<''', 1, True)[0]
  4657. if phUrl.startswith('/'): phUrl = 'http://sexu.com' + phUrl
  4658. if phImage.startswith('/'): phImage = 'http:' + phImage
  4659. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4660. if next_page:
  4661. if next_page.startswith('/'): next_page = 'http://sexu.com' + next_page
  4662. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4663. return valTab
  4664. if 'tubewolf' == name:
  4665. printDBG( 'Host listsItems begin name='+name )
  4666. self.MAIN_URL = url #'http://www.tubewolf.com'
  4667. url = url + '/categories/'
  4668. COOKIEFILE = os_path.join(GetCookieDir(), 'tubewolf.cookie')
  4669. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4670. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4671. sts, data = self.get_Page(url)
  4672. if not sts: return valTab
  4673. printDBG( 'Host listsItems data: '+data )
  4674. if url.startswith('http://crocotube.com'):
  4675. data = self.cm.ph.getDataBeetwenMarkers(data, 'A-Z porn categories', 'Footer', False)[1]
  4676. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class="ct-az-list-item', '</a>')
  4677. elif url.startswith('https://www.alphaporno.com'):
  4678. data = self.cm.ph.getDataBeetwenMarkers(data, '>Categories<', 'Footer', False)[1]
  4679. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="thumb', '</li>')
  4680. else:
  4681. data = self.cm.ph.getDataBeetwenMarkers(data, 'Categories<', 'Categories<', False)[1]
  4682. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  4683. for item in data:
  4684. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4685. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4686. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4687. if not phTitle: phTitle = self._cleanHtmlStr(item).strip()
  4688. phTitle = phTitle.replace(' Movies','')
  4689. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4690. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4691. if phUrl.startswith('/'): phUrl = url + phUrl
  4692. if phUrl:
  4693. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'tubewolf-clips', phImage, url))
  4694. valTab.sort(key=lambda poz: poz.name)
  4695. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/top-rated'], 'tubewolf-clips', '',self.MAIN_URL))
  4696. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/most-popular'], 'tubewolf-clips', '',self.MAIN_URL))
  4697. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/latest-updates'], 'tubewolf-clips', '',self.MAIN_URL))
  4698. self.SEARCH_proc='tubewolf-search'
  4699. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4700. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4701. return valTab
  4702. if 'tubewolf-search' == name:
  4703. printDBG( 'Host listsItems begin name='+name )
  4704. valTab = self.listsItems(-1, self.MAIN_URL+'/search/?q=%s' % url.replace(' ','+'), 'tubewolf-clips')
  4705. return valTab
  4706. if 'tubewolf-clips' == name:
  4707. printDBG( 'Host listsItems begin name='+name )
  4708. COOKIEFILE = os_path.join(GetCookieDir(), 'tubewolf.cookie')
  4709. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4710. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4711. sts, data = self.get_Page(url)
  4712. if not sts: return valTab
  4713. printDBG( 'Host listsItems data: '+data )
  4714. catUrl = self.currList[Index].possibleTypesOfSearch
  4715. next_page = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  4716. if not next_page: next_page = self.cm.ph.getDataBeetwenMarkers(data, '<div class="ct-pagination">', 'Next', False)[1]
  4717. if url.startswith('https://www.alphaporno.com'): data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a itemprop="url"', '</li>')
  4718. if 'crocotube' in url:
  4719. data = self.cm.ph.getDataBeetwenMarkers(data, 'class="ct-videos-list', 'footer', False)[1]
  4720. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  4721. if url.startswith('https://www.tubewolf.com'): data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a itemprop="url"', '</div>')
  4722. if url.startswith('https://zedporn.com'): data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="thumb', '</li>')
  4723. for item in data:
  4724. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4725. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  4726. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4727. phTitle = self.cm.ph.getSearchGroups(item, '''title="([^"]+?)"''', 1, True)[0]
  4728. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt="([^"]+?)"''', 1, True)[0]
  4729. phTime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0]
  4730. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  4731. if phImage.startswith('/'): phImage = 'http:' + phImage
  4732. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  4733. if not 'Sponsored' in item and phTitle:
  4734. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4735. if next_page:
  4736. if not next_page.startswith('http'):
  4737. next_page = re.compile('<a href="(.*?)"').findall(next_page)
  4738. next_page = next_page[-1]
  4739. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  4740. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4741. return valTab
  4742. if 'PORNTUBE' == name:
  4743. printDBG( 'Host listsItems begin name='+name )
  4744. self.MAIN_URL = 'https://www.porntube.com'
  4745. url = url + '/tags'
  4746. COOKIEFILE = os_path.join(GetCookieDir(), 'PORNTUBE.cookie')
  4747. try: data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  4748. except Exception as e:
  4749. printExc()
  4750. msg = _("Last error:\n%s" % str(e))
  4751. GetIPTVNotify().push('%s' % msg, 'error', 20)
  4752. printDBG( 'Host error url: '+url )
  4753. return valTab
  4754. #printDBG( 'Host listsItems data: '+data )
  4755. data = self.cm.ph.getSearchGroups(data, '''window.INITIALSTATE = ['"]([^"^']+?)['"]''', 1, True)[0]
  4756. data = urllib.unquote(base64.b64decode(data))
  4757. result = byteify(simplejson.loads(data))
  4758. for item in result["page"]["embedded"]["topTags"]:
  4759. phUrl = self.MAIN_URL + "/tags/" + str(item["slug"])
  4760. phTitle = str(item["name"]).title()
  4761. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORNTUBE-clips', '', None))
  4762. valTab.sort(key=lambda poz: poz.name)
  4763. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=rating&time=month'], 'PORNTUBE-clips', '',self.MAIN_URL))
  4764. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=views&time=month'], 'PORNTUBE-clips', '',self.MAIN_URL))
  4765. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=date'], 'PORNTUBE-clips', '',self.MAIN_URL))
  4766. self.SEARCH_proc='PORNTUBE-search'
  4767. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4768. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4769. return valTab
  4770. if 'PORNTUBE-search' == name:
  4771. printDBG( 'Host listsItems begin name='+name )
  4772. valTab = self.listsItems(-1, self.MAIN_URL+'/search/?q=%s' % url.replace(' ','+'), 'PORNTUBE-clips')
  4773. return valTab
  4774. if 'PORNTUBE-clips' == name:
  4775. printDBG( 'Host listsItems begin name='+name )
  4776. COOKIEFILE = os_path.join(GetCookieDir(), 'PORNTUBE.cookie')
  4777. try: data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': False, 'load_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  4778. except:
  4779. printDBG( 'Host error url: '+url )
  4780. return valTab
  4781. #printDBG( 'Host listsItems data: '+data )
  4782. catUrl = self.currList[Index].possibleTypesOfSearch
  4783. next_page = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  4784. data = self.cm.ph.getSearchGroups(data, '''window.INITIALSTATE = ['"]([^"^']+?)['"]''', 1, True)[0]
  4785. data = urllib.unquote(base64.b64decode(data))
  4786. printDBG( 'Host listsItems data: '+data )
  4787. try:
  4788. result = byteify(simplejson.loads(data))
  4789. if result["page"]["embedded"].has_key('videos'):
  4790. node = result["page"]["embedded"]
  4791. else:
  4792. node = result["page"]
  4793. for item in node["videos"]["_embedded"]["items"]:
  4794. phUrl = self.MAIN_URL + "/api/videos/" + str(item["uuid"]) + "?ssr=false&slug=" + str(item["slug"]) + "&orientation="
  4795. phTitle = str(item["title"])
  4796. m, s = divmod(item['durationInSeconds'], 60)
  4797. phTime = "%02d:%02d" % (m, s)
  4798. phImage = str(item["thumbnailsList"][0])
  4799. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4800. except Exception:
  4801. printExc()
  4802. if next_page:
  4803. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4804. return valTab
  4805. if 'ASHEMALETUBE' == name:
  4806. printDBG( 'Host listsItems begin name='+name )
  4807. self.MAIN_URL = 'https://www.ashemaletube.com'
  4808. COOKIEFILE = os_path.join(GetCookieDir(), 'ASHEMALETUBE.cookie')
  4809. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  4810. sts, data = self.getPage(url, 'ASHEMALETUBE.cookie', 'ashemaletube.com', self.defaultParams)
  4811. if not sts: return valTab
  4812. printDBG( 'Host listsItems data: '+data )
  4813. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  4814. for item in data:
  4815. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4816. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4817. if not 'Tube' in phTitle: continue
  4818. if not '/videos/' in phUrl: continue
  4819. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4820. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4821. if phUrl.startswith('/'): phUrl = 'https://www.ashemaletube.com' + phUrl
  4822. phTitle = phTitle.replace ('Porn Tube','').replace ('Tube','')
  4823. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'ASHEMALETUBE-clips', '', None))
  4824. valTab.sort(key=lambda poz: poz.name)
  4825. valTab.insert(0,CDisplayListItem("--- Stories ---","Stories", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/stories/'], 'ASHEMALETUBE-clips', '',self.MAIN_URL))
  4826. valTab.insert(0,CDisplayListItem("--- Models ---","Models", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/models/'], 'ASHEMALETUBE-clips', '',self.MAIN_URL))
  4827. valTab.insert(0,CDisplayListItem("--- Best Recent ---","Best Recent", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'ASHEMALETUBE-clips', '',self.MAIN_URL))
  4828. self.SEARCH_proc='ASHEMALETUBE-search'
  4829. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4830. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4831. return valTab
  4832. if 'ASHEMALETUBE-search' == name:
  4833. printDBG( 'Host listsItems begin name='+name )
  4834. valTab = self.listsItems(-1, 'https://www.ashemaletube.com/search/%s/' % url.replace(' ','+'), 'ASHEMALETUBE-clips')
  4835. return valTab
  4836. if 'ASHEMALETUBE-clips' == name:
  4837. printDBG( 'Host listsItems begin name='+name )
  4838. COOKIEFILE = os_path.join(GetCookieDir(), 'ASHEMALETUBE.cookie')
  4839. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  4840. sts, data = self.getPage(url, 'ASHEMALETUBE.cookie', 'ashemaletube.com', self.defaultParams)
  4841. if not sts: return valTab
  4842. printDBG( 'Host listsItems data: '+data )
  4843. catUrl = self.currList[Index].possibleTypesOfSearch
  4844. next_page = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  4845. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="js-pop thumb-item videospot', '</li>')
  4846. if not data2: data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="thumb-item videospot', '</li>')
  4847. for item in data2:
  4848. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4849. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4850. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4851. phTime = self.cm.ph.getSearchGroups(item, '''([\d]?\d\d:\d\d)''', 1, True)[0]
  4852. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4853. if phUrl.startswith('/'): phUrl = 'https://www.ashemaletube.com' + phUrl
  4854. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4855. if next_page:
  4856. if next_page.startswith('/'): next_page = 'https://www.ashemaletube.com' + next_page
  4857. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4858. return valTab
  4859. if 'MOMXXXFUN' == name:
  4860. printDBG( 'Host listsItems begin name='+name )
  4861. self.MAIN_URL = 'https://momxxxfun.com'
  4862. COOKIEFILE = os_path.join(GetCookieDir(), 'momxxxfun.cookie')
  4863. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4864. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4865. sts, data = self.get_Page(url)
  4866. if not sts: return
  4867. printDBG( 'Host listsItems data: '+data )
  4868. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a href', '</a>')
  4869. data = data.split('<div class="popular-tag">')
  4870. if len(data): del data[0]
  4871. for item in data:
  4872. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/search/videos/[^"^']+?)['"]''', 1, True)[0]
  4873. phTitle = phUrl.split('/')[-1] #self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4874. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4875. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4876. if phUrl.startswith('/'): phUrl = 'https://momxxxfun.com' + phUrl
  4877. if phImage.startswith('/'): phImage = 'https://momxxxfun.com' + phImage
  4878. if phTitle:
  4879. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl+'?type=public'],'momxxxfun-clips', phImage, None))
  4880. valTab.sort(key=lambda poz: poz.name)
  4881. self.SEARCH_proc='momxxxfun-search'
  4882. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4883. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4884. return valTab
  4885. if 'momxxxfun-search' == name:
  4886. printDBG( 'Host listsItems begin name='+name )
  4887. valTab = self.listsItems(-1, 'https://momxxxfun.com/search/videos/%s' % url.replace(' ','+'), 'momxxxfun-clips')
  4888. return valTab
  4889. if 'momxxxfun-clips' == name:
  4890. printDBG( 'Host listsItems begin name='+name )
  4891. COOKIEFILE = os_path.join(GetCookieDir(), 'momxxxfun.cookie')
  4892. sts, data = self.get_Page(url)
  4893. if not sts: return
  4894. printDBG( 'Host listsItems data: '+data )
  4895. catUrl = self.currList[Index].possibleTypesOfSearch
  4896. next_page = self.cm.ph.getSearchGroups(data, '''</a></li><li><a href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  4897. data = data.split('<div class=" col-sm')
  4898. if len(data): del data[0]
  4899. for item in data:
  4900. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4901. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4902. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4903. phTime = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].strip()
  4904. if phTime=='': phTime = self.cm.ph.getSearchGroups(item, '''>HD </span>([^>]+?)<''', 1, True)[0]
  4905. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4906. if phUrl.startswith('/'): phUrl = 'https://momxxxfun.com' + phUrl
  4907. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  4908. if next_page:
  4909. if next_page.startswith('/'): next_page = 'https://momxxxfun.com' + next_page
  4910. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4911. return valTab
  4912. if 'streamporn' == name:
  4913. printDBG( 'Host listsItems begin name='+name )
  4914. self.MAIN_URL = 'https://streamporn.pw'
  4915. COOKIEFILE = os_path.join(GetCookieDir(), 'streamporn.cookie')
  4916. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4917. sts, data = self._getPage(url, self.defaultParams)
  4918. if not sts: return
  4919. printDBG( 'Host listsItems data: '+str(data) )
  4920. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li id="menu-item', '</a>')
  4921. for item in data:
  4922. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4923. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4924. phTitle = self._cleanHtmlStr(item).strip()
  4925. if phTitle=='Studios': phTitle='.:'+phTitle+':.'
  4926. if phTitle=='Years': phTitle='.:'+phTitle+':.'
  4927. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  4928. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4929. if phUrl.startswith('/'): phUrl = 'https://streamporn.pw' + phUrl
  4930. if phImage.startswith('/'): phImage = 'https://streamporn.pw' + phImage
  4931. if phTitle<>'Hollywood Movies' and phTitle<>'Tvshows':
  4932. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'streamporn-clips', phImage, None))
  4933. #valTab.sort(key=lambda poz: poz.name)
  4934. self.SEARCH_proc='streamporn-search'
  4935. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  4936. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  4937. return valTab
  4938. if 'streamporn-search' == name:
  4939. printDBG( 'Host listsItems begin name='+name )
  4940. valTab = self.listsItems(-1, 'https://streamporn.pw/?s=%s' % url.replace(' ','+'), 'streamporn-clips')
  4941. return valTab
  4942. if 'streamporn-clips' == name:
  4943. printDBG( 'Host listsItems begin name='+name )
  4944. COOKIEFILE = os_path.join(GetCookieDir(), 'streamporn.cookie')
  4945. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4946. sts, data = self._getPage(url, self.defaultParams)
  4947. if not sts: return
  4948. printDBG( 'Host listsItems data: '+str(data) )
  4949. catUrl = self.currList[Index].possibleTypesOfSearch
  4950. next_page = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  4951. if next_page =='': next_page = self.cm.ph.getSearchGroups(data, '''class='active'>.*?class='page larger' href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  4952. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div data-movie-id', '<div class="jtip-bottom">')
  4953. for item in data:
  4954. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4955. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  4956. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  4957. phTime = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].strip()
  4958. if phTime=='': phTime = self.cm.ph.getSearchGroups(item, '''>HD </span>([^>]+?)<''', 1, True)[0]
  4959. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4960. if phUrl.startswith('/'): phUrl = 'https://streamporn.pw' + phUrl
  4961. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'streamporn-serwer', phImage, phImage))
  4962. if next_page:
  4963. if next_page.startswith('/'): next_page = 'https://streamporn.pw' + next_page
  4964. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  4965. return valTab
  4966. if 'streamporn-serwer' == name:
  4967. printDBG( 'Host listsItems begin name='+name )
  4968. COOKIEFILE = os_path.join(GetCookieDir(), 'streamporn.cookie')
  4969. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  4970. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  4971. sts, data = self._getPage(url, self.defaultParams)
  4972. if not sts: return valTab
  4973. printDBG( 'Host listsItems data: '+str(data) )
  4974. catUrl = self.currList[Index].possibleTypesOfSearch
  4975. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="hosts', '</li>')
  4976. for item in data:
  4977. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  4978. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  4979. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  4980. phTime = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].strip()
  4981. if phTime=='': phTime = self.cm.ph.getSearchGroups(item, '''>HD </span>([^>]+?)<''', 1, True)[0]
  4982. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  4983. if phUrl.startswith('/'): phUrl = 'https://streamporn.pw' + phUrl
  4984. if '/goto/' in phUrl:
  4985. self.defaultParams['header']['Referer'] = url
  4986. sts, data = self._getPage(phUrl, self.defaultParams)
  4987. if not sts: return
  4988. printDBG( 'Host listsItems data2: '+str(data) )
  4989. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  4990. printDBG( 'Host listsItems phUrl: '+str(phUrl) )
  4991. if '/goto/' in phUrl:
  4992. sts, data = self._getPage(phUrl, self.defaultParams)
  4993. if not sts: return
  4994. printDBG( 'Host listsItems data2: '+str(data) )
  4995. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  4996. if '/goto/' in phUrl:
  4997. sts, data = self._getPage(phUrl, self.defaultParams)
  4998. if not sts: return
  4999. printDBG( 'Host listsItems data2: '+str(data) )
  5000. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  5001. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  5002. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  5003. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, catUrl, None))
  5004. return valTab
  5005. if 'onlinepornfree' == name:
  5006. printDBG( 'Host listsItems begin name='+name )
  5007. self.MAIN_URL = 'https://onlinepornfree.xyz'
  5008. COOKIEFILE = os_path.join(GetCookieDir(), 'onlinepornfree.cookie')
  5009. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5010. sts, data = self._getPage(url, self.defaultParams)
  5011. if not sts: return
  5012. printDBG( 'Host listsItems data: '+str(data) )
  5013. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li id="menu-item', '</a>')
  5014. for item in data:
  5015. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5016. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  5017. phTitle = self._cleanHtmlStr(item).strip()
  5018. #if phTitle=='Studios': phTitle='.:'+phTitle+':.'
  5019. #if phTitle=='Years': phTitle='.:'+phTitle+':.'
  5020. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5021. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5022. if phUrl.startswith('/'): phUrl = 'https://onlinepornfree.xyz' + phUrl
  5023. if phImage.startswith('/'): phImage = 'https://onlinepornfree.xyz' + phImage
  5024. if phTitle<>'Studios' and phTitle<>'Sitemap' and phTitle<>'Contact' and phTitle<>'Movies TV Series':
  5025. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'onlinepornfree-clips', phImage, None))
  5026. #valTab.sort(key=lambda poz: poz.name)
  5027. self.SEARCH_proc='onlinepornfree-search'
  5028. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5029. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5030. return valTab
  5031. if 'onlinepornfree-search' == name:
  5032. printDBG( 'Host listsItems begin name='+name )
  5033. valTab = self.listsItems(-1, 'https://onlinepornfree.xyz/?s=%s' % url.replace(' ','+'), 'onlinepornfree-clips')
  5034. return valTab
  5035. if 'onlinepornfree-clips' == name:
  5036. printDBG( 'Host listsItems begin name='+name )
  5037. COOKIEFILE = os_path.join(GetCookieDir(), 'onlinepornfree.cookie')
  5038. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5039. sts, data = self._getPage(url, self.defaultParams)
  5040. if not sts: return
  5041. printDBG( 'Host listsItems data: '+str(data) )
  5042. catUrl = self.currList[Index].possibleTypesOfSearch
  5043. next_page = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  5044. if next_page =='': next_page = self.cm.ph.getSearchGroups(data, '''class='active'>.*?class='page larger' href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  5045. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  5046. for item in data:
  5047. phUrl = self.cm.getFullUrl(self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0], self.cm.getBaseUrl(url))
  5048. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5049. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''Title">([^>]+?)<''', 1, True)[0].strip()
  5050. phImage = self.cm.ph.getSearchGroups(item, '''<img src=['"]([^"^']+?)['"]''', 1, True)[0]
  5051. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5052. phTime = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].strip()
  5053. if phTime=='': phTime = self.cm.ph.getSearchGroups(item, '''>HD </span>([^>]+?)<''', 1, True)[0]
  5054. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5055. if phUrl.startswith('/'): phUrl = 'https://onlinepornfree.xyz' + phUrl
  5056. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'onlinepornfree-serwer', phImage, phImage))
  5057. if next_page:
  5058. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [self.cm.getFullUrl(next_page, self.cm.getBaseUrl(url))], name, '', None))
  5059. return valTab
  5060. if 'onlinepornfree-serwer' == name:
  5061. printDBG( 'Host listsItems begin name='+name )
  5062. COOKIEFILE = os_path.join(GetCookieDir(), 'onlinepornfree.cookie')
  5063. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5064. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5065. sts, data = self._getPage(url, self.defaultParams)
  5066. if not sts: return
  5067. printDBG( 'Host listsItems data: '+str(data) )
  5068. catUrl = self.currList[Index].possibleTypesOfSearch
  5069. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="hosts', '</li>')
  5070. for item in data:
  5071. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5072. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  5073. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  5074. phTime = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].strip()
  5075. if phTime=='': phTime = self.cm.ph.getSearchGroups(item, '''>HD </span>([^>]+?)<''', 1, True)[0]
  5076. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5077. if phUrl.startswith('/'): phUrl = 'https://onlinepornfree.xyz' + phUrl
  5078. if '/goto/' in phUrl:
  5079. self.defaultParams['header']['Referer'] = url
  5080. sts, data = self._getPage(phUrl, self.defaultParams)
  5081. if not sts: return
  5082. printDBG( 'Host listsItems data2: '+str(data) )
  5083. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  5084. printDBG( 'Host listsItems phUrl: '+str(phUrl) )
  5085. if '/goto/' in phUrl:
  5086. sts, data = self._getPage(phUrl, self.defaultParams)
  5087. if not sts: return
  5088. printDBG( 'Host listsItems data2: '+str(data) )
  5089. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  5090. if '/goto/' in phUrl:
  5091. sts, data = self._getPage(phUrl, self.defaultParams)
  5092. if not sts: return
  5093. printDBG( 'Host listsItems data2: '+str(data) )
  5094. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  5095. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  5096. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, catUrl, None))
  5097. return valTab
  5098. if 'fux' == name:
  5099. printDBG( 'Host listsItems begin name='+name )
  5100. self.MAIN_URL = 'https://www.fux.com'
  5101. url = url + '/tags'
  5102. COOKIEFILE = os_path.join(GetCookieDir(), 'fux.cookie')
  5103. try: data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  5104. except Exception as e:
  5105. printExc()
  5106. msg = _("Last error:\n%s" % str(e))
  5107. GetIPTVNotify().push('%s' % msg, 'error', 20)
  5108. printDBG( 'Host error url: '+url )
  5109. return valTab
  5110. #printDBG( 'Host listsItems data: '+data )
  5111. data = self.cm.ph.getSearchGroups(data, '''window.INITIALSTATE = ['"]([^"^']+?)['"]''', 1, True)[0]
  5112. data = urllib.unquote(base64.b64decode(data))
  5113. result = byteify(simplejson.loads(data))
  5114. for item in result["page"]["embedded"]["topTags"]:
  5115. phUrl = self.MAIN_URL + "/tags/" + str(item["slug"])
  5116. phTitle = str(item["name"]).title()
  5117. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'fux-clips', '', None))
  5118. valTab.sort(key=lambda poz: poz.name)
  5119. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=rating&time=month'], 'fux-clips', '',self.MAIN_URL))
  5120. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=views&time=month'], 'fux-clips', '',self.MAIN_URL))
  5121. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=date'], 'fux-clips', '',self.MAIN_URL))
  5122. self.SEARCH_proc='fux-search'
  5123. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5124. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5125. return valTab
  5126. if 'fux-search' == name:
  5127. printDBG( 'Host listsItems begin name='+name )
  5128. valTab = self.listsItems(-1, self.MAIN_URL+'/search/?q=%s' % url.replace(' ','+'), 'fux-clips')
  5129. return valTab
  5130. if 'fux-clips' == name:
  5131. printDBG( 'Host listsItems begin name='+name )
  5132. COOKIEFILE = os_path.join(GetCookieDir(), 'fux.cookie')
  5133. try: data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': False, 'load_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  5134. except:
  5135. printDBG( 'Host error url: '+url )
  5136. return valTab
  5137. #printDBG( 'Host listsItems data: '+data )
  5138. catUrl = self.currList[Index].possibleTypesOfSearch
  5139. next_page = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  5140. data = self.cm.ph.getSearchGroups(data, '''window.INITIALSTATE = ['"]([^"^']+?)['"]''', 1, True)[0]
  5141. data = urllib.unquote(base64.b64decode(data))
  5142. printDBG( 'Host listsItems data: '+data )
  5143. try:
  5144. result = byteify(simplejson.loads(data))
  5145. if result["page"]["embedded"].has_key('videos'):
  5146. node = result["page"]["embedded"]
  5147. else:
  5148. node = result["page"]
  5149. for item in node["videos"]["_embedded"]["items"]:
  5150. phUrl = self.MAIN_URL + "/api/videos/" + str(item["uuid"]) + "?ssr=false&slug=" + str(item["slug"]) + "&orientation="
  5151. phTitle = str(item["title"])
  5152. m, s = divmod(item['durationInSeconds'], 60)
  5153. phTime = "%02d:%02d" % (m, s)
  5154. phImage = str(item["thumbnailsList"][0])
  5155. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  5156. except Exception:
  5157. printExc()
  5158. if next_page:
  5159. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  5160. return valTab
  5161. if 'pornerbros' == name:
  5162. printDBG( 'Host listsItems begin name='+name )
  5163. self.MAIN_URL = 'https://www.pornerbros.com'
  5164. url = url + '/tags'
  5165. COOKIEFILE = os_path.join(GetCookieDir(), 'pornerbros.cookie')
  5166. try: data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  5167. except Exception as e:
  5168. printExc()
  5169. msg = _("Last error:\n%s" % str(e))
  5170. GetIPTVNotify().push('%s' % msg, 'error', 20)
  5171. printDBG( 'Host error url: '+url )
  5172. return valTab
  5173. #printDBG( 'Host listsItems data: '+data )
  5174. data = self.cm.ph.getSearchGroups(data, '''window.INITIALSTATE = ['"]([^"^']+?)['"]''', 1, True)[0]
  5175. data = urllib.unquote(base64.b64decode(data))
  5176. result = byteify(simplejson.loads(data))
  5177. for item in result["page"]["embedded"]["topTags"]:
  5178. phUrl = self.MAIN_URL + "/tags/" + str(item["slug"])
  5179. phTitle = str(item["name"]).title()
  5180. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'pornerbros-clips', '', None))
  5181. valTab.sort(key=lambda poz: poz.name)
  5182. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=rating&time=month'], 'pornerbros-clips', '',self.MAIN_URL))
  5183. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=views&time=month'], 'pornerbros-clips', '',self.MAIN_URL))
  5184. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?sort=date'], 'pornerbros-clips', '',self.MAIN_URL))
  5185. self.SEARCH_proc='pornerbros-search'
  5186. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5187. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5188. return valTab
  5189. if 'pornerbros-search' == name:
  5190. printDBG( 'Host listsItems begin name='+name )
  5191. valTab = self.listsItems(-1, self.MAIN_URL+'/search/?q=%s' % url.replace(' ','+'), 'pornerbros-clips')
  5192. return valTab
  5193. if 'pornerbros-clips' == name:
  5194. printDBG( 'Host listsItems begin name='+name )
  5195. COOKIEFILE = os_path.join(GetCookieDir(), 'pornerbros.cookie')
  5196. try: data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': False, 'load_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  5197. except:
  5198. printDBG( 'Host error url: '+url )
  5199. return valTab
  5200. #printDBG( 'Host listsItems data: '+data )
  5201. catUrl = self.currList[Index].possibleTypesOfSearch
  5202. next_page = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  5203. data = self.cm.ph.getSearchGroups(data, '''window.INITIALSTATE = ['"]([^"^']+?)['"]''', 1, True)[0]
  5204. data = urllib.unquote(base64.b64decode(data))
  5205. printDBG( 'Host listsItems data: '+data )
  5206. try:
  5207. result = byteify(simplejson.loads(data))
  5208. if result["page"]["embedded"].has_key('videos'):
  5209. node = result["page"]["embedded"]
  5210. else:
  5211. node = result["page"]
  5212. for item in node["videos"]["_embedded"]["items"]:
  5213. phUrl = self.MAIN_URL + "/api/videos/" + str(item["uuid"]) + "?ssr=false&slug=" + str(item["slug"]) + "&orientation="
  5214. phTitle = str(item["title"])
  5215. m, s = divmod(item['durationInSeconds'], 60)
  5216. phTime = "%02d:%02d" % (m, s)
  5217. phImage = str(item["thumbnailsList"][0])
  5218. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  5219. except Exception:
  5220. printExc()
  5221. if next_page:
  5222. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  5223. return valTab
  5224. if 'MYDIRTYHOBBY' == name:
  5225. printDBG( 'Host listsItems begin name='+name )
  5226. self.MAIN_URL = 'https://www.mydirtyhobby.to'
  5227. COOKIEFILE = os_path.join(GetCookieDir(), 'mydirtyhobby.cookie')
  5228. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5229. sts, data = self._getPage(url, self.defaultParams)
  5230. if not sts: return
  5231. printDBG( 'Host listsItems data: '+str(data) )
  5232. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="well well-sm', 'div class="clearfix"')
  5233. for item in data:
  5234. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5235. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5236. phImage = self.cm.ph.getSearchGroups(item, '''<img src=['"]([^"^']+?)['"]''', 1, True)[0]
  5237. phTime = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].strip()
  5238. if phTime=='': phTime = self.cm.ph.getSearchGroups(item, '''>HD </span>([^>]+?)<''', 1, True)[0]
  5239. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5240. if phUrl.startswith('/'): phUrl = 'https://www.mydirtyhobby.to' + phUrl
  5241. if phTitle:
  5242. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  5243. valTab.insert(0,CDisplayListItem("--- Pornstars ---","Pornstars", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/pornstars'], 'MYDIRTYHOBBY-pornstars', '',self.MAIN_URL))
  5244. valTab.insert(0,CDisplayListItem("--- Videos ---","Videos", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos'], 'MYDIRTYHOBBY-clips', '',self.MAIN_URL))
  5245. self.SEARCH_proc='MYDIRTYHOBBY-search'
  5246. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5247. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5248. return valTab
  5249. if 'MYDIRTYHOBBY-search' == name:
  5250. printDBG( 'Host listsItems begin name='+name )
  5251. valTab = self.listsItems(-1, 'https://www.mydirtyhobby.to/search/videos?search_query=%s' % url.replace(' ','+'), 'MYDIRTYHOBBY-clips')
  5252. return valTab
  5253. if 'MYDIRTYHOBBY-clips' == name:
  5254. printDBG( 'Host listsItems begin name='+name )
  5255. COOKIEFILE = os_path.join(GetCookieDir(), 'mydirtyhobby.cookie')
  5256. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5257. sts, data = self._getPage(url, self.defaultParams)
  5258. if not sts: return
  5259. printDBG( 'Host listsItems data: '+str(data) )
  5260. catUrl = self.currList[Index].possibleTypesOfSearch
  5261. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', '&raquo;', False)[1]
  5262. next_page = re.compile('href="(.*?)"').findall(next_page)
  5263. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="well well-sm', 'div class="clearfix"')
  5264. for item in data:
  5265. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5266. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5267. phImage = self.cm.ph.getSearchGroups(item, '''<img src=['"]([^"^']+?)['"]''', 1, True)[0]
  5268. phTime = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].strip()
  5269. if phTime=='': phTime = self.cm.ph.getSearchGroups(item, '''>HD </span>([^>]+?)<''', 1, True)[0]
  5270. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5271. if phUrl.startswith('/'): phUrl = 'https://www.mydirtyhobby.to' + phUrl
  5272. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  5273. if next_page:
  5274. next_page = next_page[-1]
  5275. if next_page.startswith('/'): next_page = 'https://www.mydirtyhobby.to' + next_page
  5276. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  5277. return valTab
  5278. if 'MYDIRTYHOBBY-pornstars' == name:
  5279. printDBG( 'Host listsItems begin name='+name )
  5280. COOKIEFILE = os_path.join(GetCookieDir(), 'mydirtyhobby.cookie')
  5281. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5282. sts, data = self._getPage(url, self.defaultParams)
  5283. if not sts: return
  5284. printDBG( 'Host listsItems data: '+str(data) )
  5285. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', '&raquo;', False)[1]
  5286. next_page = re.compile('href="(.*?)"').findall(next_page)
  5287. data = self.cm.ph.getDataBeetwenMarkers(data, 'Neuste</a>', 'footer', False)[1]
  5288. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'class="well well-sm', 'div class="clearfix"')
  5289. for item in data:
  5290. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5291. phTitle = phUrl.split('/')[-1]
  5292. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5293. phTime = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].strip()
  5294. if phTime=='': phTime = self.cm.ph.getSearchGroups(item, '''>HD </span>([^>]+?)<''', 1, True)[0]
  5295. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5296. if phUrl.startswith('/'): phUrl = 'https://www.mydirtyhobby.to' + phUrl
  5297. if phImage.startswith('/'): phImage = 'https://www.mydirtyhobby.to' + phImage
  5298. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'MYDIRTYHOBBY-clips', phImage, phImage))
  5299. if next_page:
  5300. next_page = next_page[-1]
  5301. if next_page.startswith('/'): next_page = 'https://www.mydirtyhobby.to' + next_page
  5302. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  5303. return valTab
  5304. if 'xxxstreams' == name:
  5305. printDBG( 'Host listsItems begin name='+name )
  5306. self.MAIN_URL = 'http://www.xxxstreams.org'
  5307. COOKIEFILE = os_path.join(GetCookieDir(), 'xxxstreams.cookie')
  5308. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5309. sts, data = self.getPage(url, 'xxxstreams.cookie', 'xxxstreams.org', self.defaultParams)
  5310. if not sts: return ''
  5311. printDBG( 'Host listsItems data: '+data )
  5312. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li id="menu-item', '</li>')
  5313. for item in data:
  5314. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5315. phTitle = self._cleanHtmlStr(item)
  5316. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  5317. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5318. if not 'xxxstreams' in phUrl: phTitle=''
  5319. if 'Siterips' in phTitle: phTitle=''
  5320. if phTitle:
  5321. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'xxxstreams-clips', '', None))
  5322. valTab.sort(key=lambda poz: poz.name)
  5323. self.SEARCH_proc='xxxstreams-search'
  5324. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5325. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5326. return valTab
  5327. if 'xxxstreams-search' == name:
  5328. printDBG( 'Host listsItems begin name='+name )
  5329. valTab = self.listsItems(-1, 'http://xxxstreams.org/?s=%s' % url.replace(' ','+'), 'xxxstreams-clips')
  5330. return valTab
  5331. if 'xxxstreams-clips' == name:
  5332. printDBG( 'Host listsItems begin name='+name )
  5333. COOKIEFILE = os_path.join(GetCookieDir(), 'xxxstreams.cookie')
  5334. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5335. sts, data = self.getPage(url, 'xxxstreams.cookie', 'xxxstreams.org', self.defaultParams)
  5336. if not sts: return ''
  5337. printDBG( 'Host listsItems data: '+data )
  5338. cookieHeader = self.cm.getCookieHeader(COOKIEFILE)
  5339. next_page = self.cm.ph.getSearchGroups(data, '''rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  5340. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  5341. for item in data:
  5342. phImage = self.cm.ph.getSearchGroups(item, '''<img\ssrc=['"]([^"^']+?)['"]''', 1, True)[0]
  5343. item = self.cm.ph.getDataBeetwenMarkers(item, '<h1 class="entry-title">', '</h1>', False)[1]
  5344. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5345. phTitle = self._cleanHtmlStr(item)
  5346. phImage = strwithmeta(phImage, {'Referer':self.MAIN_URL, 'Cookie':cookieHeader})
  5347. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5348. phUrl = strwithmeta(phUrl, {'Referer':self.MAIN_URL})
  5349. if not 'UBIQFILE' in phTitle.upper():
  5350. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'xxxstreams-serwer', phImage, phTitle))
  5351. if next_page:
  5352. if next_page.startswith('/'): next_page = 'http://xxxstreams.org' + next_page
  5353. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  5354. return valTab
  5355. if 'xxxstreams-serwer' == name:
  5356. printDBG( 'Host listsItems begin name='+name )
  5357. COOKIEFILE = os_path.join(GetCookieDir(), 'xxxstreams.cookie')
  5358. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5359. sts, data = self.getPage(url, 'xxxstreams.cookie', 'xxxstreams.org', self.defaultParams)
  5360. if not sts: return ''
  5361. printDBG( 'Host listsItems data: '+data )
  5362. catUrl = self.currList[Index].possibleTypesOfSearch
  5363. phImage = self.cm.ph.getSearchGroups(data, '''"og:image" content=['"]([^"^']+?)['"]''', 1, True)[0]
  5364. phTitle = self.cm.ph.getSearchGroups(data, '''title" content=['"]([^"^']+?)['"]''', 1, True)[0]
  5365. phTime = self.cm.ph.getSearchGroups(data, '''description" content=['"]([^"^']+?)['"|]''', 1, True)[0].strip()
  5366. if len(phTime)>8: phTime=phTime.split(' ')[-1]
  5367. data = self.cm.ph.getDataBeetwenMarkers(data, '<span id=', '</div>', False)[1]
  5368. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data, '<p>', '</p>')
  5369. for item in data2:
  5370. if '|' in item:
  5371. phTime = item.split('|')[0].replace('<p>','')
  5372. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  5373. for item in data:
  5374. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5375. phTitle = self._cleanHtmlStr(item)
  5376. if 'HITFILE' in phTitle.upper(): continue
  5377. if 'SHARE-ONLINE' in phTitle.upper(): continue
  5378. if 'UBIQFILE' in phTitle.upper(): continue
  5379. if 'RAPIDGATOR' in phTitle.upper(): continue
  5380. if 'OPENLOAD' in phTitle.upper(): continue
  5381. if 'SEVEREPORN' in phTitle.upper(): continue
  5382. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5383. if phImage.startswith('/'): phImage = 'http:' + phImage
  5384. if 'clipwatching.com' in phUrl:
  5385. if 'embed' not in phUrl:
  5386. video_id = self.cm.ph.getSearchGroups(phUrl, 'clipwatching.com/([A-Za-z0-9]{12})[/.-]')[0]
  5387. phUrl = 'http://clipwatching.com/embed-{0}.html'.format(video_id)
  5388. if phTitle and catUrl:
  5389. phUrl = urlparser.decorateUrl(phUrl, {'Referer': self.MAIN_URL})
  5390. valTab.append(CDisplayListItem(decodeHtml(catUrl),'['+str(phTime.strip())+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  5391. return valTab
  5392. if '123PANDAMOVIE' == name:
  5393. printDBG( 'Host listsItems begin name='+name )
  5394. self.MAIN_URL = 'https://pandamovie.info'
  5395. COOKIEFILE = os_path.join(GetCookieDir(), '123PANDAMOVIE.cookie')
  5396. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5397. sts, data = self.getPage(url, '123PANDAMOVIE.cookie', '123pandamovie.me', self.defaultParams)
  5398. if not sts: return ''
  5399. printDBG( 'Host listsItems data: '+data )
  5400. data = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="genres scrolling">', '</ul>', False)[1]
  5401. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li', '</li>')
  5402. for item in data:
  5403. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5404. phTitle = self._cleanHtmlStr(item)
  5405. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5406. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5407. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5408. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'123PANDAMOVIE-clips', '', None))
  5409. valTab.sort(key=lambda poz: poz.name)
  5410. #valTab.insert(0,CDisplayListItem("--- Pornstars ---","Pornstars", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/pornstars'], '123PANDAMOVIE-years', '',self.MAIN_URL))
  5411. #valTab.insert(0,CDisplayListItem("--- Studios ---","Studios", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], '123PANDAMOVIE-years', '', 'studios'))
  5412. valTab.insert(0,CDisplayListItem("--- Years ---","Years", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], '123PANDAMOVIE-years', '',self.MAIN_URL))
  5413. valTab.insert(0,CDisplayListItem("--- Movies ---","Movies", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/movies'], '123PANDAMOVIE-clips', '',self.MAIN_URL))
  5414. self.SEARCH_proc='123PANDAMOVIE-search'
  5415. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5416. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5417. return valTab
  5418. if '123PANDAMOVIE-search' == name:
  5419. printDBG( 'Host listsItems begin name='+name )
  5420. valTab = self.listsItems(-1, self.MAIN_URL+'/?s=%s' % url.replace(' ','+'), '123PANDAMOVIE-clips')
  5421. return valTab
  5422. if '123PANDAMOVIE-clips' == name:
  5423. printDBG( 'Host listsItems begin name='+name )
  5424. COOKIEFILE = os_path.join(GetCookieDir(), '123PANDAMOVIE.cookie')
  5425. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': False, 'cookiefile': COOKIEFILE}
  5426. sts, data = self.getPage(url, '123PANDAMOVIE.cookie', '123pandamovie.me', self.defaultParams)
  5427. if not sts: return ''
  5428. #printDBG( 'Host listsItems data: '+data )
  5429. catUrl = self.currList[Index].possibleTypesOfSearch
  5430. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'arrow_pag', 'resppages', False)[1]
  5431. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  5432. for item in data:
  5433. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5434. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5435. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5436. phTime = self.cm.ph.getSearchGroups(item, '''([\d]?\d\d:\d\d)''', 1, True)[0]
  5437. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5438. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5439. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'123PANDAMOVIE-serwer', phImage, None))
  5440. if next_page:
  5441. #printDBG( 'Host listsItems next_page: '+next_page )
  5442. next_page = re.compile('href=[\"|\'](.*?)[\"|\']').findall(next_page)[-1]
  5443. #printDBG( 'Host listsItems next_page one: '+next_page )
  5444. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  5445. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  5446. return valTab
  5447. if '123PANDAMOVIE-serwer' == name:
  5448. printDBG( 'Host listsItems begin name='+name )
  5449. COOKIEFILE = os_path.join(GetCookieDir(), '123PANDAMOVIE.cookie')
  5450. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5451. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5452. sts, data = self._getPage(url, self.defaultParams)
  5453. if not sts: return ''
  5454. #printDBG( 'Host listsItems data: '+data )
  5455. phImage = self.cm.ph.getSearchGroups(data, '''"og:image" content=['"]([^"^']+?)['"]''', 1, True)[0]
  5456. phTime = '' #self.cm.ph.getSearchGroups(data, '''description" content=['"]([^"^']+?)['"|]''', 1, True)[0].strip()
  5457. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="hosts', '</li>')
  5458. for item in data:
  5459. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5460. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  5461. if not phTitle: phTitle = self._cleanHtmlStr(item)
  5462. if 'RapidGator' in phTitle: phTitle=''
  5463. if 'Share-online' in phTitle: phTitle=''
  5464. if 'Ubiqfile' in phTitle: phTitle=''
  5465. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5466. if phImage.startswith('/'): phImage = 'http:' + phImage
  5467. if '/goto/' in phUrl:
  5468. self.defaultParams['header']['Referer'] = url
  5469. sts, data = self._getPage(phUrl, self.defaultParams)
  5470. if not sts: return
  5471. printDBG( 'Host listsItems data2: '+str(data) )
  5472. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  5473. printDBG( 'Host listsItems phUrl: '+str(phUrl) )
  5474. if '/goto/' in phUrl:
  5475. sts, data = self._getPage(phUrl, self.defaultParams)
  5476. if not sts: return
  5477. printDBG( 'Host listsItems data2: '+str(data) )
  5478. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  5479. if '/goto/' in phUrl:
  5480. sts, data = self._getPage(phUrl, self.defaultParams)
  5481. if not sts: return
  5482. printDBG( 'Host listsItems data2: '+str(data) )
  5483. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  5484. if phTitle:
  5485. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  5486. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  5487. return valTab
  5488. if '123PANDAMOVIE-years' == name:
  5489. printDBG( 'Host listsItems begin name='+name )
  5490. COOKIEFILE = os_path.join(GetCookieDir(), '123PANDAMOVIE.cookie')
  5491. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': False, 'cookiefile': COOKIEFILE}
  5492. sts, data = self.getPage(url, '123PANDAMOVIE.cookie', '123pandamovie.me', self.defaultParams)
  5493. if not sts: return ''
  5494. #printDBG( 'Host listsItems data: '+data )
  5495. catUrl = self.currList[Index].possibleTypesOfSearch
  5496. #printDBG( 'Host catUrl: '+str(catUrl) )
  5497. if catUrl == 'studios':
  5498. data = self.cm.ph.getDataBeetwenMarkers(data, '>Studios<', '</ul>', False)[1]
  5499. else:
  5500. data = self.cm.ph.getDataBeetwenMarkers(data, 'Release Year', '</ul>', False)[1]
  5501. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li', '</li>')
  5502. for item in data:
  5503. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5504. phTitle = self._cleanHtmlStr(item)
  5505. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5506. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5507. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'123PANDAMOVIE-clips', '', None))
  5508. return valTab
  5509. if 'FULLXXXMOVIES' == name:
  5510. printDBG( 'Host listsItems begin name='+name )
  5511. self.MAIN_URL = 'http://fullxxxmovies.net'
  5512. COOKIEFILE = os_path.join(GetCookieDir(), 'fullxxxmovies.cookie')
  5513. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5514. sts, data = self.getPage(url, 'fullxxxmovies.cookie', 'fullxxxmovies.com', self.defaultParams)
  5515. if not sts: return ''
  5516. printDBG( 'Host listsItems data: '+data )
  5517. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li id="menu-item', '</li>')
  5518. for item in data:
  5519. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5520. phTitle = self._cleanHtmlStr(item)
  5521. phImage = self.cm.ph.getSearchGroups(item, '''rel=['"]([^"^']+?)['"]''', 1, True)[0]
  5522. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  5523. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5524. if phUrl.endswith('/'): phUrl = phUrl[ :(len(phUrl)-1)]
  5525. if '/tag/' in phUrl:
  5526. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'FULLXXXMOVIES-clips', '', None))
  5527. valTab.sort(key=lambda poz: poz.name)
  5528. valTab.insert(0,CDisplayListItem("--- NEW ---","NEW", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'FULLXXXMOVIES-clips', '', None))
  5529. self.SEARCH_proc='FULLXXXMOVIES-search'
  5530. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5531. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5532. return valTab
  5533. if 'FULLXXXMOVIES-search' == name:
  5534. printDBG( 'Host listsItems begin name='+name )
  5535. valTab = self.listsItems(-1, 'http://fullxxxmovies.net/?s=%s' % url.replace(' ','+'), 'FULLXXXMOVIES-clips')
  5536. return valTab
  5537. if 'FULLXXXMOVIES-clips' == name:
  5538. printDBG( 'Host listsItems begin name='+name )
  5539. COOKIEFILE = os_path.join(GetCookieDir(), 'fullxxxmovies.cookie')
  5540. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5541. sts, data = self.getPage(url, 'fullxxxmovies.cookie', 'fullxxxmovies.com', self.defaultParams)
  5542. if not sts: return ''
  5543. printDBG( 'Host listsItems data: '+data )
  5544. catUrl = self.currList[Index].possibleTypesOfSearch
  5545. next_page = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0]
  5546. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  5547. for item in data:
  5548. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5549. phTitle = self.cm.ph.getSearchGroups(item, '''reader-text">([^>]+?)<''', 1, True)[0].strip()
  5550. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5551. phTime = self.cm.ph.getSearchGroups(item, '''datetime=['"]([^"^']+?)['"]''', 1, True)[0].replace('T','').replace('+00:00','').replace('+01:00','')
  5552. if phImage.startswith('//'): phImage = 'http:' + phImage
  5553. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  5554. if not 'Ubiqfile' in phTitle:
  5555. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle)+'\n'+'Added: '+phTime,CDisplayListItem.TYPE_CATEGORY, [phUrl],'FULLXXXMOVIES-serwer', phImage, phTitle))
  5556. if next_page:
  5557. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  5558. return valTab
  5559. if 'FULLXXXMOVIES-serwer' == name:
  5560. printDBG( 'Host listsItems begin name='+name )
  5561. COOKIEFILE = os_path.join(GetCookieDir(), 'fullxxxmovies.cookie')
  5562. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5563. sts, data = self.getPage(url, 'fullxxxmovies.cookie', 'fullxxxmovies.com', self.defaultParams)
  5564. if not sts: return ''
  5565. printDBG( 'Host listsItems data: '+data )
  5566. catUrl = self.currList[Index].possibleTypesOfSearch
  5567. phImage = self.cm.ph.getSearchGroups(data, '''"og:image" content=['"]([^"^']+?)['"]''', 1, True)[0]
  5568. data = self.cm.ph.getDataBeetwenMarkers(data, '<div class="entry-content">', '</div>', False)[1]
  5569. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  5570. for item in data:
  5571. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5572. phTitle = self._cleanHtmlStr(item)
  5573. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  5574. if phUrl.startswith('https://gounlimited.to'):
  5575. if not 'embed' in phUrl:
  5576. phUrl = 'https://gounlimited.to' + '/embed-'+ phUrl.split('/')[3] +'.html'
  5577. if 'Streaming' in item:
  5578. valTab.append(CDisplayListItem(decodeHtml(catUrl)+' > '+phUrl.split('/')[2],phUrl,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  5579. return valTab
  5580. if 'PORNREWIND' == name:
  5581. printDBG( 'Host listsItems begin name='+name )
  5582. self.MAIN_URL = 'https://www.pornrewind.com'
  5583. self.format4k = config.plugins.iptvplayer.xxx4k.value
  5584. COOKIEFILE = os_path.join(GetCookieDir(), 'pornrewind.cookie')
  5585. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5586. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5587. sts, data = self.get_Page(url)
  5588. if not sts: return valTab
  5589. printDBG( 'Host listsItems data: '+data )
  5590. self.page = 0
  5591. cats = ['3d','amateur','asmr','arab','anal','webcam','voyeur','teen','romantic', 'beards', 'big tits', 'big butt', 'big dick',
  5592. 'bisexual', 'blonde', 'blowjob', 'bondage', 'bukkake', 'casting', 'college', 'compilation', 'cosplay', 'couples', 'cuckold',
  5593. 'cumshots','dp', 'dildos toys', 'ebony', 'european', 'facial'
  5594. ]
  5595. for item in cats:
  5596. phUrl = 'https://www.pornrewind.com/categories/%s/' % item.replace(' ','-')
  5597. valTab.append(CDisplayListItem(item.upper(),item,CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORNREWIND-clips', '', None))
  5598. valTab.sort(key=lambda poz: poz.name)
  5599. self.SEARCH_proc='PORNREWIND-search'
  5600. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5601. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5602. return valTab
  5603. if 'PORNREWIND-search' == name:
  5604. printDBG( 'Host listsItems begin name='+name )
  5605. valTab = self.listsItems(-1, 'https://www.pornrewind.com/search/%s/' % url.replace(' ','+'), 'PORNREWIND-clips')
  5606. return valTab
  5607. if 'PORNREWIND-clips' == name:
  5608. printDBG( 'Host listsItems begin name='+name )
  5609. catUrl = self.currList[Index].possibleTypesOfSearch
  5610. if catUrl == None:
  5611. self.page = 1
  5612. else:
  5613. self.page += 1
  5614. if not '/search/' in url:
  5615. url = url + '?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=%s' % self.page
  5616. else:
  5617. if self.page>1:
  5618. url = url + '?mode=async&function=get_block&block_id=list_videos_videos&q=dildo&category_ids=&sort_by=post_date&from_videos=%s&from_albums=%s' % (self.page, self.page)
  5619. COOKIEFILE = os_path.join(GetCookieDir(), 'pornrewind.cookie')
  5620. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5621. sts, data = self.get_Page(url)
  5622. if not sts: return valTab
  5623. printDBG( 'Host listsItems data: '+data )
  5624. next = self.cm.ph.getDataBeetwenMarkers(data, '<li class="direction"><a', '</li>', False)[1]
  5625. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="th', '</div>')
  5626. for item in data:
  5627. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5628. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  5629. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  5630. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5631. Time = self.cm.ph.getSearchGroups(item, '''thumb-time">\s*<span>([^>]+?)<''', 1, True)[0].strip()
  5632. Added = self.cm.ph.getSearchGroups(item, '''thumb-added">\s*<span>([^>]+?)<''', 1, True)[0].strip()
  5633. if phImage.startswith('//'): phImage = 'https:' + phImage
  5634. try:
  5635. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://www.pornrewind.com'})
  5636. except: pass
  5637. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle)+'\n'+'Time: ['+Time+']'+'\n'+'Added: ['+Added+']',CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  5638. if next:
  5639. next = self.cm.ph.getSearchGroups(next, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5640. if next.startswith('/'): next = 'https://www.pornrewind.com' + next
  5641. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [url], name, '', 'next'))
  5642. return valTab
  5643. if 'BALKANJIZZ' == name:
  5644. printDBG( 'Host listsItems begin name='+name )
  5645. self.MAIN_URL = 'https://www.balkanjizz.com'
  5646. self.format4k = config.plugins.iptvplayer.xxx4k.value
  5647. COOKIEFILE = os_path.join(GetCookieDir(), 'balkanjizz.cookie')
  5648. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5649. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5650. sts, data = self.get_Page(url)
  5651. if not sts: return valTab
  5652. printDBG( 'Host listsItems data: '+data )
  5653. self.page = 0
  5654. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="col-sm', '</div> </a> </div>')
  5655. for item in data:
  5656. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  5657. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5658. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5659. if phUrl.startswith('/'): phUrl = 'https://www.balkanjizz.com' + phUrl
  5660. if phImage.startswith('/'): phImage = 'https://www.balkanjizz.com' + phImage
  5661. if phImage.startswith('//'): phImage = 'https:' + phImage
  5662. try:
  5663. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://www.balkanjizz.com'})
  5664. except: pass
  5665. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'BALKANJIZZ-clips', phImage, None))
  5666. valTab.sort(key=lambda poz: poz.name)
  5667. self.SEARCH_proc='BALKANJIZZ-search'
  5668. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5669. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5670. return valTab
  5671. if 'BALKANJIZZ-search' == name:
  5672. printDBG( 'Host listsItems begin name='+name )
  5673. valTab = self.listsItems(-1, 'https://www.balkanjizz.com/search/videos?search_query=%s' % url.replace(' ','+'), 'BALKANJIZZ-clips')
  5674. return valTab
  5675. if 'BALKANJIZZ-clips' == name:
  5676. printDBG( 'Host listsItems begin name='+name )
  5677. catUrl = self.currList[Index].possibleTypesOfSearch
  5678. COOKIEFILE = os_path.join(GetCookieDir(), 'balkanjizz.cookie')
  5679. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5680. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5681. sts, data = self.get_Page(url)
  5682. if not sts: return valTab
  5683. printDBG( 'Host listsItems data: '+data )
  5684. next = self.cm.ph.getSearchGroups(data, '''</a></li><li><a href=['"]([^"^']+?)['"]''', 1, True)[0]
  5685. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="col-sm', '</div> </div> </div>')
  5686. for item in data:
  5687. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5688. phImage = self.cm.ph.getSearchGroups(item, '''img src=['"]([^"^']+?)['"]''', 1, True)[0]
  5689. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  5690. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5691. Time = self.cm.ph.getSearchGroups(item, '''duration-bar pull-right">([^>]+?)<''', 1, True)[0].strip()
  5692. Views = self.cm.ph.getSearchGroups(item, '''views-bar pull-left">([^>]+?)<''', 1, True)[0].strip()
  5693. if phUrl.startswith('/'): phUrl = 'https://www.balkanjizz.com' + phUrl
  5694. if phImage.startswith('//'): phImage = 'https:' + phImage
  5695. try:
  5696. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://www.balkanjizz.com'})
  5697. except: pass
  5698. if phTitle:
  5699. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle)+'\n'+'Time: ['+Time+']'+'\n'+'Views: ['+Views+']',CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  5700. if next:
  5701. if next.startswith('/'): next = 'https://www.balkanjizz.com' + next
  5702. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  5703. return valTab
  5704. if 'PORNORUSSIA' == name:
  5705. printDBG( 'Host listsItems begin name='+name )
  5706. self.MAIN_URL = 'https://pornorussia.tv'
  5707. self.format4k = config.plugins.iptvplayer.xxx4k.value
  5708. COOKIEFILE = os_path.join(GetCookieDir(), 'pornorussia.cookie')
  5709. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5710. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5711. sts, data = self.get_Page(url)
  5712. if not sts: return valTab
  5713. printDBG( 'Host listsItems data: '+data )
  5714. self.page = 0
  5715. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class="th', '</a>')
  5716. for item in data:
  5717. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5718. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5719. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5720. if phUrl.startswith('/'): phUrl = 'https://pornorussia.tv' + phUrl
  5721. if phImage.startswith('/'): phImage = 'https://pornorussia.tv' + phImage
  5722. if phImage.startswith('//'): phImage = 'https:' + phImage
  5723. try:
  5724. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://pornorussia.tv'})
  5725. except: pass
  5726. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'PORNORUSSIA-clips', phImage, None))
  5727. valTab.sort(key=lambda poz: poz.name)
  5728. self.SEARCH_proc='PORNORUSSIA-search'
  5729. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5730. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5731. return valTab
  5732. if 'PORNORUSSIA-search' == name:
  5733. printDBG( 'Host listsItems begin name='+name )
  5734. valTab = self.listsItems(-1, 'https://pornorussia.tv/s.php?poisk=%s' % url.replace(' ','+'), 'PORNORUSSIA-clips')
  5735. return valTab
  5736. if 'PORNORUSSIA-clips' == name:
  5737. printDBG( 'Host listsItems begin name='+name )
  5738. catUrl = self.currList[Index].possibleTypesOfSearch
  5739. COOKIEFILE = os_path.join(GetCookieDir(), 'pornorussia.cookie')
  5740. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5741. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5742. sts, data = self.get_Page(url)
  5743. if not sts: return valTab
  5744. printDBG( 'Host listsItems data: '+data )
  5745. next = self.cm.ph.getSearchGroups(data, '''class="more" href=['"]([^"^']+?)['"]''', 1, True)[0]
  5746. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class="th', '</a>')
  5747. for item in data:
  5748. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5749. phImage = self.cm.ph.getSearchGroups(item, '''img src=['"]([^"^']+?)['"]''', 1, True)[0]
  5750. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  5751. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  5752. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5753. Time = self.cm.ph.getSearchGroups(item, '''th-duration">([^>]+?)<''', 1, True)[0].strip()
  5754. if phUrl.startswith('/'): phUrl = 'https://pornorussia.tv' + phUrl
  5755. if phImage.startswith('//'): phImage = 'https:' + phImage
  5756. try:
  5757. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://pornorussia.tv'})
  5758. except: pass
  5759. if phTitle:
  5760. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  5761. if next:
  5762. if next.startswith('/'): next = 'https://pornorussia.tv' + next
  5763. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  5764. return valTab
  5765. if 'LETMEJERK' == name:
  5766. printDBG( 'Host listsItems begin name='+name )
  5767. self.MAIN_URL = 'https://www.letmejerk.com'
  5768. self.format4k = config.plugins.iptvplayer.xxx4k.value
  5769. COOKIEFILE = os_path.join(GetCookieDir(), 'letmejerk.cookie')
  5770. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5771. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5772. self.defaultParams['header']['Referer'] = url
  5773. self.defaultParams['header']['Origin'] = self.MAIN_URL
  5774. #sts, data = self.get_Page(url)
  5775. sts, data = self.getPage(url, 'letmejerk.cookie', 'letmejerk.com', self.defaultParams)
  5776. if not sts: return valTab
  5777. printDBG( 'Host listsItems data: '+data )
  5778. self.page = 0
  5779. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  5780. for item in data:
  5781. phTitle = self._cleanHtmlStr(item)
  5782. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5783. clas = self.cm.ph.getSearchGroups(item, '''class=['"]([^"^']+?)['"]''', 1, True)[0]
  5784. if phUrl.startswith('/'): phUrl = 'https://www.letmejerk.com' + phUrl
  5785. if clas=='category':
  5786. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'LETMEJERK-clips', '', None))
  5787. valTab.sort(key=lambda poz: poz.name)
  5788. valTab.insert(0,CDisplayListItem("--- TOP ---","TOP", CDisplayListItem.TYPE_CATEGORY,['https://www.letmejerk.com/?sort=top'], 'LETMEJERK-clips', '', None))
  5789. valTab.insert(0,CDisplayListItem("--- LATEST ---","LATEST", CDisplayListItem.TYPE_CATEGORY,['https://www.letmejerk.com/?sort=latest'], 'LETMEJERK-clips', '', None))
  5790. self.SEARCH_proc='LETMEJERK-search'
  5791. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5792. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5793. return valTab
  5794. if 'LETMEJERK-search' == name:
  5795. printDBG( 'Host listsItems begin name='+name )
  5796. valTab = self.listsItems(-1, 'https://www.letmejerk.com/search.php?q=%s' % url.replace(' ','+'), 'LETMEJERK-clips')
  5797. return valTab
  5798. if 'LETMEJERK-clips' == name:
  5799. printDBG( 'Host listsItems begin name='+name )
  5800. for x in range(1, 20):
  5801. COOKIEFILE = os_path.join(GetCookieDir(), 'letmejerk.cookie')
  5802. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5803. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5804. self.defaultParams['header']['Referer'] = url
  5805. self.defaultParams['header']['Origin'] = self.MAIN_URL
  5806. self.defaultParams['header']['User-Agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
  5807. self.defaultParams['cookie_items'] = {'visited':'yes'}
  5808. sts, data = self.getPage(url, 'letmejerk.cookie', 'letmejerk.com', self.defaultParams)
  5809. if not sts: return valTab
  5810. #printDBG( 'Host listsItems data: '+data )
  5811. next = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="paginator">', '</ul>', False)[1]
  5812. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="th-image">', '</div>')
  5813. if not len(data): continue
  5814. for item in data:
  5815. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5816. phImage = self.cm.ph.getSearchGroups(item, '''img src=['"]([^"^']+?)['"]''', 1, True)[0]
  5817. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  5818. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  5819. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5820. Time = self.cm.ph.getSearchGroups(item, '''clock"></i>([^>]+?)<''', 1, True)[0].strip()
  5821. if phUrl.startswith('/'): phUrl = 'https://www.letmejerk.com' + phUrl
  5822. if phImage.startswith('//'): phImage = 'https:' + phImage
  5823. try:
  5824. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://www.letmejerk.com'})
  5825. except: pass
  5826. if phTitle and not phUrl.endswith('/.html'):
  5827. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  5828. if len(next)>180:
  5829. match = re.compile('href="(.*?)"').findall(next)
  5830. if not match: return valTab
  5831. next = match[-1].replace('&sort=','')
  5832. url1 = url.replace(url.split('/')[-1],'')
  5833. next = url1 + next
  5834. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  5835. if len(data): break
  5836. return valTab
  5837. if 'GOTPORN' == name:
  5838. printDBG( 'Host listsItems begin name='+name )
  5839. self.MAIN_URL = 'https://www.gotporn.com'
  5840. self.format4k = config.plugins.iptvplayer.xxx4k.value
  5841. COOKIEFILE = os_path.join(GetCookieDir(), 'gotporn.cookie')
  5842. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5843. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5844. sts, data = self.get_Page(url)
  5845. if not sts: return valTab
  5846. printDBG( 'Host listsItems data: '+data )
  5847. data2 = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="list categories-list', '</ul>', False)[1]
  5848. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<li>', '</li>')
  5849. for item in data2:
  5850. phTitle = self._cleanHtmlStr(item)
  5851. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5852. if phUrl.startswith('/'): phUrl = 'https://www.gotporn.com' + phUrl
  5853. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'GOTPORN-clips', '', None))
  5854. data2 = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="list tags-list', '</ul>', False)[1]
  5855. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<li>', '</li>')
  5856. for item in data2:
  5857. phTitle = self._cleanHtmlStr(item)
  5858. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5859. if phUrl.startswith('/'): phUrl = 'https://www.gotporn.com' + phUrl
  5860. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'GOTPORN-clips', '', None))
  5861. valTab.sort(key=lambda poz: poz.name)
  5862. valTab.insert(0,CDisplayListItem("--- CHANNELS ---","CHANNELS", CDisplayListItem.TYPE_CATEGORY,['https://www.gotporn.com/channels?src=hm'], 'GOTPORN-channels', '', None))
  5863. valTab.insert(0,CDisplayListItem("--- LATEST ---","LATEST", CDisplayListItem.TYPE_CATEGORY,['https://www.gotporn.com'], 'GOTPORN-clips', '', None))
  5864. self.SEARCH_proc='GOTPORN-search'
  5865. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5866. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5867. return valTab
  5868. if 'GOTPORN-search' == name:
  5869. printDBG( 'Host listsItems begin name='+name )
  5870. valTab = self.listsItems(-1, 'https://www.gotporn.com/results?search_query=%s' % url.replace(' ','+'), 'GOTPORN-clips')
  5871. return valTab
  5872. if 'GOTPORN-clips' == name:
  5873. printDBG( 'Host listsItems begin name='+name )
  5874. catUrl = self.currList[Index].possibleTypesOfSearch
  5875. COOKIEFILE = os_path.join(GetCookieDir(), 'gotporn.cookie')
  5876. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5877. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5878. sts, data = self.get_Page(url)
  5879. if not sts: return valTab
  5880. printDBG( 'Host listsItems data: '+data )
  5881. next = self.cm.ph.getSearchGroups(data, '''<link rel='next' href=['"]([^"^']+?)['"]''', 1, True)[0]
  5882. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="video-item', '</li>')
  5883. for item in data:
  5884. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  5885. phImage = self.cm.ph.getSearchGroups(item, '''data-default-src=['"]([^"^']+?)['"]''', 1, True)[0]
  5886. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  5887. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  5888. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5889. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5890. Time = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0].strip()
  5891. if phUrl.startswith('/'): phUrl = 'https://www.gotporn.com' + phUrl
  5892. if phImage.startswith('//'): phImage = 'https:' + phImage
  5893. try:
  5894. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://www.gotporn.com'})
  5895. except: pass
  5896. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  5897. if next:
  5898. if next.startswith('/'): next = 'https://www.gotporn.com' + next
  5899. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  5900. return valTab
  5901. if 'GOTPORN-channels' == name:
  5902. printDBG( 'Host listsItems begin name='+name )
  5903. catUrl = self.currList[Index].possibleTypesOfSearch
  5904. COOKIEFILE = os_path.join(GetCookieDir(), 'gotporn.cookie')
  5905. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5906. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5907. sts, data = self.get_Page(url)
  5908. if not sts: return valTab
  5909. printDBG( 'Host listsItems data: '+data )
  5910. next = self.cm.ph.getSearchGroups(data, '''<link rel='next' href=['"]([^"^']+?)['"]''', 1, True)[0]
  5911. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="channel-card', '</li> </ul>')
  5912. for item in data:
  5913. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5914. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  5915. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5916. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  5917. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  5918. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5919. Time = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0].strip()
  5920. if phUrl.startswith('/'): phUrl = 'https://www.gotporn.com' + phUrl
  5921. if phImage.startswith('//'): phImage = 'https:' + phImage
  5922. try:
  5923. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://www.gotporn.com'})
  5924. except: pass
  5925. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'GOTPORN-clips', phImage, None))
  5926. # valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  5927. if next:
  5928. if next.startswith('/'): next = 'https://www.gotporn.com' + next
  5929. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  5930. return valTab
  5931. if 'ANALDIN' == name:
  5932. printDBG( 'Host listsItems begin name='+name )
  5933. self.MAIN_URL = 'https://www.analdin.com'
  5934. self.format4k = config.plugins.iptvplayer.xxx4k.value
  5935. COOKIEFILE = os_path.join(GetCookieDir(), 'analdin.cookie')
  5936. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5937. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5938. sts, data = self.get_Page(url)
  5939. if not sts: return valTab
  5940. printDBG( 'Host listsItems data: '+data )
  5941. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'class="list-categories', 'footer', False)[1]
  5942. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<a class="item', '</a>')
  5943. for item in data2:
  5944. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  5945. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5946. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5947. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  5948. if phTitle:
  5949. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'ANALDIN-clips', phImage, None))
  5950. valTab.sort(key=lambda poz: poz.name)
  5951. #valTab.insert(0,CDisplayListItem("--- MOST VIEWED ---","MOST VIEWED", CDisplayListItem.TYPE_CATEGORY,['https://www.analdin.com/most-popular/?mode=async&action=js_stats'], 'ANALDIN-clips', '', None))
  5952. #valTab.insert(0,CDisplayListItem("--- TOP RATED ---","TOP RATED", CDisplayListItem.TYPE_CATEGORY,['https://www.analdin.com/top-rated/'], 'ANALDIN-clips', '', None))
  5953. valTab.insert(0,CDisplayListItem("--- LATEST ---","LATEST", CDisplayListItem.TYPE_CATEGORY,['https://www.analdin.com/latest-updates/'], 'ANALDIN-clips', '', None))
  5954. self.SEARCH_proc='ANALDIN-search'
  5955. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  5956. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  5957. return valTab
  5958. if 'ANALDIN-search' == name:
  5959. printDBG( 'Host listsItems begin name='+name )
  5960. valTab = self.listsItems(-1, 'https://www.analdin.com/search/%s/' % url.replace(' ','+'), 'ANALDIN-clips')
  5961. return valTab
  5962. if 'ANALDIN-clips' == name:
  5963. printDBG( 'Host listsItems begin name='+name )
  5964. catUrl = self.currList[Index].possibleTypesOfSearch
  5965. if catUrl == None:
  5966. self.page = 1
  5967. else:
  5968. self.page += 1
  5969. if not '/search/' in url:
  5970. url = url + '?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=%s&_=%s' % (self.page, time_time())
  5971. else:
  5972. if self.page>1:
  5973. url = url + '?mode=async&function=get_block&block_id=list_videos_videos&q=dildo&category_ids=&sort_by=post_date&from_videos=%s&from_albums=%s' % (self.page, self.page)
  5974. if 'latest-updates' in url:
  5975. url = url.replace(url.split('/')[-1],'')
  5976. COOKIEFILE = os_path.join(GetCookieDir(), 'analdin.cookie')
  5977. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  5978. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  5979. sts, data = self.get_Page(url)
  5980. if not sts: return valTab
  5981. printDBG( 'Host listsItems data: '+data )
  5982. next = self.cm.ph.getDataBeetwenMarkers(data, '<li class="next">', 'Next', False)[1]
  5983. next = self.cm.ph.getSearchGroups(data, '''from:([^"^']+?)['"]''', 1, True)[0]
  5984. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="item', '</a>')
  5985. for item in data:
  5986. phTitle = self.cm.ph.getSearchGroups(item, '''class="title">([^>]+?)<''', 1, True)[0].strip()
  5987. phImage = self.cm.ph.getSearchGroups(item, '''thumb=['"]([^"^']+?)['"]''', 1, True)[0]
  5988. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  5989. if not phImage: phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  5990. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  5991. Time = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0].strip()
  5992. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  5993. if phImage.startswith('//'): phImage = 'https:' + phImage
  5994. try:
  5995. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  5996. except: pass
  5997. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  5998. if next:
  5999. #next = url
  6000. if next.startswith('/'): next = self.MAIN_URL + next
  6001. url = url.replace(url.split('/')[-1],'')
  6002. #printDBG( 'Host time data: '+str(time_time()*10)) #.encode('utf-8') )
  6003. valTab.append(CDisplayListItem('Next ', 'Page: '+str(self.page+1), CDisplayListItem.TYPE_CATEGORY, [url], name, '', 'next'))
  6004. return valTab
  6005. if 'NETFLIXPORNO' == name:
  6006. printDBG( 'Host listsItems begin name='+name )
  6007. self.MAIN_URL = 'http://netflixporno.net'
  6008. COOKIEFILE = os_path.join(GetCookieDir(), 'netflixporno.cookie')
  6009. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6010. sts, data = self.getPage(url, 'netflixporno.cookie', 'netflixporno.net', self.defaultParams)
  6011. if not sts: return ''
  6012. printDBG( 'Host listsItems data: '+data )
  6013. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li id="menu-item', '</li>')
  6014. for item in data:
  6015. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6016. phTitle = self._cleanHtmlStr(item)
  6017. phImage = self.cm.ph.getSearchGroups(item, '''rel=['"]([^"^']+?)['"]''', 1, True)[0]
  6018. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  6019. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6020. if phUrl.endswith('/'): phUrl = phUrl[ :(len(phUrl)-1)]
  6021. if '/genre/' in phUrl:
  6022. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'NETFLIXPORNO-clips', '', None))
  6023. valTab.sort(key=lambda poz: poz.name)
  6024. valTab.insert(0,CDisplayListItem("--- NEW ---","NEW", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'NETFLIXPORNO-clips', '', None))
  6025. self.SEARCH_proc='NETFLIXPORNO-search'
  6026. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6027. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6028. return valTab
  6029. if 'NETFLIXPORNO-search' == name:
  6030. printDBG( 'Host listsItems begin name='+name )
  6031. valTab = self.listsItems(-1, 'http://netflixporno.net/?s=%s' % url.replace(' ','+'), 'NETFLIXPORNO-clips')
  6032. return valTab
  6033. if 'NETFLIXPORNO-clips' == name:
  6034. printDBG( 'Host listsItems begin name='+name )
  6035. COOKIEFILE = os_path.join(GetCookieDir(), 'netflixporno.cookie')
  6036. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6037. sts, data = self.getPage(url, 'netflixporno.cookie', 'netflixporno.net', self.defaultParams)
  6038. if not sts: return ''
  6039. printDBG( 'Host listsItems data: '+data )
  6040. catUrl = self.currList[Index].possibleTypesOfSearch
  6041. next_page = self.cm.ph.getSearchGroups(data, '''<link\s*rel=['"]next['"]\s*href=['"]([^"^']+?)['"]''', 1, True)[0]
  6042. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  6043. for item in data:
  6044. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6045. phTitle = self.cm.ph.getSearchGroups(item, '''Title">([^>]+?)<''', 1, True)[0]
  6046. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6047. phTime = self.cm.ph.getSearchGroups(item, '''rel="tag">([^>]+?)<''', 1, True)[0]
  6048. if phImage.startswith('//'): phImage = 'http:' + phImage
  6049. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  6050. if not 'Ubiqfile' in phTitle:
  6051. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle)+'\n'+'Added: '+phTime,CDisplayListItem.TYPE_CATEGORY, [phUrl],'NETFLIXPORNO-serwer', phImage, phTitle))
  6052. if next_page:
  6053. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  6054. return valTab
  6055. if 'NETFLIXPORNO-serwer' == name:
  6056. printDBG( 'Host listsItems begin name='+name )
  6057. COOKIEFILE = os_path.join(GetCookieDir(), 'netflixporno.cookie')
  6058. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6059. sts, data = self.getPage(url, 'netflixporno.cookie', 'netflixporno.net', self.defaultParams)
  6060. if not sts: return ''
  6061. printDBG( 'Host listsItems data: '+data )
  6062. catUrl = self.currList[Index].possibleTypesOfSearch
  6063. phImage = self.cm.ph.getSearchGroups(data, '''"og:image" content=['"]([^"^']+?)['"]''', 1, True)[0]
  6064. #data = self.cm.ph.getDataBeetwenMarkers(data, '<div class="entry-content">', '</div>', False)[1]
  6065. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="hosts', '</li>')
  6066. for item in data:
  6067. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6068. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  6069. if '/goto/' in phUrl:
  6070. self.defaultParams['header']['Referer'] = url
  6071. sts, data = self._getPage(phUrl, self.defaultParams)
  6072. if not sts: return
  6073. printDBG( 'Host listsItems data2: '+str(data) )
  6074. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  6075. printDBG( 'Host listsItems phUrl: '+str(phUrl) )
  6076. if '/goto/' in phUrl:
  6077. sts, data = self._getPage(phUrl, self.defaultParams)
  6078. if not sts: return
  6079. printDBG( 'Host listsItems data2: '+str(data) )
  6080. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  6081. if '/goto/' in phUrl:
  6082. sts, data = self._getPage(phUrl, self.defaultParams)
  6083. if not sts: return
  6084. printDBG( 'Host listsItems data2: '+str(data) )
  6085. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  6086. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  6087. valTab.append(CDisplayListItem(decodeHtml(phTitle),phUrl,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  6088. return valTab
  6089. if 'fapset' == name:
  6090. printDBG( 'Host listsItems begin name='+name )
  6091. self.MAIN_URL = 'https://fapset.com'
  6092. self.format4k = config.plugins.iptvplayer.xxx4k.value
  6093. COOKIEFILE = os_path.join(GetCookieDir(), 'fapset.cookie')
  6094. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6095. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6096. sts, data = self.get_Page(url)
  6097. if not sts: return valTab
  6098. printDBG( 'Host listsItems data: '+data )
  6099. data2 = self.cm.ph.getDataBeetwenMarkers(data, '<nav class="menu-inner" id="menu-inner">', '</nav>', False)[1]
  6100. data2 = self.cm.ph.getAllItemsBeetwenMarkers(data2, '<li>', '</li>')
  6101. for item in data2:
  6102. phTitle = self._cleanHtmlStr(item)
  6103. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6104. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6105. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6106. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'fapset-clips', phImage, None))
  6107. valTab.sort(key=lambda poz: poz.name)
  6108. valTab.insert(0,CDisplayListItem("--- LATEST ---","LATEST", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'fapset-clips', '', None))
  6109. self.SEARCH_proc='fapset-search'
  6110. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6111. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6112. return valTab
  6113. if 'fapset-search' == name:
  6114. printDBG( 'Host listsItems begin name='+name )
  6115. valTab = self.listsItems(-1, 'https://fapset.com/search/%s/' % url.replace(' ','+'), 'fapset-clips')
  6116. return valTab
  6117. if 'fapset-clips' == name:
  6118. printDBG( 'Host listsItems begin name='+name )
  6119. COOKIEFILE = os_path.join(GetCookieDir(), 'fapset.cookie')
  6120. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6121. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6122. sts, data = self.get_Page(url)
  6123. if not sts: return valTab
  6124. printDBG( 'Host listsItems data: '+data )
  6125. next = self.cm.ph.getDataBeetwenMarkers(data, '<span class="navigation">', '</div>', False)[1]
  6126. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="thumb">', '</a></div>')
  6127. for item in data:
  6128. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].strip()
  6129. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6130. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6131. Time = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0].strip()
  6132. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6133. if phImage.startswith('//'): phImage = 'https:' + phImage
  6134. try:
  6135. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  6136. except: pass
  6137. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6138. if next:
  6139. next = self.cm.ph.getSearchGroups(next, '''</span>\s*<a href=['"]([^"^']+?/page/\d+/)['"]''', 1, True)[0]
  6140. if next.startswith('/'): next = self.MAIN_URL + next
  6141. valTab.append(CDisplayListItem('Next ', 'Page: '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6142. return valTab
  6143. if 'daftsex' == name:
  6144. printDBG( 'Host listsItems begin name='+name )
  6145. self.MAIN_URL = 'https://daftsex.com'
  6146. self.format4k = config.plugins.iptvplayer.xxx4k.value
  6147. COOKIEFILE = os_path.join(GetCookieDir(), 'daftsex.cookie')
  6148. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6149. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6150. sts, data = self.get_Page(url)
  6151. if not sts: return valTab
  6152. printDBG( 'Host listsItems data: '+data )
  6153. self.page = 0
  6154. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="video-item">', '</div>')
  6155. for item in data:
  6156. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  6157. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6158. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6159. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6160. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  6161. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'daftsex-clips', phImage, None))
  6162. valTab.sort(key=lambda poz: poz.name)
  6163. valTab.insert(0,CDisplayListItem("--- LATEST ---","LATEST", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'daftsex-clips', '', None))
  6164. self.SEARCH_proc='daftsex-search'
  6165. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6166. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6167. return valTab
  6168. if 'daftsex-search' == name:
  6169. printDBG( 'Host listsItems begin name='+name )
  6170. valTab = self.listsItems(-1, 'https://daftsex.com/video/%s' % url.replace(' ','+'), 'daftsex-clips')
  6171. return valTab
  6172. if 'daftsex-clips' == name:
  6173. printDBG( 'Host listsItems begin name='+name )
  6174. COOKIEFILE = os_path.join(GetCookieDir(), 'daftsex.cookie')
  6175. catUrl = self.currList[Index].possibleTypesOfSearch
  6176. if catUrl == 'next':
  6177. self.page += 1
  6178. post_data = {'page' : str(self.page)}
  6179. else:
  6180. self.page = 0
  6181. post_data = {}
  6182. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6183. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6184. sts, data = self.get_Page(url, self.defaultParams, post_data)
  6185. if not sts: return valTab
  6186. printDBG( 'Host listsItems data: '+data )
  6187. next = self.cm.ph.getDataBeetwenMarkers(data, '>&uarr;<', '</div>', False)[1]
  6188. data = data.split('<div class="video-item">')
  6189. for item in data:
  6190. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6191. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6192. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6193. Time = self.cm.ph.getSearchGroups(item, '''time">([^>]+?)<''', 1, True)[0].strip()
  6194. Added = self.cm.ph.getSearchGroups(item, '''date">([^>]+?)<''', 1, True)[0].strip()
  6195. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6196. if phImage.startswith('//'): phImage = 'https:' + phImage
  6197. try:
  6198. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  6199. except: pass
  6200. if phTitle:
  6201. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle)+'\nAdded['+Added+']',CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6202. if next:
  6203. valTab.append(CDisplayListItem('Next ', 'Page: '+str(self.page+1), CDisplayListItem.TYPE_CATEGORY, [url], name, '', 'next'))
  6204. return valTab
  6205. if 'lovehomeporn' == name:
  6206. printDBG( 'Host listsItems begin name='+name )
  6207. self.MAIN_URL = 'https://lovehomeporn.com/'
  6208. self.format4k = config.plugins.iptvplayer.xxx4k.value
  6209. COOKIEFILE = os_path.join(GetCookieDir(), 'lovehomeporn.cookie')
  6210. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6211. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6212. sts, data = self.get_Page(url)
  6213. if not sts: return valTab
  6214. printDBG( 'Host listsItems data: '+data )
  6215. self.page = 0
  6216. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class="tag2', '</li>')
  6217. for item in data:
  6218. phTitle = self._cleanHtmlStr(item).strip()
  6219. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6220. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6221. if phUrl:
  6222. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'lovehomeporn-clips', '', None))
  6223. valTab.sort(key=lambda poz: poz.name)
  6224. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'videos?o=mv'], 'lovehomeporn-clips', '', None))
  6225. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'videos?o=tr'], 'lovehomeporn-clips', '', None))
  6226. valTab.insert(0,CDisplayListItem("--- Most Recent ---","Most Recent", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'videos?o=mr'], 'lovehomeporn-clips', '', None))
  6227. self.SEARCH_proc='lovehomeporn-search'
  6228. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6229. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6230. return valTab
  6231. if 'lovehomeporn-search' == name:
  6232. printDBG( 'Host listsItems begin name='+name )
  6233. valTab = self.listsItems(-1, 'https://lovehomeporn.com/search?search_type=videos&search_query=%s' % url.replace(' ','+'), 'lovehomeporn-clips')
  6234. return valTab
  6235. if 'lovehomeporn-clips' == name:
  6236. printDBG( 'Host listsItems begin name='+name )
  6237. COOKIEFILE = os_path.join(GetCookieDir(), 'lovehomeporn.cookie')
  6238. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6239. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6240. sts, data = self.get_Page(url, self.defaultParams)
  6241. if not sts: return valTab
  6242. printDBG( 'Host listsItems data: '+data )
  6243. next = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', 'Next', False)[1]
  6244. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  6245. for item in data:
  6246. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6247. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6248. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6249. Time = self.cm.ph.getSearchGroups(item, '''info">([^>]+?)<''', 1, True)[0].strip()
  6250. Added = self.cm.ph.getSearchGroups(item, '''date">([^>]+?)<''', 1, True)[0].strip()
  6251. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6252. if phImage.startswith('//'): phImage = 'http:' + phImage
  6253. if phImage.endswith('.webp'): phImage = re.sub(r'/260(.*?)195/', '/260%D1%85195/', phImage.replace('webp','jpg'))
  6254. phImage = strwithmeta(phImage, {'Referer':self.MAIN_URL})
  6255. if phTitle:
  6256. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6257. if next:
  6258. next = re.compile('href=[\"|\'](.*?)[\"|\']').findall(next)[-1]
  6259. next = next.replace('&amp;','&')
  6260. valTab.append(CDisplayListItem('Next ', 'Page: '+next.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6261. return valTab
  6262. if 'EROPROFILE' == name:
  6263. printDBG( 'Host listsItems begin name='+name )
  6264. self.MAIN_URL = 'https://www.eroprofile.com'
  6265. COOKIEFILE = os_path.join(GetCookieDir(), 'eroprofile.cookie')
  6266. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6267. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6268. sts, data = self.get_Page(url)
  6269. if not sts: return valTab
  6270. printDBG( 'Host listsItems data: '+data )
  6271. cats = '[{"title":"Amateur Moms/Mature","url":"13"},{"title":"Amateur Teens","url":"14"},{"title":"Amateurs","url":"12"},\
  6272. {"title":"Asian","url":"19"},{"title":"Ass","url":"27"},{"title":"BDSM","url":"25"},{"title":"Big Ladies","url":"5"},\
  6273. {"title":"Big Tits","url":"11"},{"title":"Bisexual","url":"18"},{"title":"Black / Ebony","url":"20"},{"title":"Celeb","url":"23"},\
  6274. {"title":"Dogging","url":"33"},{"title":"Facial / Cum","url":"24"},{"title":"Fetish / Kinky","url":"10"},{"title":"Fucking / Sucking","url":"26"},\
  6275. {"title":"Hairy","url":"7"},{"title":"Interracial","url":"15"},{"title":"Lesbian","url":"6"},{"title":"Lingerie / Panties","url":"30"},\
  6276. {"title":"Nudist / Voyeur / Public","url":"16"},{"title":"Other / Cartoon","url":"28"},{"title":"Pregnant","url":"32"},\
  6277. {"title":"Shemale / TS","url":"9"},{"title":"Squirting","url":"34"},{"title":"Swingers / Gangbang","url":"8"}]'
  6278. result = simplejson.loads(cats)
  6279. for item in result:
  6280. title = str(item["title"])
  6281. id = str(item["url"])
  6282. url = 'http://www.eroprofile.com/m/videos/search?niche=%s&pnum=%s' % (id, '1')
  6283. valTab.append(CDisplayListItem(title,title,CDisplayListItem.TYPE_CATEGORY, [url],'EROPROFILE-clips', '', None))
  6284. valTab.sort(key=lambda poz: poz.name)
  6285. valTab.insert(0,CDisplayListItem("--- Fun Videos ---", "Fun Videos", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/m/videos/search?niche=17"], 'EROPROFILE-clips', '',None))
  6286. valTab.insert(0,CDisplayListItem("--- Popular Videos ---", "Popular Videos", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/m/videos/popular"], 'EROPROFILE-clips', '',None))
  6287. valTab.insert(0,CDisplayListItem("--- Videos Home ---", "Videos Home", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+"/m/videos/home"], 'EROPROFILE-clips', '',None))
  6288. self.SEARCH_proc='EROPROFILE-search'
  6289. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6290. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6291. return valTab
  6292. if 'EROPROFILE-search' == name:
  6293. printDBG( 'Host listsItems begin name='+name )
  6294. valTab = self.listsItems(-1, 'http://www.eroprofile.com/m/videos/search?niche=13.14.12.19.27.25.5.11.18.20.23.24.10.26.17.7.15.6.30.16.28.9.8.32.33.34&text=%s&pnum=1' % url.replace(' ','+'), 'EROPROFILE-clips')
  6295. return valTab
  6296. if 'EROPROFILE-clips' == name:
  6297. printDBG( 'Host listsItems begin name='+name )
  6298. COOKIEFILE = os_path.join(GetCookieDir(), 'eroprofile.cookie')
  6299. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6300. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6301. sts, data = self.get_Page(url)
  6302. if not sts: return valTab
  6303. printDBG( 'Host listsItems data: '+data )
  6304. next = self.cm.ph.getDataBeetwenMarkers(data, 'VideoListPageNav', 'marL', False)[1]
  6305. data = data.split('<div class="video">')
  6306. for item in data:
  6307. printDBG( 'Host listsItems item: '+str(item) )
  6308. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6309. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  6310. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  6311. if phTitle=='': phTitle = self.cm.ph.getSearchGroups(item, '''videoTtl">([^>]+?)<''', 1, True)[0].strip()
  6312. time = self.cm.ph.getSearchGroups(item, '''videoDur">([^>]+?)<''', 1, True)[0].strip()
  6313. added = self.cm.ph.getSearchGroups(item, '''fsSmall">([^>]+?)<''', 1, True)[0].strip()
  6314. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  6315. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6316. if phImage.startswith('//'): phImage = 'http:' + phImage
  6317. try:
  6318. phImage = urlparser.decorateUrl(phImage, {'Referer': url})
  6319. except: pass
  6320. if time and not 'Web Analytics' in phTitle and not 'tools' in time:
  6321. valTab.append(CDisplayListItem(phTitle,'['+time+'] '+phTitle+'\nAdded: '+added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  6322. if next:
  6323. next = re.compile('href=[\"|\'](.*?)[\"|\']').findall(next)[-1]
  6324. next = next.replace('&amp;','&')
  6325. if next.startswith('/'): next = self.MAIN_URL + next
  6326. valTab.append(CDisplayListItem('Next', 'Page: '+next.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  6327. return valTab
  6328. if 'absoluporn' == name:
  6329. printDBG( 'Host listsItems begin name='+name )
  6330. self.MAIN_URL = 'http://www.absoluporn.com'
  6331. COOKIEFILE = os_path.join(GetCookieDir(), 'absoluporn.cookie')
  6332. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6333. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6334. sts, data = self.get_Page(url)
  6335. if not sts: return valTab
  6336. printDBG( 'Host listsItems data: '+data )
  6337. data = self.cm.ph.getDataBeetwenMarkers(data, 'pvicon-categorie', 'tags', False)[1]
  6338. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  6339. for item in data:
  6340. phTitle = self._cleanHtmlStr(decodeHtml(item)).strip()
  6341. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6342. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl.replace('..','')
  6343. if phUrl:
  6344. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'absoluporn-clips', '', None))
  6345. valTab.sort(key=lambda poz: poz.name)
  6346. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,['http://www.absoluporn.com/en/wall-main-1.html'], 'absoluporn-clips', '', None))
  6347. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['http://www.absoluporn.com/en/wall-note-1.html'], 'absoluporn-clips', '', None))
  6348. valTab.insert(0,CDisplayListItem("--- Most Recent ---","Most Recent", CDisplayListItem.TYPE_CATEGORY,['http://www.absoluporn.com/en/wall-date-1.html'], 'absoluporn-clips', '', None))
  6349. self.SEARCH_proc='absoluporn-search'
  6350. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6351. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6352. return valTab
  6353. if 'absoluporn-search' == name:
  6354. printDBG( 'Host listsItems begin name='+name )
  6355. valTab = self.listsItems(-1, 'http://www.absoluporn.com/en/search-%s-1.html' % url.replace(' ','+'), 'absoluporn-clips')
  6356. return valTab
  6357. if 'absoluporn-clips' == name:
  6358. printDBG( 'Host listsItems begin name='+name )
  6359. COOKIEFILE = os_path.join(GetCookieDir(), 'absoluporn.cookie')
  6360. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  6361. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6362. sts, data = self.get_Page(url, self.defaultParams)
  6363. if not sts: return valTab
  6364. printDBG( 'Host listsItems data: '+data )
  6365. next = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&').replace('..','')
  6366. #data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  6367. data = data.split('<div class="thumb-main">')
  6368. if len(data): del data[0]
  6369. for item in data:
  6370. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6371. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6372. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6373. Time = self.cm.ph.getSearchGroups(item, '''time">([^>]+?)<''', 1, True)[0].strip()
  6374. Added = self.cm.ph.getSearchGroups(item, '''date">([^>]+?)<''', 1, True)[0].strip()
  6375. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6376. if phImage.startswith('//'): phImage = 'http:' + phImage
  6377. try:
  6378. phImage = urlparser.decorateUrl(phImage, {'Referer': self.MAIN_URL})
  6379. except: pass
  6380. if phTitle:
  6381. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6382. if next:
  6383. if next.startswith('/'): next = self.MAIN_URL + next
  6384. valTab.append(CDisplayListItem('Next ', 'Page: '+next.split('=')[-1].replace('.html',''), CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6385. return valTab
  6386. if 'amateurcool' == name:
  6387. printDBG( 'Host listsItems begin name='+name )
  6388. self.MAIN_URL = 'https://www.amateurcool.com'
  6389. COOKIEFILE = os_path.join(GetCookieDir(), 'amateurcool.cookie')
  6390. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6391. sts, data = self.getPage(url, 'amateurcool.cookie', 'amateurcool.com', self.defaultParams)
  6392. if not sts: return valTab
  6393. printDBG( 'Host listsItems data: '+data )
  6394. #data = self.cm.ph.getDataBeetwenMarkers(data, 'pvicon-categorie', 'tags', False)[1]
  6395. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li>', '</li>')
  6396. for item in data:
  6397. phTitle = self._cleanHtmlStr(decodeHtml(item)).strip()
  6398. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](https://www.amateurcool.com/channels/[^"^']+?)['"]''', 1, True)[0]
  6399. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6400. if phUrl:
  6401. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'amateurcool-clips', '', None))
  6402. valTab.sort(key=lambda poz: poz.name)
  6403. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,['https://www.amateurcool.com/most-viewed/page1.html'], 'amateurcool-clips', '', None))
  6404. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['https://www.amateurcool.com/top-rated/page1.html'], 'amateurcool-clips', '', None))
  6405. valTab.insert(0,CDisplayListItem("--- Most Recent ---","Most Recent", CDisplayListItem.TYPE_CATEGORY,['https://www.amateurcool.com/most-recent/page1.html'], 'amateurcool-clips', '', None))
  6406. self.SEARCH_proc='amateurcool-search'
  6407. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6408. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6409. return valTab
  6410. if 'amateurcool-search' == name:
  6411. printDBG( 'Host listsItems begin name='+name )
  6412. valTab = self.listsItems(-1, 'https://www.amateurcool.com/search/%s/page1.html' % url.replace(' ','+'), 'amateurcool-clips')
  6413. return valTab
  6414. if 'amateurcool-clips' == name:
  6415. printDBG( 'Host listsItems begin name='+name )
  6416. COOKIEFILE = os_path.join(GetCookieDir(), 'amateurcool.cookie')
  6417. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6418. sts, data = self.getPage(url, 'amateurcool.cookie', 'amateurcool.com', self.defaultParams)
  6419. if not sts: return valTab
  6420. printDBG( 'Host listsItems data: '+data )
  6421. next = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', 'NEXT', False)[1]
  6422. data = data.split('<div class="item nb"')
  6423. if len(data): del data[0]
  6424. for item in data:
  6425. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6426. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6427. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6428. Time = self.cm.ph.getSearchGroups(item, '''<span>([^>]+?)<''', 1, True)[0].replace('Video','').strip()
  6429. Added = self.cm.ph.getSearchGroups(item, '''date">([^>]+?)<''', 1, True)[0].strip()
  6430. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6431. if phImage.startswith('//'): phImage = 'http:' + phImage
  6432. try:
  6433. phImage = phImage.replace(' ','%20')
  6434. phImage = urlparser.decorateUrl(phImage, {'Referer': self.MAIN_URL})
  6435. except: pass
  6436. if phTitle:
  6437. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6438. if next:
  6439. next = re.compile('href=[\"|\'](.*?)[\"|\']').findall(next)[-1]
  6440. next = next.replace('&amp;','&')
  6441. if next.startswith('page'): next = url.replace(url.split('/')[-1],next)
  6442. if next.startswith('/'): next = self.MAIN_URL + next
  6443. valTab.append(CDisplayListItem('Next ', 'Page: '+next.split('/')[-1].replace('.html','').replace('page',''), CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6444. return valTab
  6445. if 'yespornplease' == name:
  6446. printDBG( 'Host listsItems begin name='+name )
  6447. self.MAIN_URL = 'https://yespornplease.com'
  6448. COOKIEFILE = os_path.join(GetCookieDir(), 'yespornplease.cookie')
  6449. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6450. sts, data = self.getPage(url, 'yespornplease.cookie', 'yespornplease.com', self.defaultParams)
  6451. if not sts: return valTab
  6452. printDBG( 'Host listsItems data: '+data )
  6453. if len(data)<100 and 'Maintenance' in data:
  6454. msg = _("Last error:\n%s" % data)
  6455. GetIPTVNotify().push('%s' % msg, 'error', 20)
  6456. return valTab
  6457. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<div class="col-sm-4', '</div>')
  6458. for item in data:
  6459. phTitle = self._cleanHtmlStr(decodeHtml(item)).strip()
  6460. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6461. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6462. if phUrl:
  6463. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'yespornplease-clips', '', None))
  6464. valTab.sort(key=lambda poz: poz.name)
  6465. valTab.insert(0,CDisplayListItem("--- Most Recent ---","Most Recent", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'yespornplease-clips', '', None))
  6466. self.SEARCH_proc='yespornplease-search'
  6467. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6468. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6469. return valTab
  6470. if 'yespornplease-search' == name:
  6471. printDBG( 'Host listsItems begin name='+name )
  6472. valTab = self.listsItems(-1, 'https://yespornplease.com/search?q=%s' % url.replace(' ','+'), 'yespornplease-clips')
  6473. return valTab
  6474. if 'yespornplease-clips' == name:
  6475. printDBG( 'Host listsItems begin name='+name )
  6476. COOKIEFILE = os_path.join(GetCookieDir(), 'yespornplease.cookie')
  6477. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6478. sts, data = self.getPage(url, 'yespornplease.cookie', 'yespornplease.com', self.defaultParams)
  6479. if not sts: return valTab
  6480. printDBG( 'Host listsItems data: '+data )
  6481. next = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', '>Next', False)[1]
  6482. data = data.split('class="well well-sm"')
  6483. if len(data): del data[0]
  6484. for item in data:
  6485. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6486. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6487. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6488. Time = self.cm.ph.getSearchGroups(item, '''"duration">([^>]+?)<''', 1, True)[0].replace('Video','').strip()
  6489. Added = self.cm.ph.getSearchGroups(item, '''pull-right no-rating">([^>]+?)<''', 1, True)[0].strip()
  6490. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6491. if phImage.startswith('//'): phImage = 'http:' + phImage
  6492. try:
  6493. phImage = urlparser.decorateUrl(phImage, {'Referer': self.MAIN_URL})
  6494. except: pass
  6495. if phTitle:
  6496. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle)+'\nAdded: '+Added,CDisplayListItem.TYPE_CATEGORY, [phUrl],'yespornplease-serwer', phImage, phTitle))
  6497. if next:
  6498. next = re.compile('href=[\"|\'](.*?)[\"|\']').findall(next)[-1]
  6499. next = next.replace('&amp;','&')
  6500. if next.startswith('/'): next = self.MAIN_URL + next
  6501. valTab.append(CDisplayListItem('Next ', 'Page: '+ self.cm.ph.getSearchGroups(next, '''p=([^=]+?)&''', 1, True)[0], CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6502. return valTab
  6503. if 'yespornplease-serwer' == name:
  6504. printDBG( 'Host listsItems begin name='+name )
  6505. COOKIEFILE = os_path.join(GetCookieDir(), 'yespornplease.cookie')
  6506. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6507. sts, data = self.getPage(url, 'yespornplease.cookie', 'yespornplease.com', self.defaultParams)
  6508. if not sts: return ''
  6509. printDBG( 'Host listsItems data: '+data )
  6510. catUrl = self.currList[Index].possibleTypesOfSearch
  6511. phImage = self.cm.ph.getSearchGroups(data, '''"og:image" content=['"]([^"^']+?)['"]''', 1, True)[0]
  6512. try:
  6513. phImage = urlparser.decorateUrl(phImage, {'Referer': self.MAIN_URL})
  6514. except: pass
  6515. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<iframe', '</iframe>')
  6516. for item in data:
  6517. phUrl = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6518. phTitle = catUrl
  6519. if not phUrl.startswith('https://yespornplease.com'):
  6520. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  6521. valTab.append(CDisplayListItem(decodeHtml(phTitle),phUrl.split('/')[2],CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  6522. return valTab
  6523. if 'anybunny' == name:
  6524. printDBG( 'Host listsItems begin name='+name )
  6525. self.MAIN_URL = 'http://anybunny.com'
  6526. COOKIEFILE = os_path.join(GetCookieDir(), 'anybunny.cookie')
  6527. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6528. sts, data = self.getPage(url, 'anybunny.cookie', 'anybunny.com', self.defaultParams)
  6529. if not sts: return valTab
  6530. printDBG( 'Host listsItems data: '+data )
  6531. #data = self.cm.ph.getDataBeetwenMarkers(data, 'pvicon-categorie', 'tags', False)[1]
  6532. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a class=linkscts', '</a>')
  6533. for item in data:
  6534. phTitle = self._cleanHtmlStr(decodeHtml(item)).replace('\n','').strip()
  6535. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/top/[^"^']+?)['"]''', 1, True)[0]
  6536. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6537. if phUrl:
  6538. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'anybunny-clips', '', None))
  6539. valTab.sort(key=lambda poz: poz.name)
  6540. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,['http://anybunny.com/top/'], 'anybunny-clips', '', None))
  6541. valTab.insert(0,CDisplayListItem("--- New ---","New", CDisplayListItem.TYPE_CATEGORY,['http://anybunny.com/new/'], 'anybunny-clips', '', None))
  6542. self.SEARCH_proc='anybunny-search'
  6543. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6544. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6545. return valTab
  6546. if 'anybunny-search' == name:
  6547. printDBG( 'Host listsItems begin name='+name )
  6548. valTab = self.listsItems(-1, 'http://anybunny.com/top/%s' % url.replace(' ','+'), 'anybunny-clips')
  6549. return valTab
  6550. if 'anybunny-clips' == name:
  6551. printDBG( 'Host listsItems begin name='+name )
  6552. COOKIEFILE = os_path.join(GetCookieDir(), 'anybunny.cookie')
  6553. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6554. sts, data = self.getPage(url, 'anybunny.cookie', 'anybunny.com', self.defaultParams)
  6555. if not sts: return valTab
  6556. printDBG( 'Host listsItems data: '+data )
  6557. next = self.cm.ph.getDataBeetwenMarkers(data, 'topbtmse', '>Next page', False)[1]
  6558. data = data.split('nuyrfe')
  6559. if len(data): del data[0]
  6560. for item in data:
  6561. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6562. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6563. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6564. Time = self.cm.ph.getSearchGroups(item, '''<span>([^>]+?)<''', 1, True)[0].replace('Video','').strip()
  6565. Added = self.cm.ph.getSearchGroups(item, '''date">([^>]+?)<''', 1, True)[0].strip()
  6566. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6567. if phImage.startswith('//'): phImage = 'http:' + phImage
  6568. try:
  6569. phImage = urlparser.decorateUrl(phImage, {'Referer': self.MAIN_URL})
  6570. except: pass
  6571. if phTitle:
  6572. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6573. if next:
  6574. next = re.compile('href=[\"|\'](.*?)[\"|\']').findall(next)[-1]
  6575. next = next.replace('&amp;','&')
  6576. if next.startswith('/'): next = self.MAIN_URL + next
  6577. valTab.append(CDisplayListItem('Next ', 'Page: '+next.split('=')[-1].replace('.html','').replace('page',''), CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6578. return valTab
  6579. if 'datoporn' == name:
  6580. printDBG( 'Host listsItems begin name='+name )
  6581. self.MAIN_URL = 'http://datoporn.co'
  6582. COOKIEFILE = os_path.join(GetCookieDir(), 'datoporn.cookie')
  6583. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6584. sts, data = self.getPage(url, 'datoporn.cookie', 'dato.porn', self.defaultParams)
  6585. if not sts: return valTab
  6586. printDBG( 'Host listsItems data: '+data )
  6587. data = data.split('<a class="item"')
  6588. if len(data): del data[0]
  6589. for item in data:
  6590. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6591. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6592. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6593. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6594. if phUrl.startswith('/'): phUrl = 'https://dato.porn' + phUrl
  6595. if not 'sort_by' in phUrl: phUrl= phUrl+'?sort_by=post_date'
  6596. if phUrl:
  6597. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'datoporn-clips', phImage, None))
  6598. valTab.sort(key=lambda poz: poz.name)
  6599. self.SEARCH_proc='datoporn-search'
  6600. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6601. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6602. return valTab
  6603. if 'datoporn-search' == name:
  6604. printDBG( 'Host listsItems begin name='+name )
  6605. valTab = self.listsItems(-1, 'https://dato.porn/search/%s/' % url.replace(' ','+'), 'datoporn-clips')
  6606. return valTab
  6607. if 'datoporn-clips' == name:
  6608. printDBG( 'Host listsItems begin name='+name )
  6609. COOKIEFILE = os_path.join(GetCookieDir(), 'datoporn.cookie')
  6610. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6611. sts, data = self.getPage(url, 'datoporn.cookie', 'datoporn.co', self.defaultParams)
  6612. if not sts: return valTab
  6613. printDBG( 'Host listsItems data: '+data )
  6614. next = self.cm.ph.getSearchGroups(data, '''class="next".*?from:(\d)"''', 1, True)[0]
  6615. data = data.split('<div class="item')
  6616. if len(data): del data[0]
  6617. for item in data:
  6618. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6619. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','')
  6620. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  6621. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6622. Time = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0].replace('Video','').strip()
  6623. Added = self.cm.ph.getSearchGroups(item, '''added"><em>([^>]+?)<''', 1, True)[0].strip()
  6624. if phUrl.startswith('/'): phUrl = 'https://dato.porn' + phUrl
  6625. if phImage.startswith('//'): phImage = 'http:' + phImage
  6626. try:
  6627. phImage = urlparser.decorateUrl(phImage, {'Referer': 'https://dato.porn'})
  6628. except: pass
  6629. if phTitle:
  6630. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6631. if next:
  6632. next_page = url.replace('&'+url.split('&')[-1],'')+'&from='+str(next)
  6633. if '/search/' in url: next_page = url.replace('&'+url.split('&')[-1],'')+'&from_videos='+str(next)
  6634. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  6635. return valTab
  6636. if 'hqporner' == name:
  6637. printDBG( 'Host listsItems begin name='+name )
  6638. self.MAIN_URL = 'https://hqporner.com'
  6639. COOKIEFILE = os_path.join(GetCookieDir(), 'hqporner.cookie')
  6640. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6641. sts, data = self.getPage(url, 'hqporner.cookie', 'hqporner.com', self.defaultParams)
  6642. if not sts: return valTab
  6643. printDBG( 'Host listsItems data: '+data )
  6644. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<section', '</section>')
  6645. for item in data:
  6646. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  6647. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6648. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6649. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6650. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  6651. if phUrl and phTitle:
  6652. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'hqporner-clips', phImage, None))
  6653. valTab.sort(key=lambda poz: poz.name)
  6654. self.SEARCH_proc='hqporner-search'
  6655. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6656. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6657. return valTab
  6658. if 'hqporner-search' == name:
  6659. printDBG( 'Host listsItems begin name='+name )
  6660. valTab = self.listsItems(-1, 'https://hqporner.com/?s=%s' % url.replace(' ','+'), 'hqporner-clips')
  6661. return valTab
  6662. if 'hqporner-clips' == name:
  6663. printDBG( 'Host listsItems begin name='+name )
  6664. COOKIEFILE = os_path.join(GetCookieDir(), 'hqporner.cookie')
  6665. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6666. sts, data = self.getPage(url, 'hqporner.cookie', 'hqporner.com', self.defaultParams)
  6667. if not sts: return valTab
  6668. printDBG( 'Host listsItems data: '+data )
  6669. next = self.cm.ph.getDataBeetwenMarkers(data, 'pagination', '>Next', False)[1]
  6670. data = data.split('<div class="6u">')
  6671. if len(data): del data[0]
  6672. for item in data:
  6673. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6674. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6675. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6676. Time = self.cm.ph.getSearchGroups(item, '''fa-clock-o meta-data">([^>]+?)<''', 1, True)[0].strip()
  6677. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6678. if phImage.startswith('//'): phImage = 'http:' + phImage
  6679. try:
  6680. phImage = urlparser.decorateUrl(phImage, {'Referer': self.MAIN_URL})
  6681. except: pass
  6682. if phTitle:
  6683. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle),CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6684. if next:
  6685. next = re.compile('href=[\"|\'](.*?)[\"|\']').findall(next)[-1]
  6686. next = next.replace('&amp;','&')
  6687. if next.startswith('/'): next = self.MAIN_URL + next
  6688. valTab.append(CDisplayListItem('Next ', 'Page: '+next.split('=')[-1].replace('.html','').replace('page',''), CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6689. return valTab
  6690. if 'spankbang' == name:
  6691. printDBG( 'Host listsItems begin name='+name )
  6692. self.MAIN_URL = 'https://spankbang.com'
  6693. COOKIEFILE = os_path.join(GetCookieDir(), 'spankbang.cookie')
  6694. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6695. sts, data = self.getPage(url, 'spankbang.cookie', 'spankbang.com', self.defaultParams)
  6696. if not sts: return valTab
  6697. printDBG( 'Host listsItems data: '+data )
  6698. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a', '</a>')
  6699. for item in data:
  6700. phTitle = self._cleanHtmlStr(decodeHtml(item)).replace('\n','').strip()
  6701. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6702. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/s/[^"^']+?)['"]''', 1, True)[0]
  6703. if not phUrl: phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](/tag/[^"^']+?)['"]''', 1, True)[0]
  6704. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6705. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  6706. if phUrl and phTitle:
  6707. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'spankbang-clips', phImage, None))
  6708. valTab.sort(key=lambda poz: poz.name)
  6709. valTab.insert(0,CDisplayListItem("--- Trending ---","Trending", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/trending_videos/'], 'spankbang-clips', '', None))
  6710. valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/most_popular/?period=week'], 'spankbang-clips', '', None))
  6711. valTab.insert(0,CDisplayListItem("--- New ---","New", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/new_videos/'], 'spankbang-clips', '', None))
  6712. self.SEARCH_proc='spankbang-search'
  6713. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6714. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6715. return valTab
  6716. if 'spankbang-search' == name:
  6717. printDBG( 'Host listsItems begin name='+name )
  6718. valTab = self.listsItems(-1, 'https://spankbang.com/s/%s/' % url.replace(' ','+'), 'spankbang-clips')
  6719. return valTab
  6720. if 'spankbang-clips' == name:
  6721. printDBG( 'Host listsItems begin name='+name )
  6722. COOKIEFILE = os_path.join(GetCookieDir(), 'spankbang.cookie')
  6723. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6724. sts, data = self.getPage(url, 'spankbang.cookie', 'spankbang.com', self.defaultParams)
  6725. if not sts: return valTab
  6726. printDBG( 'Host listsItems data: '+data )
  6727. next = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&').replace('..','')
  6728. if next == '': next = self.cm.ph.getSearchGroups(data, '''<li class="next"><a href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&').replace('..','')
  6729. data2 = self.cm.ph.getDataBeetwenMarkers(data, '<a href="/tag/" class="k more">', 'footer', False)[1]
  6730. if len(data2): data = data2
  6731. data = data.split('<div class="video-item"')
  6732. if len(data): del data[0]
  6733. for item in data:
  6734. Added = ''
  6735. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6736. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  6737. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6738. Time = self.cm.ph.getSearchGroups(item, '''clock-o"></i>([^>]+?)<''', 1, True)[0].strip()
  6739. if not Time: Time = self.cm.ph.getSearchGroups(item, '''i-len">([^>]+?)<''', 1, True)[0].strip()
  6740. Added = self.cm.ph.getSearchGroups(item, '''&nbsp;<span>([^>]+?)<''', 1, True)[0].strip()
  6741. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6742. if phImage.startswith('//'): phImage = 'http:' + phImage
  6743. try:
  6744. phImage = urlparser.decorateUrl(phImage, {'Referer': self.MAIN_URL})
  6745. except: pass
  6746. if phTitle and Time:
  6747. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6748. if next:
  6749. if next.startswith('//'): next = 'http:' + next
  6750. if next.startswith('/'): next = self.MAIN_URL + next
  6751. valTab.append(CDisplayListItem('Next ', 'Page: '+next.split('/')[-2].replace('.html','').replace('page',''), CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6752. return valTab
  6753. if 'cumlouder' == name:
  6754. printDBG( 'Host listsItems begin name='+name )
  6755. self.MAIN_URL = 'https://www.cumlouder.com'
  6756. COOKIEFILE = os_path.join(GetCookieDir(), 'cumlouder.cookie')
  6757. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6758. sts, data = self.getPage(url, 'cumlouder.cookie', 'cumlouder.com', self.defaultParams)
  6759. if not sts: return valTab
  6760. printDBG( 'Host listsItems data: '+data )
  6761. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<a tag-url=', '</a>')
  6762. for item in data:
  6763. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  6764. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  6765. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6766. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6767. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  6768. if phUrl and phTitle:
  6769. valTab.append(CDisplayListItem(phTitle,phTitle,CDisplayListItem.TYPE_CATEGORY, [phUrl],'cumlouder-clips', phImage, None))
  6770. valTab.sort(key=lambda poz: poz.name)
  6771. valTab.insert(0,CDisplayListItem("--- Channels ---","channels", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/channels/'], 'cumlouder-girls', '', None))
  6772. valTab.insert(0,CDisplayListItem("--- Series ---","series", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/series/'], 'cumlouder-girls', '', None))
  6773. valTab.insert(0,CDisplayListItem("--- Girls ---","girls", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/girls/'], 'cumlouder-girls', '', None))
  6774. self.SEARCH_proc='cumlouder-search'
  6775. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6776. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6777. return valTab
  6778. if 'cumlouder-search' == name:
  6779. printDBG( 'Host listsItems begin name='+name )
  6780. valTab = self.listsItems(-1, 'https://www.cumlouder.com/search/?q=%s' % url.replace(' ','+'), 'cumlouder-clips')
  6781. return valTab
  6782. if 'cumlouder-clips' == name:
  6783. printDBG( 'Host listsItems begin name='+name )
  6784. COOKIEFILE = os_path.join(GetCookieDir(), 'cumlouder.cookie')
  6785. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6786. sts, data = self.getPage(url, 'cumlouder.cookie', 'cumlouder.com', self.defaultParams)
  6787. if not sts: return valTab
  6788. printDBG( 'Host listsItems data: '+data )
  6789. next = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&').replace('..','')
  6790. if next == '': next = self.cm.ph.getSearchGroups(data, '''<li class="next"><a href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&').replace('..','')
  6791. data = data.split('<a class="muestra-escena')
  6792. if len(data): del data[0]
  6793. for item in data:
  6794. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0].replace('\n','').strip()
  6795. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  6796. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('..','')
  6797. Time = self.cm.ph.getSearchGroups(item, '''minutos sprite"></span>([^>]+?)<''', 1, True)[0].strip()
  6798. if not Time: Time = self.cm.ph.getSearchGroups(item, '''i-len">([^>]+?)<''', 1, True)[0].strip()
  6799. Added = self.cm.ph.getSearchGroups(item, '''fecha sprite"></span>([^>]+?)<''', 1, True)[0].strip()
  6800. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6801. if phImage.startswith('//'): phImage = 'http:' + phImage
  6802. try:
  6803. phImage = urlparser.decorateUrl(phImage, {'Referer': self.MAIN_URL})
  6804. except: pass
  6805. if phTitle:
  6806. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+Time+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6807. if next:
  6808. if next.startswith('//'): next = 'http:' + next
  6809. if next.startswith('/'): next = self.MAIN_URL + next
  6810. valTab.append(CDisplayListItem('Next ', 'Page: '+next.split('/')[-2].replace('.html','').replace('page',''), CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'next'))
  6811. return valTab
  6812. if 'cumlouder-girls' == name:
  6813. printDBG( 'Host listsItems begin name='+name )
  6814. COOKIEFILE = os_path.join(GetCookieDir(), 'cumlouder.cookie')
  6815. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6816. sts, data = self.getPage(url, 'cumlouder.cookie', 'cumlouder.com', self.defaultParams)
  6817. if not sts: return valTab
  6818. printDBG( 'Host listsItems data: '+data )
  6819. data = data.split('class="muestra-escena')
  6820. if len(data): del data[0]
  6821. for item in data:
  6822. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  6823. phImage = self.cm.ph.getSearchGroups(item, '''data-src=['"]([^"^']+?)['"]''', 1, True)[0]
  6824. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6825. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6826. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  6827. if phUrl and phTitle:
  6828. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'cumlouder-clips', phImage, None))
  6829. #valTab.sort(key=lambda poz: poz.name)
  6830. return valTab
  6831. if 'porn00' == name:
  6832. printDBG( 'Host listsItems begin name='+name )
  6833. self.MAIN_URL = 'http://www.porn00.org'
  6834. COOKIEFILE = os_path.join(GetCookieDir(), 'porn00.cookie')
  6835. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6836. sts, data = self.getPage(url, 'porn00.cookie', 'porn00.org', self.defaultParams)
  6837. if not sts: return ''
  6838. printDBG( 'Host listsItems data: '+data )
  6839. data = self.cm.ph.getDataBeetwenMarkers(data, '<ul class="category-menu', '</ul>', False)[1]
  6840. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li', '</li>')
  6841. for item in data:
  6842. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6843. phTitle = self._cleanHtmlStr(decodeHtml(item)).replace('\n','').strip()
  6844. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  6845. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6846. if phUrl:
  6847. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'porn00-clips', '', None))
  6848. valTab.sort(key=lambda poz: poz.name)
  6849. self.SEARCH_proc='porn00-search'
  6850. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6851. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6852. return valTab
  6853. if 'porn00-search' == name:
  6854. printDBG( 'Host listsItems begin name='+name )
  6855. valTab = self.listsItems(-1, 'http://www.porn00.org/page/1/?s=%s' % url.replace(' ','+'), 'porn00-clips')
  6856. return valTab
  6857. if 'porn00-clips' == name:
  6858. printDBG( 'Host listsItems begin name='+name )
  6859. COOKIEFILE = os_path.join(GetCookieDir(), 'porn00.cookie')
  6860. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6861. sts, data = self.getPage(url, 'porn00.cookie', 'porn00.org', self.defaultParams)
  6862. if not sts: return ''
  6863. printDBG( 'Host listsItems data: '+data )
  6864. catUrl = self.currList[Index].possibleTypesOfSearch
  6865. next = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&').replace('..','')
  6866. data = data.split('<div class="post-con">')
  6867. if len(data): del data[0]
  6868. for item in data:
  6869. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6870. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  6871. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6872. phTime = self.cm.ph.getSearchGroups(item, '''([\d]?\d\d:\d\d)''', 1, True)[0]
  6873. Added = self.cm.ph.getSearchGroups(item, '''dunk">([^>]+?)<''', 1, True)[0].strip()
  6874. if phImage.startswith('//'): phImage = 'http:' + phImage
  6875. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  6876. if phTitle:
  6877. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)],'', phImage, None))
  6878. if next:
  6879. valTab.append(CDisplayListItem('Next', next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  6880. return valTab
  6881. if 'watchpornx' == name:
  6882. printDBG( 'Host listsItems begin name='+name )
  6883. self.MAIN_URL = 'https://watchpornx.com'
  6884. COOKIEFILE = os_path.join(GetCookieDir(), 'watchpornx.cookie')
  6885. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6886. sts, data = self.getPage(url, 'watchpornx.cookie', 'watchpornx.com', self.defaultParams)
  6887. if not sts: return ''
  6888. printDBG( 'Host listsItems data: '+data )
  6889. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="cat-item', '</li>')
  6890. for item in data:
  6891. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6892. phTitle = self._cleanHtmlStr(item)
  6893. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  6894. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6895. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'watchpornx-clips', '', None))
  6896. valTab.sort(key=lambda poz: poz.name)
  6897. valTab.insert(0,CDisplayListItem("--- Pornstars ---","Pornstars", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'watchpornx-years', '',"Pornstars"))
  6898. valTab.insert(0,CDisplayListItem("--- Years ---","Years", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'watchpornx-years', '',"Years"))
  6899. valTab.insert(0,CDisplayListItem("--- Studios ---","Studios", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'watchpornx-years', '',"Studios"))
  6900. #valTab.insert(0,CDisplayListItem("--- Clips & Scenes ---","Clips & Scenes", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/category/clips-scenes'], 'watchpornx-clips', '',self.MAIN_URL))
  6901. valTab.insert(0,CDisplayListItem("--- Featured ---","Featured", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/category/featured-movies'], 'watchpornx-clips', '',self.MAIN_URL))
  6902. valTab.insert(0,CDisplayListItem("--- New ---","New", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL], 'watchpornx-clips', '', None))
  6903. self.SEARCH_proc='watchpornx-search'
  6904. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  6905. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  6906. return valTab
  6907. if 'watchpornx-search' == name:
  6908. printDBG( 'Host listsItems begin name='+name )
  6909. valTab = self.listsItems(-1, 'https://watchpornx.com/?s=%s' % url.replace(' ','+'), 'watchpornx-clips')
  6910. return valTab
  6911. if 'watchpornx-clips' == name:
  6912. printDBG( 'Host listsItems begin name='+name )
  6913. COOKIEFILE = os_path.join(GetCookieDir(), 'watchpornx.cookie')
  6914. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6915. sts, data = self.getPage(url, 'watchpornx.cookie', 'watchpornx.com', self.defaultParams)
  6916. if not sts: return ''
  6917. printDBG( 'Host listsItems data: '+data )
  6918. catUrl = self.currList[Index].possibleTypesOfSearch
  6919. next_page = self.cm.ph.getSearchGroups(data, '''<link\s*rel=['"]next['"]\s*href=['"]([^"^']+?)['"]''', 1, True)[0]
  6920. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<article', '</article>')
  6921. for item in data:
  6922. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6923. phTitle = self.cm.ph.getSearchGroups(item, '''Title">([^>]+?)<''', 1, True)[0]
  6924. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  6925. phTime = self.cm.ph.getSearchGroups(item, '''rel="tag">([^>]+?)<''', 1, True)[0]
  6926. if phImage.startswith('//'): phImage = 'http:' + phImage
  6927. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  6928. if not 'Ubiqfile' in phTitle:
  6929. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle)+'\n'+phTime,CDisplayListItem.TYPE_CATEGORY, [phUrl],'watchpornx-serwer', phImage, phTitle))
  6930. if next_page:
  6931. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  6932. return valTab
  6933. if 'watchpornx-serwer' == name:
  6934. printDBG( 'Host listsItems begin name='+name )
  6935. COOKIEFILE = os_path.join(GetCookieDir(), 'watchpornx.cookie')
  6936. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6937. sts, data = self.getPage(url, 'watchpornx.cookie', 'watchpornx.com', self.defaultParams)
  6938. if not sts: return ''
  6939. printDBG( 'Host listsItems data: '+data )
  6940. catUrl = self.currList[Index].possibleTypesOfSearch
  6941. phImage = self.cm.ph.getSearchGroups(data, '''"og:image" content=['"]([^"^']+?)['"]''', 1, True)[0]
  6942. #data = self.cm.ph.getDataBeetwenMarkers(data, '<div class="entry-content">', '</div>', False)[1]
  6943. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li class="hosts', '</li>')
  6944. for item in data:
  6945. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6946. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  6947. if '/goto/' in phUrl:
  6948. self.defaultParams['header']['Referer'] = url
  6949. sts, data = self._getPage(phUrl, self.defaultParams)
  6950. if not sts: return
  6951. printDBG( 'Host listsItems data2: '+str(data) )
  6952. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  6953. printDBG( 'Host listsItems phUrl: '+str(phUrl) )
  6954. if '/goto/' in phUrl:
  6955. sts, data = self._getPage(phUrl, self.defaultParams)
  6956. if not sts: return
  6957. printDBG( 'Host listsItems data2: '+str(data) )
  6958. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  6959. if '/goto/' in phUrl:
  6960. sts, data = self._getPage(phUrl, self.defaultParams)
  6961. if not sts: return
  6962. printDBG( 'Host listsItems data2: '+str(data) )
  6963. phUrl = self.cm.ph.getSearchGroups(data, '''url=([^"^']+?)['"]''', 1, True)[0]
  6964. phUrl = urlparser.decorateUrl(phUrl, {'Referer': url})
  6965. valTab.append(CDisplayListItem(decodeHtml(phTitle),phUrl,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  6966. return valTab
  6967. if 'watchpornx-years' == name:
  6968. printDBG( 'Host listsItems begin name='+name )
  6969. COOKIEFILE = os_path.join(GetCookieDir(), 'watchpornx.cookie')
  6970. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': False, 'cookiefile': COOKIEFILE}
  6971. sts, data = self.getPage(url, 'watchpornx.cookie', 'watchpornx.com', self.defaultParams)
  6972. if not sts: return ''
  6973. printDBG( 'Host listsItems data: '+data )
  6974. catUrl = self.currList[Index].possibleTypesOfSearch
  6975. #printDBG( 'Host catUrl: '+str(catUrl) )
  6976. if catUrl == 'Studios':
  6977. data = self.cm.ph.getDataBeetwenMarkers(data, 'Studios<', '</ul>', False)[1]
  6978. elif catUrl == 'Years':
  6979. data = self.cm.ph.getDataBeetwenMarkers(data, 'Years', '</ul>', False)[1]
  6980. elif catUrl == 'Pornstars':
  6981. data = self.cm.ph.getDataBeetwenMarkers(data, 'Pornstars', '</ul>', False)[1]
  6982. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li', '</li>')
  6983. for item in data:
  6984. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  6985. phTitle = self._cleanHtmlStr(item)
  6986. if phUrl.startswith('//'): phUrl = 'http:' + phUrl + '/'
  6987. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  6988. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl],'watchpornx-clips', '', None))
  6989. return valTab
  6990. if 'volimeee' == name:
  6991. printDBG( 'Host listsItems begin name='+name )
  6992. self.MAIN_URL = 'https://www.volimeee.com'
  6993. COOKIEFILE = os_path.join(GetCookieDir(), 'volimeee.cookie')
  6994. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  6995. sts, data = self.getPage(url, 'volimeee.cookie', 'volimeee.com', self.defaultParams)
  6996. if not sts: return ''
  6997. printDBG( 'Host listsItems data: '+data )
  6998. data = data.split('<div class="pull-right">')
  6999. if len(data): del data[0]
  7000. for item in data:
  7001. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7002. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7003. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7004. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7005. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7006. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7007. if phImage.startswith('//'): phImage = 'http:' + phImage + '/'
  7008. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7009. if not 'CCBIll' in phTitle:
  7010. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?type=public'],'volimeee-clips', phImage, None))
  7011. valTab.sort(key=lambda poz: poz.name)
  7012. valTab.insert(0,CDisplayListItem("--- HD ---","HD", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/hd?type=public'], 'volimeee-clips', '',None))
  7013. valTab.insert(0,CDisplayListItem("--- Videos ---","Videos", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/videos?type=public'], 'volimeee-clips', '',None))
  7014. self.SEARCH_proc='volimeee-search'
  7015. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7016. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7017. return valTab
  7018. if 'volimeee-search' == name:
  7019. printDBG( 'Host listsItems begin name='+name )
  7020. valTab = self.listsItems(-1, 'https://www.volimeee.com/search/videos?search_query=%s' % url.replace(' ','+'), 'volimeee-clips')
  7021. return valTab
  7022. if 'volimeee-clips' == name:
  7023. printDBG( 'Host listsItems begin name='+name )
  7024. COOKIEFILE = os_path.join(GetCookieDir(), 'volimeee.cookie')
  7025. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7026. sts, data = self.getPage(url, 'volimeee.cookie', 'volimeee.com', self.defaultParams)
  7027. if not sts: return valTab
  7028. printDBG( 'Host listsItems data: '+data )
  7029. catUrl = self.currList[Index].possibleTypesOfSearch
  7030. next_page = self.cm.ph.getDataBeetwenMarkers(data, 'class="pagination', '&raquo', False)[1]
  7031. n = '<div class="video-views pull-right'
  7032. s = '<div class="video-rating pull-right'
  7033. if not n in data and not s in data: return valTab
  7034. if n in data: data = data.split(n)
  7035. if s in data: data = data.split(s)
  7036. if len(data): del data[0]
  7037. for item in data:
  7038. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7039. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7040. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7041. phTime = self.cm.ph.getSearchGroups(item, '''class="duration">([^>]+?)<''', 1, True)[0].strip()
  7042. Added = self.cm.ph.getSearchGroups(item, '''added">([^>]+?)<''', 1, True)[0].strip()
  7043. if not Added: Added = self.cm.ph.getSearchGroups(item, '''pull-left">([^>]+?)<''', 1, True)[0].strip()
  7044. if phImage.startswith('//'): phImage = 'http:' + phImage
  7045. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7046. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7047. if 'label-private">PRIVATE<' in item: phTitle = phTitle + ' {PRIVATE}'
  7048. if not 'CCBIll' in phTitle:
  7049. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7050. if next_page:
  7051. next_page = re.compile('href=[\"|\'](.*?)[\"|\']').findall(next_page)[-1]
  7052. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  7053. valTab.append(CDisplayListItem('Next', next_page.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7054. return valTab
  7055. if 'P720' == name:
  7056. printDBG( 'Host listsItems begin name='+name )
  7057. self.MAIN_URL = 'https://p720.net'
  7058. COOKIEFILE = os_path.join(GetCookieDir(), 'P720.cookie')
  7059. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7060. sts, data = self.getPage(url, 'P720.cookie', 'p720.net', self.defaultParams)
  7061. if not sts: return ''
  7062. printDBG( 'Host listsItems data: '+data )
  7063. data = data.split('<a class="item"')
  7064. if len(data): del data[0]
  7065. for item in data:
  7066. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7067. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7068. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7069. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7070. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7071. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7072. if phImage.startswith('//'): phImage = 'http:' + phImage + '/'
  7073. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7074. if not 'CCBIll' in phTitle:
  7075. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'P720-clips', phImage, None))
  7076. valTab.sort(key=lambda poz: poz.name)
  7077. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/most-popular/'+'?sort_by=post_date'], 'P720-clips', '',None))
  7078. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/top-rated/'+'?sort_by=post_date'], 'P720-clips', '',None))
  7079. valTab.insert(0,CDisplayListItem("--- Latest ---","Latest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/latest-updates/'+'?sort_by=post_date'], 'P720-clips', '',None))
  7080. valTab.insert(0,CDisplayListItem("--- Home ---","Home", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/?sort_by=post_date'], 'P720-clips', '',None))
  7081. self.SEARCH_proc='P720-search'
  7082. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7083. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7084. return valTab
  7085. if 'P720-search' == name:
  7086. printDBG( 'Host listsItems begin name='+name )
  7087. valTab = self.listsItems(-1, 'https://p720.net/search/%s/?sort_by=post_date' % url.replace(' ','+'), 'P720-clips')
  7088. return valTab
  7089. if 'P720-clips' == name:
  7090. printDBG( 'Host listsItems begin name='+name )
  7091. COOKIEFILE = os_path.join(GetCookieDir(), 'P720.cookie')
  7092. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7093. sts, data = self.getPage(url, 'P720.cookie', 'p720.net', self.defaultParams)
  7094. if not sts: return valTab
  7095. printDBG( 'Host listsItems data: '+data )
  7096. catUrl = self.currList[Index].possibleTypesOfSearch
  7097. next = self.cm.ph.getSearchGroups(data, '''(\d)">Next''', 1, True)[0]
  7098. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'id="list_videos_most_recent_videos', 'footer', False)[1]
  7099. if data2: data = data2
  7100. n = '<div class="item'
  7101. s = '<div class="video-rating pull-right'
  7102. if not n in data and not s in data: return valTab
  7103. if n in data: data = data.split(n)
  7104. if s in data: data = data.split(s)
  7105. if len(data): del data[0]
  7106. for item in data:
  7107. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7108. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7109. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  7110. phTime = self.cm.ph.getSearchGroups(item, '''class="duration">([^>]+?)<''', 1, True)[0].strip()
  7111. Added = self.cm.ph.getSearchGroups(item, '''added"><em>([^>]+?)<''', 1, True)[0].strip()
  7112. if not Added: Added = self.cm.ph.getSearchGroups(item, '''pull-left">([^>]+?)<''', 1, True)[0].strip()
  7113. if phImage.startswith('//'): phImage = 'http:' + phImage
  7114. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7115. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7116. if 'label-private">PRIVATE<' in item: phTitle = phTitle + ' {PRIVATE}'
  7117. if not 'CCBIll' in phTitle:
  7118. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7119. if next:
  7120. next_page = url.replace('&'+url.split('&')[-1],'')+'&from='+str(next)
  7121. if '/search/' in url: next_page = url.replace('&'+url.split('&')[-1],'')+'&from_videos='+str(next)
  7122. #valTab.append(CDisplayListItem('Next', next_page.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7123. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7124. return valTab
  7125. if 'pornopersik' == name:
  7126. printDBG( 'Host listsItems begin name='+name )
  7127. self.MAIN_URL = 'https://pornopersik.com'
  7128. COOKIEFILE = os_path.join(GetCookieDir(), 'pornopersik.cookie')
  7129. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7130. sts, data = self.getPage(url, 'pornopersik.cookie', 'pornopersik.com', self.defaultParams)
  7131. if not sts: return ''
  7132. printDBG( 'Host listsItems data: '+data )
  7133. data = data.split('<a class="item"')
  7134. if len(data): del data[0]
  7135. for item in data:
  7136. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7137. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7138. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7139. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7140. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7141. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7142. if phImage.startswith('//'): phImage = 'http:' + phImage + '/'
  7143. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7144. if not 'CCBIll' in phTitle:
  7145. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'pornopersik-clips', phImage, None))
  7146. valTab.sort(key=lambda poz: poz.name)
  7147. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/most-popular/'+'?sort_by=post_date'], 'pornopersik-clips', '',None))
  7148. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/top-rated/'+'?sort_by=post_date'], 'pornopersik-clips', '',None))
  7149. valTab.insert(0,CDisplayListItem("--- Latest ---","Latest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/latest-updates/'+'?sort_by=post_date'], 'pornopersik-clips', '',None))
  7150. valTab.insert(0,CDisplayListItem("--- Home ---","Home", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/?sort_by=post_date'], 'pornopersik-clips', '',None))
  7151. self.SEARCH_proc='pornopersik-search'
  7152. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7153. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7154. return valTab
  7155. if 'pornopersik-search' == name:
  7156. printDBG( 'Host listsItems begin name='+name )
  7157. valTab = self.listsItems(-1, 'https://pornopersik.com/search/%s/?sort_by=post_date' % url.replace(' ','+'), 'pornopersik-clips')
  7158. return valTab
  7159. if 'pornopersik-clips' == name:
  7160. printDBG( 'Host listsItems begin name='+name )
  7161. COOKIEFILE = os_path.join(GetCookieDir(), 'pornopersik.cookie')
  7162. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7163. sts, data = self.getPage(url, 'pornopersik.cookie', 'pornopersik.com', self.defaultParams)
  7164. if not sts: return valTab
  7165. printDBG( 'Host listsItems data: '+data )
  7166. catUrl = self.currList[Index].possibleTypesOfSearch
  7167. next = self.cm.ph.getSearchGroups(data, '''class="next".*?from:(\d)"''', 1, True)[0]
  7168. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'id="list_videos_most_recent_videos', 'footer', False)[1]
  7169. if data2: data = data2
  7170. n = '<div class="item'
  7171. s = '<div class="video-rating pull-right'
  7172. if not n in data and not s in data: return valTab
  7173. if n in data: data = data.split(n)
  7174. if s in data: data = data.split(s)
  7175. if len(data): del data[0]
  7176. for item in data:
  7177. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7178. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7179. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  7180. phTime = self.cm.ph.getSearchGroups(item, '''class="duration">([^>]+?)<''', 1, True)[0].strip()
  7181. Added = self.cm.ph.getSearchGroups(item, '''added"><em>([^>]+?)<''', 1, True)[0].strip()
  7182. if not Added: Added = self.cm.ph.getSearchGroups(item, '''pull-left">([^>]+?)<''', 1, True)[0].strip()
  7183. if phImage.startswith('//'): phImage = 'http:' + phImage
  7184. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7185. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7186. if 'label-private">PRIVATE<' in item: phTitle = phTitle + ' {PRIVATE}'
  7187. if not 'CCBIll' in phTitle:
  7188. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7189. if next:
  7190. next_page = url.replace('&'+url.split('&')[-1],'')+'&from='+str(next)
  7191. if '/search/' in url: next_page = url.replace('&'+url.split('&')[-1],'')+'&from_videos='+str(next)
  7192. #valTab.append(CDisplayListItem('Next', next_page.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7193. valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7194. return valTab
  7195. if 'ANYPORN' == name:
  7196. printDBG( 'Host listsItems begin name='+name )
  7197. self.MAIN_URL = 'https://anyporn.com'
  7198. COOKIEFILE = os_path.join(GetCookieDir(), 'anyporn.cookie')
  7199. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7200. sts, data = self.getPage(url, 'anyporn.cookie', 'anyporn.com', self.defaultParams)
  7201. if not sts: return ''
  7202. printDBG( 'Host listsItems data: '+data )
  7203. data = data.split('<a class="item"')
  7204. if len(data): del data[0]
  7205. for item in data:
  7206. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7207. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7208. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7209. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7210. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7211. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7212. if phImage.startswith('//'): phImage = 'http:' + phImage + '/'
  7213. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7214. if not 'CCBIll' in phTitle:
  7215. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'anyporn-clips', phImage, None))
  7216. valTab.sort(key=lambda poz: poz.name)
  7217. valTab.insert(0,CDisplayListItem("--- HD ---","HD", CDisplayListItem.TYPE_CATEGORY,['https://anyporn.com/categories/hd/?sort_by=post_date'], 'anyporn-clips', '',None))
  7218. valTab.insert(0,CDisplayListItem("--- Most Viewed ---","Most Viewed", CDisplayListItem.TYPE_CATEGORY,['https://anyporn.com/popular/?sort_by=post_date'], 'anyporn-clips', '',None))
  7219. valTab.insert(0,CDisplayListItem("--- Latest ---","Latest", CDisplayListItem.TYPE_CATEGORY,['https://anyporn.com/newest/?sort_by=post_date'], 'anyporn-clips', '',None))
  7220. #valTab.insert(0,CDisplayListItem("--- Home ---","Home", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/?sort_by=post_date'], 'anyporn-clips', '',None))
  7221. self.SEARCH_proc='anyporn-search'
  7222. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7223. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7224. return valTab
  7225. if 'anyporn-search' == name:
  7226. printDBG( 'Host listsItems begin name='+name )
  7227. valTab = self.listsItems(-1, 'https://anyporn.com/search/%s/' % url.replace(' ','+'), 'anyporn-clips')
  7228. return valTab
  7229. if 'anyporn-clips' == name:
  7230. printDBG( 'Host listsItems begin name='+name )
  7231. COOKIEFILE = os_path.join(GetCookieDir(), 'anyporn.cookie')
  7232. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7233. sts, data = self.getPage(url, 'anyporn.cookie', 'anyporn.com', self.defaultParams)
  7234. if not sts: return valTab
  7235. printDBG( 'Host listsItems data: '+data )
  7236. catUrl = self.currList[Index].possibleTypesOfSearch
  7237. next = self.cm.ph.getSearchGroups(data, '''next".*?from:(\d)">Next''', 1, True)[0]
  7238. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'id="list_videos_most_recent_videos', 'footer', False)[1]
  7239. if data2: data = data2
  7240. n = "<div class='item"
  7241. s = '<div class="video-rating pull-right'
  7242. if not n in data and not s in data: return valTab
  7243. if n in data: data = data.split(n)
  7244. if s in data: data = data.split(s)
  7245. if len(data): del data[0]
  7246. for item in data:
  7247. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7248. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7249. phImage = self.cm.ph.getSearchGroups(item, '''data-original=['"]([^"^']+?)['"]''', 1, True)[0]
  7250. phTime = self.cm.ph.getSearchGroups(item, '''durationid.*?innerHTML\s*?=\s*?"([^"^']+?)"''', 1, True)[0].strip()
  7251. Added = self.cm.ph.getSearchGroups(item, '''added"><em>([^>]+?)<''', 1, True)[0].strip()
  7252. if not Added: Added = self.cm.ph.getSearchGroups(item, '''pull-left">([^>]+?)<''', 1, True)[0].strip()
  7253. if phImage.startswith('//'): phImage = 'http:' + phImage
  7254. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7255. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7256. if 'label-private">PRIVATE<' in item: phTitle = phTitle + ' {PRIVATE}'
  7257. if not 'CCBIll' in phTitle:
  7258. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7259. if next:
  7260. if '?' in url:
  7261. next_page = url.replace('&'+url.split('&')[-1],'')+'&from='+str(next)
  7262. else:
  7263. next_page = url.replace('&'+url.split('&')[-1],'')+'?from='+str(next)
  7264. if '/search/' in url: next_page = url.replace('&'+url.split('&')[-1],'')+'&from_videos='+str(next)
  7265. #valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7266. valTab.append(CDisplayListItem('Next', next_page.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7267. return valTab
  7268. if 'ANON-V' == name:
  7269. printDBG( 'Host listsItems begin name='+name )
  7270. self.MAIN_URL = 'https://anon-v.com'
  7271. COOKIEFILE = os_path.join(GetCookieDir(), 'anon-v.cookie')
  7272. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7273. sts, data = self.getPage(url, 'anon-v.cookie', 'anon-v.com', self.defaultParams)
  7274. if not sts: return ''
  7275. printDBG( 'Host listsItems data: '+data )
  7276. data = data.split('<a class="item"')
  7277. if len(data): del data[0]
  7278. for item in data:
  7279. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7280. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7281. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7282. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7283. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7284. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7285. if phImage.startswith('//'): phImage = 'http:' + phImage + '/'
  7286. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7287. if not 'CCBIll' in phTitle:
  7288. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'anon-v-clips', phImage, None))
  7289. valTab.sort(key=lambda poz: poz.name)
  7290. #valTab.insert(0,CDisplayListItem("--- Most Popular ---","Most Popular", CDisplayListItem.TYPE_CATEGORY,['https://anon-v.com/most-popular/?sort_by=post_date'], 'anon-v-clips', '',None))
  7291. valTab.insert(0,CDisplayListItem("--- Latest ---","Latest", CDisplayListItem.TYPE_CATEGORY,['https://anon-v.com/latest-updates/?sort_by=post_date'], 'anon-v-clips', '',None))
  7292. self.SEARCH_proc='anon-v-search'
  7293. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7294. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7295. return valTab
  7296. if 'anon-v-search' == name:
  7297. printDBG( 'Host listsItems begin name='+name )
  7298. valTab = self.listsItems(-1, 'https://anon-v.com/search/%s/' % url.replace(' ','+'), 'anon-v-clips')
  7299. return valTab
  7300. if 'anon-v-clips' == name:
  7301. printDBG( 'Host listsItems begin name='+name )
  7302. COOKIEFILE = os_path.join(GetCookieDir(), 'anon-v.cookie')
  7303. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7304. sts, data = self.getPage(url, 'anon-v.cookie', 'anon-v.com', self.defaultParams)
  7305. if not sts: return valTab
  7306. printDBG( 'Host listsItems data: '+data )
  7307. catUrl = self.currList[Index].possibleTypesOfSearch
  7308. next = self.cm.ph.getSearchGroups(data, '''next".*?from:(\d)">Next''', 1, True)[0]
  7309. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'id="list_videos_most_recent_videos', 'footer', False)[1]
  7310. if data2: data = data2
  7311. n = '<div class="item'
  7312. s = '<div class="video-rating pull-right'
  7313. if not n in data and not s in data: return valTab
  7314. if n in data: data = data.split(n)
  7315. if s in data: data = data.split(s)
  7316. if len(data): del data[0]
  7317. for item in data:
  7318. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7319. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7320. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7321. phTime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0].strip()
  7322. Added = self.cm.ph.getSearchGroups(item, '''added"><em>([^>]+?)<''', 1, True)[0].strip()
  7323. if not Added: Added = self.cm.ph.getSearchGroups(item, '''pull-left">([^>]+?)<''', 1, True)[0].strip()
  7324. if phImage.startswith('//'): phImage = 'http:' + phImage
  7325. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7326. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7327. phImage = strwithmeta(phImage, {'Referer':self.MAIN_URL})
  7328. if not 'CCBIll' in phTitle:
  7329. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7330. if next:
  7331. if '?' in url:
  7332. next_page = url.replace('&'+url.split('&')[-1],'')+'&from='+str(next)
  7333. else:
  7334. next_page = url.replace('&'+url.split('&')[-1],'')+'?from='+str(next)
  7335. if '/search/' in url: next_page = url.replace('&'+url.split('&')[-1],'')+'&from_videos='+str(next)
  7336. #valTab.append(CDisplayListItem('Next', next_page, CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7337. valTab.append(CDisplayListItem('Next', next_page.split('=')[-1], CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7338. return valTab
  7339. if 'bravoporn' == name:
  7340. printDBG( 'Host listsItems begin name='+name )
  7341. self.MAIN_URL = 'https://www.bravoporn.com'
  7342. COOKIEFILE = os_path.join(GetCookieDir(), 'bravoporn.cookie')
  7343. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7344. sts, data = self.getPage(url, 'bravoporn.cookie', 'bravoporn.com', self.defaultParams)
  7345. if not sts: return valTab
  7346. printDBG( 'Host listsItems data: '+data )
  7347. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<li', '</li>')
  7348. for item in data:
  7349. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7350. if not '/c/' in phUrl: continue
  7351. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7352. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7353. if phTitle=='': continue
  7354. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7355. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7356. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7357. if phImage.startswith('//'): phImage = 'http:' + phImage + '/'
  7358. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7359. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'bravoporn-clips', phImage, None))
  7360. valTab.sort(key=lambda poz: poz.name)
  7361. valTab.insert(0,CDisplayListItem("--- Popular ---","Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/most-popular/'], 'bravoporn-clips', '',None))
  7362. valTab.insert(0,CDisplayListItem("--- Newest ---","Newest", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/latest-updates/'], 'bravoporn-clips', '',None))
  7363. self.SEARCH_proc='bravoporn-search'
  7364. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7365. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7366. return valTab
  7367. if 'bravoporn-search' == name:
  7368. printDBG( 'Host listsItems begin name='+name )
  7369. valTab = self.listsItems(-1, 'https://www.bravoporn.com/s/?q=%s' % url.replace(' ','+'), 'bravoporn-clips')
  7370. return valTab
  7371. if 'bravoporn-clips' == name:
  7372. printDBG( 'Host listsItems begin name='+name )
  7373. COOKIEFILE = os_path.join(GetCookieDir(), 'bravoporn.cookie')
  7374. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7375. sts, data = self.getPage(url, 'bravoporn.cookie', 'bravoporn.com', self.defaultParams)
  7376. if not sts: return valTab
  7377. printDBG( 'Host listsItems data: '+data )
  7378. catUrl = self.currList[Index].possibleTypesOfSearch
  7379. next = self.cm.ph.getSearchGroups(data, '''<a href=['"]([^"^']+?)['"]\sclass="next nopop"''', 1, True)[0]
  7380. n = 'class="video_block'
  7381. s = '<div class="video-rating pull-right'
  7382. if not n in data and not s in data: return valTab
  7383. if n in data: data = data.split(n)
  7384. if s in data: data = data.split(s)
  7385. if len(data): del data[0]
  7386. for item in data:
  7387. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7388. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7389. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7390. phTime = self.cm.ph.getSearchGroups(item, '''time">([^>]+?)<''', 1, True)[0].strip()
  7391. Added = self.cm.ph.getSearchGroups(item, '''added"><em>([^>]+?)<''', 1, True)[0].strip()
  7392. if not Added: Added = self.cm.ph.getSearchGroups(item, '''pull-left">([^>]+?)<''', 1, True)[0].strip()
  7393. if phImage.startswith('//'): phImage = 'http:' + phImage
  7394. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7395. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7396. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7397. if next:
  7398. #printDBG( 'Host listsItems next: '+next )
  7399. if next.startswith('/'): next = self.MAIN_URL + next
  7400. valTab.append(CDisplayListItem(_("Next page"), 'Page: '+next.split('/')[-2], CDisplayListItem.TYPE_CATEGORY, [next], name, '', None))
  7401. return valTab
  7402. if 'bravoteens' == name:
  7403. printDBG( 'Host listsItems begin name='+name )
  7404. self.MAIN_URL = 'https://www.bravoteens.com'
  7405. COOKIEFILE = os_path.join(GetCookieDir(), 'bravoteens.cookie')
  7406. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7407. sts, data = self.getPage(url, 'bravoteens.cookie', 'bravoteens.com', self.defaultParams)
  7408. if not sts: return ''
  7409. printDBG( 'Host listsItems data: '+data )
  7410. data = data.split('<div class="preview-item">')
  7411. if len(data): del data[0]
  7412. for item in data:
  7413. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7414. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7415. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7416. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7417. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7418. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7419. if phImage.startswith('//'): phImage = 'https:' + phImage
  7420. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7421. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'bravoteens-clips', phImage, None))
  7422. valTab.sort(key=lambda poz: poz.name)
  7423. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/top/'], 'bravoteens-clips', '',None))
  7424. valTab.insert(0,CDisplayListItem("--- Popular ---","Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/popular/'], 'bravoteens-clips', '',None))
  7425. valTab.insert(0,CDisplayListItem("--- New ---","New", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/new/'], 'bravoteens-clips', '',None))
  7426. self.SEARCH_proc='bravoteens-search'
  7427. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7428. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7429. return valTab
  7430. if 'bravoteens-search' == name:
  7431. printDBG( 'Host listsItems begin name='+name )
  7432. valTab = self.listsItems(-1, 'https://www.bravoteens.com/search/?q=%s' % url.replace(' ','+'), 'bravoteens-clips')
  7433. return valTab
  7434. if 'bravoteens-clips' == name:
  7435. printDBG( 'Host listsItems begin name='+name )
  7436. COOKIEFILE = os_path.join(GetCookieDir(), 'bravoteens.cookie')
  7437. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7438. sts, data = self.getPage(url, 'bravoteens.cookie', 'bravoteens.com', self.defaultParams)
  7439. if not sts: return valTab
  7440. printDBG( 'Host listsItems data: '+data )
  7441. catUrl = self.currList[Index].possibleTypesOfSearch
  7442. next = self.cm.ph.getDataBeetwenMarkers(data, 'class="pagination', '</div>', False)[1]
  7443. n = 'class="preview-item"'
  7444. s = '<div class="video-rating pull-right'
  7445. if not n in data and not s in data: return valTab
  7446. if n in data: data = data.split(n)
  7447. if s in data: data = data.split(s)
  7448. if len(data): del data[0]
  7449. for item in data:
  7450. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7451. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7452. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7453. phTime = self.cm.ph.getSearchGroups(item, '''time">([^>]+?)<''', 1, True)[0].strip()
  7454. Added = self.cm.ph.getSearchGroups(item, '''date">([^>]+?)<''', 1, True)[0].strip()
  7455. if phImage.startswith('//'): phImage = 'http:' + phImage
  7456. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7457. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7458. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7459. if next:
  7460. try:
  7461. next_page = re.compile('</span>.+?<a href="(.+?)"', re.DOTALL).findall(next)[-1]
  7462. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  7463. valTab.append(CDisplayListItem(_("Next page"), 'Page: '+next_page.split('/')[-2], CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7464. except Exception:
  7465. printExc()
  7466. return valTab
  7467. if 'sleazyneasy' == name:
  7468. printDBG( 'Host listsItems begin name='+name )
  7469. self.MAIN_URL = 'https://www.sleazyneasy.com'
  7470. COOKIEFILE = os_path.join(GetCookieDir(), 'sleazyneasy.cookie')
  7471. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7472. sts, data = self.getPage(url, 'sleazyneasy.cookie', 'sleazyneasy.com', self.defaultParams)
  7473. if not sts: return ''
  7474. printDBG( 'Host listsItems data: '+data )
  7475. data = data.split('<div class="thumb">')
  7476. if len(data): del data[0]
  7477. for item in data:
  7478. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7479. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7480. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7481. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7482. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7483. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7484. if phImage.startswith('//'): phImage = 'https:' + phImage
  7485. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7486. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'sleazyneasy-clips', phImage, None))
  7487. valTab.sort(key=lambda poz: poz.name)
  7488. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/top-rated/'], 'sleazyneasy-clips', '',None))
  7489. valTab.insert(0,CDisplayListItem("--- Popular ---","Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/most-popular/'], 'sleazyneasy-clips', '',None))
  7490. valTab.insert(0,CDisplayListItem("--- New ---","New", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/latest-updates/'], 'sleazyneasy-clips', '',None))
  7491. self.SEARCH_proc='sleazyneasy-search'
  7492. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7493. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7494. return valTab
  7495. if 'sleazyneasy-search' == name:
  7496. printDBG( 'Host listsItems begin name='+name )
  7497. valTab = self.listsItems(-1, 'https://www.sleazyneasy.com/search/?q=%s' % url.replace(' ','+'), 'sleazyneasy-clips')
  7498. return valTab
  7499. if 'sleazyneasy-clips' == name:
  7500. printDBG( 'Host listsItems begin name='+name )
  7501. COOKIEFILE = os_path.join(GetCookieDir(), 'sleazyneasy.cookie')
  7502. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7503. sts, data = self.getPage(url, 'sleazyneasy.cookie', 'sleazyneasy.com', self.defaultParams)
  7504. if not sts: return valTab
  7505. printDBG( 'Host listsItems data: '+data )
  7506. catUrl = self.currList[Index].possibleTypesOfSearch
  7507. next = self.cm.ph.getDataBeetwenMarkers(data, 'class="pager', '</div>', False)[1]
  7508. n = '<span class="thumb-info">'
  7509. s = '<div class="video-rating pull-right'
  7510. if not n in data and not s in data: return valTab
  7511. if n in data: data = data.split(n)
  7512. if s in data: data = data.split(s)
  7513. if len(data): del data[0]
  7514. for item in data:
  7515. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"](https://www.sleazyneasy.com/videos/[^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  7516. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7517. if phTitle=='ASACP': continue
  7518. phImage = self.cm.ph.getSearchGroups(item, '''data-poster=['"]([^"^']+?)['"]''', 1, True)[0]
  7519. phTime = self.cm.ph.getSearchGroups(item, '''<i>([^>]+?)<''', 1, True)[0].strip()
  7520. Added = self.cm.ph.getSearchGroups(item, '''truncate">([^>]+?)<''', 1, True)[0].strip()
  7521. if phImage.startswith('//'): phImage = 'http:' + phImage
  7522. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7523. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7524. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7525. if next:
  7526. try:
  7527. next_page = re.compile('href="(.+?)"', re.DOTALL).findall(next)[-1]
  7528. if next_page.startswith('/'): next_page = self.MAIN_URL + next_page
  7529. valTab.append(CDisplayListItem(_("Next page"), 'Page: '+next_page.split('/')[-2], CDisplayListItem.TYPE_CATEGORY, [next_page], name, '', None))
  7530. except Exception:
  7531. printExc()
  7532. return valTab
  7533. if 'vjav' == name:
  7534. printDBG( 'Host listsItems begin name='+name )
  7535. self.MAIN_URL = 'https://vjav.com'
  7536. COOKIEFILE = os_path.join(GetCookieDir(), 'vjav.cookie')
  7537. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7538. sts, data = self.getPage(url, 'vjav.cookie', 'vjav.com', self.defaultParams)
  7539. if not sts: return ''
  7540. printDBG( 'Host listsItems data: '+data )
  7541. data = data.split('<a class="item')
  7542. if len(data): del data[0]
  7543. for item in data:
  7544. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7545. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7546. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7547. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7548. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7549. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7550. if phImage.startswith('//'): phImage = 'https:' + phImage
  7551. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7552. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'vjav-clips', phImage, None))
  7553. valTab.sort(key=lambda poz: poz.name)
  7554. valTab.insert(0,CDisplayListItem("--- Top Rated ---","Top Rated", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/top-rated/'], 'vjav-clips', '',None))
  7555. valTab.insert(0,CDisplayListItem("--- Popular ---","Popular", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/most-popular/'], 'vjav-clips', '',None))
  7556. valTab.insert(0,CDisplayListItem("--- New ---","New", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/latest-updates/'], 'vjav-clips', '',None))
  7557. self.SEARCH_proc='vjav-search'
  7558. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7559. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7560. return valTab
  7561. if 'vjav-search' == name:
  7562. printDBG( 'Host listsItems begin name='+name )
  7563. valTab = self.listsItems(-1, 'https://www.vjav.com/search/?q=%s' % url.replace(' ','+'), 'vjav-clips')
  7564. return valTab
  7565. if 'vjav-clips' == name:
  7566. printDBG( 'Host listsItems begin name='+name )
  7567. COOKIEFILE = os_path.join(GetCookieDir(), 'vjav.cookie')
  7568. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7569. sts, data = self.getPage(url, 'vjav.cookie', 'vjav.com', self.defaultParams)
  7570. if not sts: return valTab
  7571. printDBG( 'Host listsItems data: '+data )
  7572. catUrl = self.currList[Index].possibleTypesOfSearch
  7573. next = self.cm.ph.getDataBeetwenMarkers(data, '<li class="next">', '</li>', False)[1]
  7574. n = 'data-id='
  7575. s = '<div class="video-rating pull-right'
  7576. if not n in data and not s in data: return valTab
  7577. if n in data: data = data.split(n)
  7578. if s in data: data = data.split(s)
  7579. if len(data): del data[0]
  7580. for item in data:
  7581. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  7582. phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7583. if phTitle=='ASACP': continue
  7584. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7585. phTime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0].strip()
  7586. Added = self.cm.ph.getSearchGroups(item, '''truncate">([^>]+?)<''', 1, True)[0].strip()
  7587. if phImage.startswith('//'): phImage = 'http:' + phImage
  7588. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7589. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7590. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7591. if next:
  7592. try:
  7593. page = self.cm.ph.getSearchGroups(str(next), '''page:([^"^']+?)['"]''')[0]
  7594. url = url.replace(url.split('/')[-1],'')
  7595. next = url + '?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from='+page
  7596. valTab.append(CDisplayListItem('Next', 'Page : '+page, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'Next'))
  7597. except Exception:
  7598. printExc()
  7599. return valTab
  7600. if 'javhoho' == name:
  7601. printDBG( 'Host listsItems begin name='+name )
  7602. self.MAIN_URL = 'https://javhoho.com'
  7603. COOKIEFILE = os_path.join(GetCookieDir(), 'javhoho.cookie')
  7604. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7605. sts, data = self.getPage(url, 'javhoho.cookie', 'javhoho.com', self.defaultParams)
  7606. if not sts: return ''
  7607. printDBG( 'Host listsItems data: '+data )
  7608. data = data.split('<a class="item')
  7609. if len(data): del data[0]
  7610. for item in data:
  7611. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0]
  7612. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7613. if not phTitle: phTitle = self.cm.ph.getSearchGroups(item, '''alt=['"]([^"^']+?)['"]''', 1, True)[0]
  7614. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7615. if phUrl.startswith('//'): phUrl = 'https:' + phUrl + '/'
  7616. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7617. if phImage.startswith('//'): phImage = 'https:' + phImage
  7618. if phImage.startswith('/'): phImage = self.MAIN_URL + phImage
  7619. valTab.append(CDisplayListItem(decodeHtml(phTitle),decodeHtml(phTitle),CDisplayListItem.TYPE_CATEGORY, [phUrl+'?sort_by=post_date'],'javhoho-clips', phImage, None))
  7620. valTab.sort(key=lambda poz: poz.name)
  7621. valTab.insert(0,CDisplayListItem("--- Free Asian Porn ---","Free Asian Porn", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/category/free-asian-porn/'], 'javhoho-clips', '',None))
  7622. valTab.insert(0,CDisplayListItem("--- Free Korean Porn ---","Free Korean Porn", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/category/free-korean-porn/'], 'javhoho-clips', '',None))
  7623. valTab.insert(0,CDisplayListItem("--- Free Chinese Porn ---","Free Chinese Porn", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/category/free-chinese-porn/'], 'javhoho-clips', '',None))
  7624. valTab.insert(0,CDisplayListItem("--- Free JAV Censored ---","Free JAV Censored", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/category/free-jav-censored/'], 'javhoho-clips', '',None))
  7625. valTab.insert(0,CDisplayListItem("--- Free JAV Uncensored ---","Free JAV Uncensored", CDisplayListItem.TYPE_CATEGORY,[self.MAIN_URL+'/category/free-jav-uncensored/'], 'javhoho-clips', '',None))
  7626. self.SEARCH_proc='javhoho-search'
  7627. valTab.insert(0,CDisplayListItem(_('Search history'), _('Search history'), CDisplayListItem.TYPE_CATEGORY, [''], 'HISTORY', '', None))
  7628. valTab.insert(0,CDisplayListItem(_('Search'), _('Search'), CDisplayListItem.TYPE_SEARCH, [''], '', '', None))
  7629. return valTab
  7630. if 'javhoho-search' == name:
  7631. printDBG( 'Host listsItems begin name='+name )
  7632. valTab = self.listsItems(-1, 'https://javhoho.com/search/%s/' % url.replace(' ','+'), 'javhoho-clips')
  7633. return valTab
  7634. if 'javhoho-clips' == name:
  7635. printDBG( 'Host listsItems begin name='+name )
  7636. COOKIEFILE = os_path.join(GetCookieDir(), 'javhoho.cookie')
  7637. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7638. sts, data = self.getPage(url, 'javhoho.cookie', 'javhoho.com', self.defaultParams)
  7639. if not sts: return valTab
  7640. printDBG( 'Host listsItems data: '+data )
  7641. catUrl = self.currList[Index].possibleTypesOfSearch
  7642. next = self.cm.ph.getSearchGroups(data, '''<link rel="next" href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  7643. n = '<div id="post-'
  7644. s = '<div class="video-rating pull-right'
  7645. if not n in data and not s in data: return valTab
  7646. if n in data: data = data.split(n)
  7647. if s in data: data = data.split(s)
  7648. if len(data): del data[0]
  7649. for item in data:
  7650. phUrl = self.cm.ph.getSearchGroups(item, '''href=['"]([^"^']+?)['"]''', 1, True)[0].replace('&amp;','&')
  7651. phTitle = self.cm.ph.getSearchGroups(item, '''title=['"]([^"^']+?)['"]''', 1, True)[0]
  7652. if phTitle=='ASACP': continue
  7653. phImage = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  7654. phTime = self.cm.ph.getSearchGroups(item, '''duration">([^>]+?)<''', 1, True)[0].strip()
  7655. Added = self.cm.ph.getSearchGroups(item, '''date">([^>]+?)<''', 1, True)[0].strip()
  7656. if phImage.startswith('//'): phImage = 'http:' + phImage
  7657. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  7658. if phUrl.startswith('/'): phUrl = self.MAIN_URL + phUrl
  7659. valTab.append(CDisplayListItem(decodeHtml(phTitle),'['+phTime+'] '+decodeHtml(phTitle)+'\n'+Added,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None))
  7660. if next:
  7661. try:
  7662. valTab.append(CDisplayListItem('Next', 'Page : '+next, CDisplayListItem.TYPE_CATEGORY, [next], name, '', 'Next'))
  7663. except Exception:
  7664. printExc()
  7665. return valTab
  7666. return valTab
  7667. def getLinksForVideo(self, url):
  7668. printDBG("Urllist.getLinksForVideo url[%s]" % url)
  7669. videoUrls = []
  7670. uri, params = DMHelper.getDownloaderParamFromUrl(url)
  7671. printDBG(params)
  7672. uri = urlparser.decorateUrl(uri, params)
  7673. urlSupport = self.up.checkHostSupport( uri )
  7674. if 1 == urlSupport:
  7675. retTab = self.up.getVideoLinkExt( uri )
  7676. videoUrls.extend(retTab)
  7677. printDBG("Video url[%s]" % videoUrls)
  7678. return videoUrls
  7679. def getParser(self, url):
  7680. printDBG( 'Host getParser begin' )
  7681. printDBG( 'Host getParser mainurl: '+self.MAIN_URL )
  7682. printDBG( 'Host getParser url : '+url )
  7683. if url.startswith('http://www.4tube.com'): return 'http://www.4tube.com'
  7684. if url.startswith('https://www.4tube.com'): return 'http://www.4tube.com'
  7685. if url.startswith('https://www.fux.com'): return 'http://www.4tube.com'
  7686. if url.startswith('http://www.pornerbros.com'): return 'http://www.4tube.com'
  7687. if url.startswith('https://www.pornerbros.com'): return 'http://www.4tube.com'
  7688. if url.startswith('https://www.porntube.com'): return 'http://www.4tube.com'
  7689. if url.startswith('https://www.ah-me.com'): return 'http://www.ah-me.com'
  7690. if url.startswith('http://www.cliphunter.com'): return 'http://www.cliphunter.com'
  7691. if url.startswith('http://www.dachix.com'): return 'http://www.dachix.com'
  7692. if url.startswith('http://www.drtuber.com'): return 'http://www.drtuber.com'
  7693. if url.startswith('http://www.eporner.com'): return 'http://www.eporner.com'
  7694. if url.startswith('https://www.hclips.com'): return 'http://www.hclips.com'
  7695. if url.startswith('http://www.hdporn.net'): return 'http://www.hdporn.net'
  7696. if url.startswith('http://hdsite.net'): return 'https://hdsite.net'
  7697. if url.startswith('https://hdsite.net'): return 'https://hdsite.net'
  7698. if url.startswith('http://www.hdzog.com'): return 'http://www.hdzog.com'
  7699. if url.startswith('http://hentaigasm.com'): return 'http://hentaigasm.com'
  7700. if url.startswith('http://www.homemoviestube.com'): return 'http://www.homemoviestube.com'
  7701. if url.startswith('http://hotmovs.com'): return 'http://www.hdzog.com'
  7702. if url.startswith('https://www.katestube.com'): return 'https://www.katestube.com'
  7703. if url.startswith('http://www.katestube.com'): return 'https://www.katestube.com'
  7704. if url.startswith('https://www.koloporno.com'): return 'https://www.koloporno.com'
  7705. if url.startswith('https://mangovideo'): return 'https://mangovideo'
  7706. if url.startswith('https://www.pinflix.com'): return 'https://www.pinflix.com'
  7707. if url.startswith('https://videos.porndig.com'): return 'https://porndig.com'
  7708. if url.startswith('https://www.playvids.com'): return 'https://www.playvids.com'
  7709. if url.startswith('http://porndoe.com'): return 'http://porndoe.com'
  7710. if url.startswith('https://porndoe.com'): return 'http://porndoe.com'
  7711. if url.startswith('https://www.porndoe.com'): return 'http://porndoe.com'
  7712. if url.startswith('http://www.pornhd.com'): return 'http://www.pornhd.com'
  7713. if url.startswith('http://www.pornhub.com/embed/'): return 'http://www.pornhub.com/embed/'
  7714. if url.startswith('https://www.pornhub.com/embed/'): return 'http://www.pornhub.com/embed/'
  7715. if url.startswith('http://pl.pornhub.com/embed/'): return 'http://www.pornhub.com/embed/'
  7716. if url.startswith('http://pl.pornhub.com'): return 'http://www.pornhub.com'
  7717. if url.startswith('http://www.pornhub.com'): return 'http://www.pornhub.com'
  7718. if url.startswith('https://www.pornhub.com'): return 'http://www.pornhub.com'
  7719. if url.startswith('http://m.pornhub.com'): return 'http://m.pornhub.com'
  7720. if url.startswith('http://pornicom.com'): return 'http://pornicom.com'
  7721. if url.startswith('https://pornicom.com'): return 'http://pornicom.com'
  7722. if url.startswith('http://www.pornicom.com'): return 'http://pornicom.com'
  7723. if url.startswith('https://www.pornicom.com'): return 'http://pornicom.com'
  7724. if url.startswith('https://www.pornoxo.com'): return 'https://www.pornoxo.com'
  7725. if url.startswith('http://www.pornrabbit.com'): return 'http://www.pornrabbit.com'
  7726. if url.startswith('https://www.pornrewind.com'): return 'https://www.pornrewind.com'
  7727. if url.startswith('https://www.realgfporn.com'): return 'https://www.realgfporn.com'
  7728. if url.startswith('http://embed.redtube.com'): return 'http://embed.redtube.com'
  7729. if url.startswith('http://www.redtube.com'): return 'http://www.redtube.com'
  7730. if url.startswith('https://spankbang.com'): return 'https://spankbang.com'
  7731. if url.startswith('http://www.thumbzilla.com'): return 'http://www.thumbzilla.com'
  7732. if url.startswith('http://www.tnaflix.com'): return 'https://www.tnaflix.com'
  7733. if url.startswith('https://alpha.tnaflix.com'): return 'https://alpha.tnaflix.com'
  7734. if url.startswith('http://www.tube8.com/embed/'): return 'http://www.tube8.com/embed/'
  7735. if url.startswith('http://www.tube8.com'): return 'http://www.tube8.com'
  7736. if url.startswith('http://m.tube8.com'): return 'http://m.tube8.com'
  7737. if url.startswith('https://www.tube8.com'): return 'http://www.tube8.com'
  7738. if url.startswith('https://www.vporn.com'): return 'https://www.vporn.com'
  7739. if url.startswith('http://xhamster.com'): return 'http://xhamster.com'
  7740. if url.startswith('https://xhamster.com'): return 'http://xhamster.com'
  7741. if url.startswith('http://www.xnxx.com'): return 'http://www.xnxx.com'
  7742. if url.startswith('http://www.xvideos.com'): return 'http://www.xvideos.com'
  7743. if url.startswith('https://yespornplease.com'): return 'https://yespornplease.com'
  7744. if url.startswith('http://www.youjizz.com'): return 'http://www.youjizz.com'
  7745. if url.startswith('http://www.youporn.com/embed/'): return 'http://www.youporn.com/embed/'
  7746. if url.startswith('http://www.youporn.com'): return 'http://www.youporn.com'
  7747. if url.startswith('https://www.youporn.com'): return 'http://www.youporn.com'
  7748. if url.startswith('https://sxyprn.com'): return 'https://yourporn.sexy'
  7749. if url.startswith('https://mini.zbiornik.com'): return 'https://mini.zbiornik.com'
  7750. if url.startswith('http://sexkino.to'): return 'http://sexkino.to'
  7751. if url.startswith('http://www.plashporn.com'): return 'http://sexkino.to'
  7752. if url.startswith('http://www.alphaporno.com'): return 'http://www.tubewolf.com'
  7753. if url.startswith('http://crocotube.com'): return 'http://www.tubewolf.com'
  7754. if url.startswith('http://www.tubewolf.com'): return 'http://www.tubewolf.com'
  7755. if url.startswith('http://zedporn.com'): return 'http://www.tubewolf.com'
  7756. if url.startswith('https://www.alphaporno.com'): return 'http://www.tubewolf.com'
  7757. if url.startswith('https://crocotube.com'): return 'http://www.tubewolf.com'
  7758. if url.startswith('https://www.tubewolf.com'): return 'http://www.tubewolf.com'
  7759. if url.startswith('https://zedporn.com'): return 'http://www.tubewolf.com'
  7760. if url.startswith('https://www.ashemaletube.com'): return 'https://www.ashemaletube.com'
  7761. if url.startswith('https://upstream.to'): return 'https://upstream.to'
  7762. if url.startswith('https://prostream.to'): return 'https://prostream.to'
  7763. # URLPARSER
  7764. if url.startswith('https://gounlimited.to'): return 'xxxlist.txt'
  7765. if url.startswith('http://openload.co'): return 'xxxlist.txt'
  7766. if url.startswith('https://oload.tv'): return 'xxxlist.txt'
  7767. if url.startswith('http://www.cda.pl'): return 'xxxlist.txt'
  7768. if url.startswith('http://hqq.tv'): return 'xxxlist.txt'
  7769. if url.startswith('https://hqq.tv'): return 'xxxlist.txt'
  7770. if url.startswith('https://www.rapidvideo.com'): return 'xxxlist.txt'
  7771. if url.startswith('http://videomega.tv'): return 'xxxlist.txt'
  7772. if url.startswith('http://www.flashx.tv'): return 'xxxlist.txt'
  7773. if url.startswith('http://streamcloud.eu'): return 'xxxlist.txt'
  7774. if url.startswith('http://thevideo.me'): return 'xxxlist.txt'
  7775. if url.startswith('https://vidoza.net'): return 'xxxlist.txt'
  7776. if url.startswith('http://fileone.tv'): return 'xxxlist.txt'
  7777. if url.startswith('https://fileone.tv'): return 'xxxlist.txt'
  7778. if url.startswith('https://streamcherry.com'): return 'xxxlist.txt'
  7779. if url.startswith('https://vk.com'): return 'xxxlist.txt'
  7780. if url.startswith('https://www.fembed.com'): return 'xxxlist.txt'
  7781. if url.startswith('https://videobin.co'): return 'https://videobin.co'
  7782. if url.startswith('http://dato.porn'): return 'http://dato.porn'
  7783. if url.startswith('https://dato.porn'): return 'http://dato.porn'
  7784. if url.startswith('http://datoporn.co'): return 'http://dato.porn'
  7785. if url.startswith('https://datoporn.co'): return 'http://dato.porn'
  7786. if url.startswith('http://datoporn.com'): return 'http://dato.porn'
  7787. if url.startswith('https://datoporn.com'): return 'http://dato.porn'
  7788. if url.startswith('https://vidlox.tv'): return 'https://vidlox.tv'
  7789. if self.MAIN_URL == 'http://www.freeomovie.com/': return 'xxxlist.txt'
  7790. if self.MAIN_URL == 'https://streamporn.pw': return 'xxxlist.txt'
  7791. if self.MAIN_URL == 'https://onlinepornfree.xyz': return 'xxxlist.txt'
  7792. if self.MAIN_URL == 'http://www.xxxstreams.org': return 'xxxlist.txt'
  7793. if self.MAIN_URL == 'https://pandamovie.info': return 'xxxlist.txt'
  7794. if self.MAIN_URL == 'http://fullxxxmovies.net': return 'xxxlist.txt'
  7795. if self.MAIN_URL == 'https://www.pornrewind.com': return 'xxxlist.txt'
  7796. if self.MAIN_URL == 'http://www.pornfromczech.com': return 'xxxlist.txt'
  7797. if self.MAIN_URL == 'http://netflixporno.net': return 'xxxlist.txt'
  7798. if self.MAIN_URL == 'https://yespornplease.com': return 'xxxlist.txt'
  7799. if self.MAIN_URL == 'https://watchpornx.com': return 'xxxlist.txt'
  7800. # A TO DO ...
  7801. if url.startswith('http://www.slutsxmovies.com/embed/'): return 'http://www.nuvid.com'
  7802. if url.startswith('http://www.cumyvideos.com/embed/'): return 'http://www.nuvid.com'
  7803. #if url.startswith('http://www.x3xtube.com'): return 'file: '
  7804. if url.startswith('http://www.nuvid.com'): return 'http://www.nuvid.com'
  7805. if url.startswith('http://www.wankoz.com'): return 'file: '
  7806. if url.startswith('http://hornygorilla.com'): return 'file: '
  7807. #if url.startswith('http://www.vikiporn.com'): return '1file: "'
  7808. if url.startswith('http://www.fetishshrine.com'): return 'file: '
  7809. if url.startswith('http://www.sunporno.com'): return 'http://www.sunporno.com'
  7810. if url.startswith('http://theclassicporn.com'): return "video_url: '"
  7811. if url.startswith('http://www.faphub.xxx'): return 'http://www.faphub.xxx'
  7812. if url.startswith('http://www.sleazyneasy.com'): return 'file: '
  7813. if url.startswith('http://www.proporn.com'): return 'http://www.proporn.com'
  7814. if url.startswith('http://www.tryboobs.com'): return "video_url: '"
  7815. if url.startswith('http://www.viptube.com'): return 'http://www.nuvid.com'
  7816. if url.startswith('http://pervclips.com'): return 'http://www.wankoz.com'
  7817. if url.startswith('http://www.jizz.us'): return 'http://www.x3xtube.com'
  7818. if url.startswith('http://www.pornstep.com'): return 'videoFile="'
  7819. if url.startswith('http://www.azzzian.com'): return "video_url: '"
  7820. if url.startswith('http://www.porndreamer.com'): return 'http://www.x3xtube.com'
  7821. if url.startswith('http://www.tubeon.com'): return 'http://www.tubeon.com'
  7822. if url.startswith('http://www.finevids.xxx'): return "video_url: '"
  7823. if url.startswith('http://www.pornwhite.com'): return 'file: '
  7824. if url.startswith('http://www.xfig.net'): return 'videoFile="'
  7825. if url.startswith('http://www.pornoid.com'): return "video_url: '"
  7826. if url.startswith('http://tubeq.xxx'): return 'http://www.faphub.xxx'
  7827. if url.startswith('http://www.wetplace.com'): return "video_url: '"
  7828. if url.startswith('http://sexylies.com'): return 'http://sexylies.com'
  7829. if url.startswith('http://www.eskimotube.com'): return 'http://www.eskimotube.com'
  7830. if url.startswith('http://www.pornalized.com'): return "video_url: '"
  7831. if url.startswith('http://www.porn5.com'): return 'http://www.porn5.com'
  7832. if url.startswith('http://www.pornyeah.com'): return 'http://www.pornyeah.com'
  7833. if url.startswith('http://www.porn.com'): return 'http://www.porn5.com'
  7834. if url.startswith('http://www.yeptube.com'): return 'http://www.yeptube.com'
  7835. if url.startswith('http://www.pornpillow.com'): return 'http://www.pornpillow.com'
  7836. if url.startswith('http://porneo.com'): return 'http://www.nuvid.com'
  7837. if url.startswith('http://www.5fing.com'): return 'file: '
  7838. if url.startswith('http://www.pornroxxx.com'): return "0p' : '"
  7839. if url.startswith('http://www.hd21.com'): return "0p' : '"
  7840. if url.startswith('http://www.pornrox.com'): return "0p' : '"
  7841. if url.startswith('http://www.flyflv.com'): return 'http://www.flyflv.com'
  7842. if url.startswith('http://www.xtube.com'): return 'https://vidlox.tv'
  7843. if url.startswith('http://xxxkingtube.com'): return 'http://xxxkingtube.com'
  7844. if url.startswith('http://www.boyfriendtv.com'): return 'source src="'
  7845. if url.startswith('http://pornxs.com'): return 'http://pornxs.com'
  7846. if url.startswith('http://pornsharing.com'): return 'http://pornsharing.com'
  7847. if url.startswith('http://www.vivatube.com'): return 'http://vivatube.com'
  7848. if url.startswith('http://www.clipcake.com'): return 'videoFile="'
  7849. if url.startswith('http://www.cliplips.com'): return 'videoFile="'
  7850. if url.startswith('http://www.sheshaft.com'): return 'file: '
  7851. if url.startswith('http://www.vid2c.com'): return 'videoFile="'
  7852. if url.startswith('http://www.bonertube.com'): return 'videoFile="'
  7853. # Test mjpg
  7854. if url.endswith('.mjpg'): return 'mjpg_stream'
  7855. if url.endswith('.cgi'): return 'mjpg_stream'
  7856. if self.MAIN_URL == 'http://hotmovs.com': return 'http://www.hdzog.com'
  7857. if self.MAIN_URL == 'https://www.vporn.com': return self.MAIN_URL
  7858. if self.MAIN_URL == 'https://sxyprn.com': return self.MAIN_URL
  7859. if self.MAIN_URL == 'http://www.moviefap.com': return self.MAIN_URL
  7860. if self.MAIN_URL == 'http://www.homemoviestube.com': return self.MAIN_URL
  7861. if self.MAIN_URL == 'http://www.hdzog.com': return self.MAIN_URL
  7862. if self.MAIN_URL == 'https://www.4tube.com': return 'http://www.4tube.com'
  7863. if self.MAIN_URL == 'https://www.fux.com': return 'http://www.4tube.com'
  7864. if self.MAIN_URL == 'https://www.pornerbros.com': return 'http://www.4tube.com'
  7865. if self.MAIN_URL == 'https://www.porntube.com': return 'http://www.4tube.com'
  7866. if self.MAIN_URL == 'https://www.playvids.com': return self.MAIN_URL
  7867. if self.MAIN_URL == 'https://www.realgfporn.com': return self.MAIN_URL
  7868. if self.MAIN_URL == 'http://tubepornclassic.com': return 'http://www.hdzog.com' #self.MAIN_URL
  7869. if self.MAIN_URL == 'https://www.koloporno.com': return self.MAIN_URL
  7870. if self.MAIN_URL == 'https://www.pornomenge.com': return self.MAIN_URL
  7871. if self.MAIN_URL == 'http://www.yuvutu.com': return self.MAIN_URL
  7872. if self.MAIN_URL == 'https://www.camsoda.com/': return self.MAIN_URL
  7873. if self.MAIN_URL == 'http://www.thumbzilla.com': return self.MAIN_URL
  7874. if self.MAIN_URL == 'http://www.cliphunter.com': return self.MAIN_URL
  7875. if self.MAIN_URL == 'http://www.filmyporno.tv': return self.MAIN_URL
  7876. if self.MAIN_URL == 'http://porndoe.com': return self.MAIN_URL
  7877. if self.MAIN_URL == 'http://www.porntrex.com': return self.MAIN_URL
  7878. if self.MAIN_URL == 'http://porn720.net': return self.MAIN_URL
  7879. if self.MAIN_URL == 'http://rusporn.tv': return self.MAIN_URL
  7880. if self.MAIN_URL == 'https://www.extremetube.com': return self.MAIN_URL
  7881. if self.MAIN_URL == 'http://www.el-ladies.com': return self.MAIN_URL
  7882. if self.MAIN_URL == 'http://www.livejasmin.com': return self.MAIN_URL
  7883. if self.MAIN_URL == 'https://pl.bongacams.com': return self.MAIN_URL
  7884. if self.MAIN_URL == 'https://www.tnaflix.com': return self.MAIN_URL
  7885. if self.MAIN_URL == 'https://www.empflix.com': return self.MAIN_URL
  7886. if self.MAIN_URL == 'https://www.myfreecams.com/': return self.MAIN_URL
  7887. if self.MAIN_URL == 'http://www.drtuber.com': return self.MAIN_URL
  7888. if self.MAIN_URL == 'http://www.dachix.com': return self.MAIN_URL
  7889. if self.MAIN_URL == 'http://www.youjizz.com': return self.MAIN_URL
  7890. if self.MAIN_URL == 'https://www.cam4.com': return self.MAIN_URL
  7891. if self.MAIN_URL == 'http://www.amateurporn.net': return self.MAIN_URL
  7892. if self.MAIN_URL == 'https://chaturbate.com': return self.MAIN_URL
  7893. if self.MAIN_URL == 'http://www.ah-me.com': return self.MAIN_URL
  7894. if self.MAIN_URL == 'http://www.pornhd.com': return self.MAIN_URL
  7895. if self.MAIN_URL == 'http://www.pornrabbit.com': return self.MAIN_URL
  7896. if self.MAIN_URL == 'http://beeg.com': return self.MAIN_URL
  7897. if self.MAIN_URL == 'http://www.tube8.com': return self.MAIN_URL
  7898. if self.MAIN_URL == 'http://www.redtube.com': return self.MAIN_URL
  7899. if self.MAIN_URL == 'http://www.youporn.com': return self.MAIN_URL
  7900. if self.MAIN_URL == 'http://showup.tv': return self.MAIN_URL
  7901. if self.MAIN_URL == 'http://www.xnxx.com': return self.MAIN_URL
  7902. if self.MAIN_URL == 'http://www.xvideos.com': return self.MAIN_URL
  7903. if self.MAIN_URL == 'http://hentaigasm.com': return self.MAIN_URL
  7904. if self.MAIN_URL == 'http://xhamsterlive.com': return 'http://xhamster.com/cams'
  7905. if self.MAIN_URL == 'http://xhamster.com': return self.MAIN_URL
  7906. if self.MAIN_URL == 'http://www.eporner.com': return self.MAIN_URL
  7907. if self.MAIN_URL == 'http://www.pornhub.com': return self.MAIN_URL
  7908. if self.MAIN_URL == 'http://www.4tube.com': return self.MAIN_URL
  7909. if self.MAIN_URL == 'http://www.hdporn.net': return self.MAIN_URL
  7910. if self.MAIN_URL == 'http://m.tube8.com': return self.MAIN_URL
  7911. if self.MAIN_URL == 'http://m.pornhub.com': return self.MAIN_URL
  7912. if self.MAIN_URL == 'https://www.katestube.com': return self.MAIN_URL
  7913. if self.MAIN_URL == 'http://www.hclips.com': return 'http://www.hclips.com'
  7914. if self.MAIN_URL == 'https://www.pinflix.com': return self.MAIN_URL
  7915. if self.MAIN_URL == 'http://www.upornia.com': return 'http://www.hdzog.com'
  7916. if self.MAIN_URL == 'https://www.txxx.com': return 'https://www.txxx.com'
  7917. if self.MAIN_URL == 'https://www.sunporno.com': return 'http://www.sunporno.com'
  7918. if self.MAIN_URL == 'http://sexu.com': return self.MAIN_URL
  7919. if self.MAIN_URL == 'http://www.tubewolf.com': return self.MAIN_URL
  7920. if self.MAIN_URL == 'https://streamate.com': return self.MAIN_URL
  7921. if self.MAIN_URL == 'https://momxxxfun.com': return self.MAIN_URL
  7922. if self.MAIN_URL == 'https://www.mydirtyhobby.to': return self.MAIN_URL
  7923. if self.MAIN_URL == 'http://www.adulttvlive.net': return self.MAIN_URL
  7924. if self.MAIN_URL == 'https://www.balkanjizz.com': return self.MAIN_URL
  7925. if self.MAIN_URL == 'https://pornorussia.tv': return self.MAIN_URL
  7926. if self.MAIN_URL == 'https://www.letmejerk.com': return self.MAIN_URL
  7927. if self.MAIN_URL == 'https://www.gotporn.com': return self.MAIN_URL
  7928. if self.MAIN_URL == 'https://www.analdin.com': return self.MAIN_URL
  7929. if self.MAIN_URL == 'https://fapset.com': return self.MAIN_URL
  7930. if self.MAIN_URL == 'https://daftsex.com': return self.MAIN_URL
  7931. if self.MAIN_URL == 'https://lovehomeporn.com/': return self.MAIN_URL
  7932. if self.MAIN_URL == 'https://www.eroprofile.com': return self.MAIN_URL
  7933. if self.MAIN_URL == 'http://www.absoluporn.com': return self.MAIN_URL
  7934. if self.MAIN_URL == 'https://www.amateurcool.com': return self.MAIN_URL
  7935. if self.MAIN_URL == 'http://anybunny.com': return self.MAIN_URL
  7936. if self.MAIN_URL == 'https://hqporner.com': return self.MAIN_URL
  7937. if self.MAIN_URL == 'https://www.naked.com': return self.MAIN_URL
  7938. if self.MAIN_URL == 'https://www.cumlouder.com': return self.MAIN_URL
  7939. if self.MAIN_URL == 'http://www.porn00.org': return self.MAIN_URL
  7940. if self.MAIN_URL == 'https://www.volimeee.com': return self.MAIN_URL
  7941. if self.MAIN_URL == 'https://p720.net': return self.MAIN_URL
  7942. if self.MAIN_URL == 'https://pornopersik.com': return 'https://p720.net'
  7943. if self.MAIN_URL == 'https://anyporn.com': return self.MAIN_URL
  7944. if self.MAIN_URL == 'https://anon-v.com': return self.MAIN_URL
  7945. if self.MAIN_URL == 'https://www.bravoporn.com': return 'https://anyporn.com'
  7946. if self.MAIN_URL == 'https://www.bravoteens.com': return 'https://anyporn.com'
  7947. if self.MAIN_URL == 'https://www.sleazyneasy.com': return 'https://www.sleazyneasy.com'
  7948. if self.MAIN_URL == 'https://vjav.com': return 'http://www.hdzog.com'
  7949. if self.MAIN_URL == 'https://javhoho.com': return self.MAIN_URL
  7950. return ''
  7951. def getResolvedURL(self, url):
  7952. printDBG( 'Host getResolvedURL begin' )
  7953. printDBG( 'Host getResolvedURL url: '+url )
  7954. videoUrl = ''
  7955. parser = self.getParser(url)
  7956. printDBG( 'Host getResolvedURL parser: '+parser )
  7957. #if parser == '': return url
  7958. if 'gounlimited.to' in url:
  7959. if 'embed' not in url:
  7960. url = 'https://gounlimited.to/embed-{0}.html'.format(url.split('/')[3])
  7961. if 'clipwatching.com' in url:
  7962. if 'embed' not in url:
  7963. video_id = self.cm.ph.getSearchGroups(url, 'clipwatching.com/([A-Za-z0-9]{12})[/.-]')[0]
  7964. url = 'http://clipwatching.com/embed-{0}.html'.format(video_id)
  7965. if parser == 'mjpg_stream':
  7966. try:
  7967. stream=urllib.urlopen(url)
  7968. bytes=''
  7969. while True:
  7970. bytes+=stream.read(1024)
  7971. a = bytes.find('\xff\xd8')
  7972. b = bytes.find('\xff\xd9')
  7973. if a!=-1 and b!=-1:
  7974. jpg = bytes[a:b+2]
  7975. bytes= bytes[b+2:]
  7976. with open('/tmp/obraz.jpg', 'w') as titleFile:
  7977. titleFile.write(jpg)
  7978. return 'file:///tmp/obraz.jpg'
  7979. except: pass
  7980. return ''
  7981. if parser == 'http://www.porntrex.com':
  7982. COOKIEFILE = os_path.join(GetCookieDir(), 'porntrex.cookie')
  7983. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  7984. sts, data = self.getPage(url, 'porntrex.cookie', 'porntrex.com', self.defaultParams)
  7985. if not sts: return ''
  7986. #printDBG( 'Host listsItems data: '+str(data) )
  7987. if 'video is a private' in data:
  7988. SetIPTVPlayerLastHostError(_(' This video is a private.'))
  7989. return []
  7990. if self.format4k:
  7991. videoPage = self.cm.ph.getSearchGroups(data, '''video_alt_url5: ['"]([^"^']+?)['"]''')[0]
  7992. if videoPage:
  7993. printDBG( 'Host videoPage video_alt_url5 4k: '+videoPage )
  7994. return videoPage
  7995. videoPage = self.cm.ph.getSearchGroups(data, '''video_alt_url4: ['"]([^"^']+?)['"]''')[0]
  7996. if videoPage:
  7997. printDBG( 'Host videoPage video_alt_url4 High HD: '+videoPage )
  7998. return videoPage
  7999. videoPage = self.cm.ph.getSearchGroups(data, '''video_alt_url3: ['"]([^"^']+?)['"]''')[0]
  8000. if videoPage:
  8001. printDBG( 'Host videoPage video_alt_url3 Full High: '+videoPage )
  8002. return videoPage
  8003. videoPage = self.cm.ph.getSearchGroups(data, '''video_alt_url2: ['"]([^"^']+?)['"]''')[0]
  8004. if videoPage:
  8005. printDBG( 'Host videoPage video_alt_url2 HD: '+videoPage )
  8006. return videoPage
  8007. videoPage = self.cm.ph.getSearchGroups(data, '''video_alt_url: ['"]([^"^']+?)['"]''')[0]
  8008. if videoPage:
  8009. printDBG( 'Host videoPage video_alt_url Medium: '+videoPage )
  8010. return videoPage
  8011. videoPage = self.cm.ph.getSearchGroups(data, '''video_url: ['"]([^"^']+?)['"]''')[0]
  8012. if videoPage:
  8013. printDBG( 'Host videoPage video_url Low: '+videoPage )
  8014. return videoPage
  8015. return ''
  8016. if parser == 'http://www.hclips.com':
  8017. COOKIEFILE = os_path.join(GetCookieDir(), 'hclips.cookie')
  8018. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8019. sts, data = self.getPage(url, 'hclips.cookie', 'hclips.com', self.defaultParams)
  8020. if not sts: return ''
  8021. COOKIEFILE = os_path.join(GetCookieDir(), 'hclips.cookie')
  8022. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8023. sts, data = self.getPage(url, 'hclips.cookie', 'hclips.com', self.defaultParams)
  8024. if not sts: return ''
  8025. printDBG( 'Host listsItems data: '+data )
  8026. videoUrl = re.search('video_url":"([^"]+)', data).group(1)
  8027. replacemap = {'M':'\u041c', 'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', '=':'~', '+':'.', '/':','}
  8028. for key in replacemap:
  8029. videoUrl = videoUrl.replace(replacemap[key], key)
  8030. videoUrl = base64.b64decode(videoUrl)
  8031. if videoUrl.startswith('//'): videoUrl = 'https:' + videoUrl
  8032. if videoUrl.startswith('/'): videoUrl = 'https://hclips.com' + videoUrl
  8033. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  8034. if parser == 'http://www.hdzog.com':
  8035. COOKIEFILE = os_path.join(GetCookieDir(), 'hdzog.cookie')
  8036. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8037. sts, data = self.getPage(url, 'hdzog.cookie', 'hdzog.com', self.defaultParams)
  8038. if not sts: return ''
  8039. printDBG( 'Host listsItems data: '+str(data) )
  8040. posturl = 'https://%s/sn4diyux.php' % url.split('/')[2]
  8041. pC3 = re.search('''pC3:'([^']+)''', data)
  8042. if not pC3: return ''
  8043. pC3 = pC3.group(1)
  8044. vidid = re.search('''video_id["|']?:\s?(\d+)''', data).group(1)
  8045. postdata = '%s,%s' % (vidid, pC3)
  8046. sts, data = self.getPage(posturl, 'hclips.cookie', 'hclips.com', self.defaultParams, post_data={'param': postdata})
  8047. if not sts: return ''
  8048. printDBG( 'Host listsItems data: '+str(data) )
  8049. videoUrl = re.search('video_url":"([^"]+)', data).group(1)
  8050. printDBG( 'Host videoUrl:%s' % videoUrl )
  8051. replacemap = {'M':'\u041c', 'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', '=':'~', '+':'.', '/':','}
  8052. for key in replacemap:
  8053. videoUrl = videoUrl.replace(replacemap[key], key)
  8054. videoUrl = base64.b64decode(videoUrl)
  8055. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  8056. if parser == 'http://www.upornia.com':
  8057. COOKIEFILE = os_path.join(GetCookieDir(), 'upornia.cookie')
  8058. try: data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  8059. except:
  8060. printDBG( 'Host getResolvedURL query error url: '+url )
  8061. return ''
  8062. #printDBG( 'Host getResolvedURL data: '+data )
  8063. try:
  8064. video_url = self.cm.ph.getSearchGroups(data, '''var video_url=['"]([^"^']+?)['"]''')[0]
  8065. hash = self.cm.ph.getSearchGroups(data, '''/get_file/(\d+/[^"^']+?)/''')[0]
  8066. #printDBG( 'Host video_url: '+video_url )
  8067. decoder = 'Dpww3Dw64=function(b){var c="",d=0;/[^\u0410\u0412\u0421\u0415\u041cA-Za-z0-9\.\,\~]/g.exec(b)'\
  8068. '&&console.log("error decoding url");b=b.replace(/[^\u0410\u0412\u0421\u0415\u041cA-Za-z0-9\.\,\~]/g,"");'\
  8069. 'do{var f="\u0410\u0412\u0421D\u0415FGHIJKL\u041cNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~".'\
  8070. 'indexOf(b.charAt(d++)),e="\u0410\u0412\u0421D\u0415FGHIJKL\u041cNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~".'\
  8071. 'indexOf(b.charAt(d++)),g="\u0410\u0412\u0421D\u0415FGHIJKL\u041cNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~".'\
  8072. 'indexOf(b.charAt(d++)),h="\u0410\u0412\u0421D\u0415FGHIJKL\u041cNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~".'\
  8073. 'indexOf(b.charAt(d++)),f=f<<2|e>>4,e=(e&15)<<4|g>>2,k=(g&3)<<6|h,c=c+String.fromCharCode(f);'\
  8074. '64!=g&&(c+=String.fromCharCode(e));64!=h&&(c+=String.fromCharCode(k))}while(d<b.length);return unescape(c)};'
  8075. js = decoder + '\n' + 'var video_url="'+video_url+'";\n'+'vidurl = (Dpww3Dw64(video_url));'
  8076. #printDBG( 'Host getResolvedURL js: '+js )
  8077. urls = js_execute( js+ '\nfor (n in this){print(n+"="+this[n]+";");}')
  8078. videoUrl = self.cm.ph.getSearchGroups(urls['data'], '''vidurl=([^"^']+?);''')[0]
  8079. if hash: videoUrl = videoUrl.replace(videoUrl.split('/')[-6]+'/'+videoUrl.split('/')[-5],hash)
  8080. if videoUrl: return videoUrl
  8081. except Exception:
  8082. printExc()
  8083. printDBG( 'Host start embed' )
  8084. videoPage = self.cm.ph.getSearchGroups(data, '''(https://upornia.com/embed/[^"^']+?)[&"]''')[0]
  8085. if not videoPage: videoPage = self.cm.ph.getSearchGroups(data, '''(https://www.txxx.com/embed/[^"^']+?)[&"]''')[0]
  8086. if videoPage:
  8087. try: data2 = self.cm.getURLRequestData({ 'url': videoPage, 'use_host': False, 'use_cookie': True, 'save_cookie': False, 'load_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  8088. except:
  8089. printDBG( 'Host getResolvedURL query error url: '+videoPage )
  8090. return ''
  8091. #printDBG( 'Host getResolvedURL data embed: '+data )
  8092. videoUrl = self.cm.ph.getSearchGroups(data2, '''video_url=['"]([^"^']+?)['"]''')[0]
  8093. if 'http' in videoUrl: return videoUrl
  8094. printDBG( 'Host direct link' )
  8095. videoPage = self.cm.ph.getSearchGroups(data, '''(https://upornia.com/get_file/[^"^']+?)['"]''')[0]
  8096. if videoPage: return videoPage
  8097. videoPage = self.cm.ph.getSearchGroups(data, '''(https://www.txxx.com/get_file/[^"^']+?)['"]''')[0]
  8098. if videoPage: return videoPage
  8099. return ''
  8100. if parser == 'http://beeg.com':
  8101. URL = url
  8102. sts, data = self.get_Page(URL)
  8103. if not sts: return
  8104. printDBG( 'second beeg-clips data: '+data )
  8105. if '"error"' in data:
  8106. URL = url.replace('/'+url.split('/')[-2], '')
  8107. sts, data = self.get_Page(URL)
  8108. if not sts: return
  8109. printDBG( 'second beeg-clips data2: '+data )
  8110. #SetIPTVPlayerLastHostError(_(' Video not found.'))
  8111. #return []
  8112. phUrl=''
  8113. try:
  8114. if data.startswith('{'): data = '['+data+']'
  8115. result = byteify(simplejson.loads(data))
  8116. for item in result:
  8117. if str(item["240p"]) != 'None': phUrl = str(item["240p"])
  8118. if str(item["480p"]) != 'None': phUrl = str(item["480p"])
  8119. if str(item["720p"]) != 'None': phUrl = str(item["720p"])
  8120. if self.beegfullhd:
  8121. if str(item["1080p"]) != 'None': phUrl = str(item["1080p"])
  8122. if self.format4k:
  8123. if str(item["2160p"]) != 'None': phUrl = str(item["2160p"])
  8124. except Exception:
  8125. printExc()
  8126. if phUrl== '':
  8127. SetIPTVPlayerLastHostError(_(' Video not found.'))
  8128. return []
  8129. if phUrl.startswith('//'): phUrl = 'http:' + phUrl
  8130. phUrl = phUrl.replace('{DATA_MARKERS}','data=pc.DE')
  8131. if not self.beeg_salt: return phUrl
  8132. key = re.search(r'/key=(.*?)%2Cend=', phUrl, 0)
  8133. key = key.group(1)
  8134. printDBG( 'key encrypt : '+key )
  8135. key = decrypt_key(key, self.beeg_salt)
  8136. printDBG( 'key decrypt: '+key )
  8137. videoUrl = re.sub(r'/key=(.*?)%2Cend=', '/key='+key+',end=', phUrl)
  8138. return videoUrl
  8139. if parser == 'http://showup.tv':
  8140. COOKIEFILE = os_path.join(GetCookieDir(), 'showup.cookie')
  8141. try: data = self.cm.getURLRequestData({ 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': False, 'load_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  8142. except:
  8143. printDBG( 'Host getResolvedURL query error url: '+url )
  8144. return ''
  8145. printDBG( 'Host getResolvedURL data: '+data )
  8146. parse = re.search("var srvE = '(.*?)'", data, re.S)
  8147. if parse:
  8148. printDBG( 'Host Url: '+url)
  8149. printDBG( 'Host rtmp: '+ parse.group(1))
  8150. rtmp = parse.group(1)
  8151. startChildBug = re.search("startChildBug\(user\.uid, '', '([\s\S]+?)'", data, re.I);
  8152. if startChildBug:
  8153. s = startChildBug.group(1)
  8154. printDBG( 'Host startChildBug: '+ s)
  8155. ip = ''
  8156. t = re.search(r"(.*?):(.*?)", s, re.I)
  8157. if t.group(1) == 'j12.showup.tv': ip = '94.23.171.122'
  8158. if t.group(1) == 'j13.showup.tv': ip = '94.23.171.121'
  8159. if t.group(1) == 'j11.showup.tv': ip = '94.23.171.115'
  8160. if t.group(1) == 'j14.showup.tv': ip = '94.23.171.120'
  8161. printDBG( 'Host IP: '+ip)
  8162. port = s.replace(t.group(1)+':', '')
  8163. printDBG( 'Host Port: '+port)
  8164. modelName = url.replace('http://showup.tv/','')
  8165. printDBG( 'Host modelName: '+modelName)
  8166. libsPath = GetPluginDir('libs/')
  8167. import sys
  8168. sys.path.insert(1, libsPath)
  8169. import websocket
  8170. wsURL1 = 'ws://'+s
  8171. wsURL2 = 'ws://'+ip+':'+port
  8172. printDBG( 'Host wsURL1: '+wsURL1)
  8173. printDBG( 'Host wsURL2: '+wsURL2)
  8174. ws = websocket.create_connection(wsURL2)
  8175. zapytanie = '{ "id": 0, "value": ["", ""]}'
  8176. zapytanie = zapytanie.decode("utf-8")
  8177. printDBG( 'Host zapytanie1: '+zapytanie)
  8178. ws.send(zapytanie)
  8179. result = ws.recv()
  8180. printDBG( 'Host result1: '+result)
  8181. zapytanie = '{ "id": 2, "value": ["%s"]}' % modelName
  8182. zapytanie = zapytanie.decode("utf-8")
  8183. printDBG( 'Host zapytanie2: '+zapytanie)
  8184. ws.send(zapytanie)
  8185. result = ws.recv()
  8186. printDBG( 'Host result2: '+result)
  8187. playpath = re.search('value":\["(.*?)"', result)
  8188. if playpath:
  8189. Checksum = playpath.group(1)
  8190. if len(Checksum)<30:
  8191. for x in range(1, 10):
  8192. ws.send(zapytanie)
  8193. result = ws.recv()
  8194. czas = re.search('(\d+)\[:\](\d+)\[', result )
  8195. if czas:
  8196. printDBG( 'Host czas.group(1): '+czas.group(1) )
  8197. printDBG( 'Host czas.group(2): '+czas.group(2) )
  8198. czas = int(czas.group(1)) - int(czas.group(2))
  8199. printDBG( 'Host a: '+str(czas) )
  8200. a = str(czas)
  8201. if a=='0': a = 'kilka'
  8202. Checksum = 'PRIVATE - Czekaj '+a+' sekund'
  8203. break
  8204. if Checksum=='' or Checksum=='failure': Checksum='OFFLINE'
  8205. ws.close()
  8206. SetIPTVPlayerLastHostError(Checksum)
  8207. return []
  8208. videoUrl = 'rtmp://cdn-t0.showup.tv:1935/webrtc/'+Checksum+'_aac' # token=fake'
  8209. ws.close()
  8210. try:
  8211. import commands
  8212. for x in range(1, 9):
  8213. cmd = '/usr/bin/rtmpdump -B 1 -r "%s"' % videoUrl.replace('cdn-t0','cdn-t0'+str(x))
  8214. wow = commands.getoutput(cmd)
  8215. printDBG( 'HostXXX cmd > '+ cmd )
  8216. #printDBG( 'HostXXX rtmpdump > '+ wow )
  8217. if not 'StreamNotFound' in wow:
  8218. return videoUrl.replace('cdn-t0','cdn-t0'+str(x))+' live=1'
  8219. printDBG( 'HostXXX GUZIK ' )
  8220. except:
  8221. printDBG( 'HostXXX error commands.getoutput ' )
  8222. return videoUrl.replace('cdn-t0','cdn-t01')+' live=1'
  8223. return ''
  8224. def base_myfreecam(serwer, url):
  8225. data = ''
  8226. newurl = 'http://video%s.myfreecams.com:1935/NxServer/mfc_%s.f4v_aac/playlist.m3u8' % (serwer, url)
  8227. try:
  8228. data = urllib2.urlopen(newurl, timeout=1)
  8229. #printDBG( 'Host data.meta: '+str(data.meta) )
  8230. except:
  8231. printDBG( 'Host error newurl: '+newurl )
  8232. if data:
  8233. return newurl
  8234. if parser == 'https://www.myfreecams.com/':
  8235. host = "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; androVM for VirtualBox ('Tablet' version with phone caps) Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
  8236. videoUrl = myfreecam_start(url)
  8237. if videoUrl != '':
  8238. key = self.cm.ph.getSearchGroups(videoUrl, '''video([^"^']+?)\.''')[0]
  8239. id = self.cm.ph.getSearchGroups(videoUrl, '''mfc_([^"^']+?)\.''')[0]
  8240. printDBG( 'Host key: '+key )
  8241. printDBG( 'Host id: '+id )
  8242. referer = 'https://www.myfreecams.com/_html/player.html?broadcaster_id={0}&target=new_window&username={1}'.format(id, url)
  8243. try:
  8244. server_type = None
  8245. value = None
  8246. if self.h5video_servers.get(str(key)):
  8247. value = self.h5video_servers[str(key)]
  8248. server_type = 'h5video_servers'
  8249. videoUrl = videoUrl.replace('video'+key,value)
  8250. elif self.wzobs_servers.get(str(key)):
  8251. value = self.wzobs_servers[str(key)]
  8252. server_type = 'wzobs_servers'
  8253. videoUrl = videoUrl.replace('video'+key,value)
  8254. videoUrl = videoUrl.replace('mfc_','mfc_a_')
  8255. elif self.ngvideo_servers.get(str(key)):
  8256. value = self.ngvideo_servers[str(key)]
  8257. server_type = 'ngvideo_servers'
  8258. SetIPTVPlayerLastHostError(_('Not supported.'))
  8259. return []
  8260. printDBG( 'value: %s server_type: %s' % (value, server_type) )
  8261. except Exception:
  8262. printExc()
  8263. printDBG( 'Host videoUrl: '+videoUrl )
  8264. videoUrl = strwithmeta(videoUrl, {'Origin': 'https://www.myfreecams.com'})
  8265. videoUrl = strwithmeta(videoUrl, {'Cookie':self.cookieHeader})
  8266. videoUrl = strwithmeta(videoUrl, {'iptv_proto':'m3u8', 'iptv_livestream':True})
  8267. #videoUrl = strwithmeta(videoUrl, {'Cookie':self.cookieHeader+'gw=1; user_id=0; _gat_gtag_UA_295864_20=1;'})
  8268. #videoUrl = strwithmeta(videoUrl, {'Origin': 'https://new.myfreecams.com', 'Cookie':self.cid, 'Referer':'https://new.myfreecams.com', 'User-Agent': ''})
  8269. #videoUrl = urlparser.decorateUrl(videoUrl, {'Origin': 'https://new.myfreecams.com', 'iptv_proto':'m3u8', 'iptv_livestream':True, 'User-Agent':host, 'Referer':'https://new.myfreecams.com'})
  8270. tmp = getDirectM3U8Playlist(videoUrl, checkExt=False, variantCheck=False, checkContent=True, sortWithMaxBitrate=99999999)
  8271. for item in tmp:
  8272. printDBG( 'Host listsItems valtab: ' +str(item))
  8273. return item['url']
  8274. return ''
  8275. def _get_stream_uid(username):
  8276. m = hashlib.md5(username.encode('utf-8') + str(time_time()).encode('utf-8'))
  8277. return m.hexdigest()
  8278. if parser == 'https://pl.bongacams.com':
  8279. printDBG( 'Host url: '+url )
  8280. username = url
  8281. printDBG( 'Host username: '+username )
  8282. COOKIEFILE = os_path.join(GetCookieDir(), 'bongacams.cookie')
  8283. host = 'Mozilla/5.0 (iPad; CPU OS 8_1_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B466 Safari/600.1.4'
  8284. header = {'User-Agent': host, 'Accept':'text/html,application/json','Accept-Language':'en,en-US;q=0.7,en;q=0.3', 'Referer':'https://en.bongacams.com/'+username, 'Origin':'https://en.bongacams.com'}
  8285. self.defaultParams = { 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
  8286. sts, data = self.cm.getPage('https://en.bongacams.com/'+username, self.defaultParams)
  8287. if not sts: return ''
  8288. #printDBG( 'Parser Bonga data: '+data )
  8289. amf = self.cm.ph.getSearchGroups(data, '''MobileChatService\(\'\/([^"^']+?)\'\+\$''')[0]
  8290. if not amf: amf = 'tools/amf.php?x-country=pl&m=1&res='
  8291. url_amf = 'https://en.bongacams.com/' + amf + str(random.randint(2100000, 3200000))
  8292. printDBG( 'Host url_amf: '+url_amf )
  8293. postdata = {'method' : 'getRoomData', 'args[]' : username}
  8294. header = {'User-Agent': host, 'Accept':'text/html,application/xhtml+xml,application/xml,application/json','Accept-Language':'en,en-US;q=0.7,en;q=0.3','X-Requested-With':'XMLHttpRequest', 'Referer':'https://en.bongacams.com/'+username, 'Origin':'https://en.bongacams.com'}
  8295. self.defaultParams = { 'url': url_amf, 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': True, 'return_data': True }
  8296. sts, data = self.cm.getPage(url_amf, self.defaultParams, postdata)
  8297. if not sts: return ''
  8298. #printDBG( 'Parser Bonga link2: '+data )
  8299. serwer = self.cm.ph.getSearchGroups(data, '''"videoServerUrl":['"]([^"^']+?)['"]''', 1, True)[0]
  8300. printDBG( 'Parser Bonga serwer: '+serwer )
  8301. url_m3u8 = 'https:' + serwer.replace('\/','/') + '/hls/stream_' +username + '/playlist.m3u8'
  8302. if serwer:
  8303. videoUrl = urlparser.decorateUrl(url_m3u8, {'User-Agent': host, 'Referer':'https://bongacams.com/'+username})
  8304. if self.cm.isValidUrl(videoUrl):
  8305. tmp = getDirectM3U8Playlist(videoUrl)
  8306. #if not tmp: return ''
  8307. try: tmp = sorted(tmp, key=lambda item: int(item.get('bitrate', '0')))
  8308. except Exception: pass
  8309. for item in tmp:
  8310. printDBG( 'Host listsItems valtab: ' +str(item))
  8311. try:
  8312. if item['bitrate']=='unknown':
  8313. return ''
  8314. return item['url']
  8315. printDBG( 'item bitrate: ' +str(item['bitrate']))
  8316. except Exception: pass
  8317. return ''
  8318. if parser == 'http://www.livejasmin.com':
  8319. COOKIEFILE = os_path.join(GetCookieDir(), 'livejasmin.cookie')
  8320. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  8321. sts, data = self.getPage(url, 'livejasmin.cookie', 'livejasmin.com', self.defaultParams)
  8322. if not sts: return ''
  8323. printDBG( 'Host listsItems data: '+str(data) )
  8324. performerid = self.cm.ph.getSearchGroups(data, '''performerid":['"]([^"^']+?)['"]''', 1, True)[0]
  8325. sbip = self.cm.ph.getSearchGroups(data, '''sbip":['"]([^"^']+?)['"]''', 1, True)[0]
  8326. sbhash = self.cm.ph.getSearchGroups(data, '''sbhash":['"]([^"^']+?)['"]''', 1, True)[0]
  8327. #stream = urllib.unquote('https://dss-live-109-71-162-52.dditscdn.com/stream?url=rtmp%3A%2F%2F109.71.162.52%2FmemberChat%2FjasminSoniaCrystall3a6ac2233e19448a3ee26466ed126451%3FsessionId-7133bcde23b0f6ea7ee68440b313d4d1%7CclientInstanceId-44077313838477700147795168240074&stream=free%2Fstream_864_480_830&cid=420210&pid=83906493378')
  8328. stream = 'https://dss-live-'+sbip.replace('.','-')+'.dditscdn.com/stream?url=rtmp://'+sbip+'/memberChat/'+performerid+sbhash
  8329. #stream = 'https://dss-hls-'+sbip.replace('.','-')+'.dditscdn.com/h5live/http/playlist.m3u8'
  8330. #self.defaultParams['max_data_size'] = 0
  8331. sts, data = self.getPage(stream, 'livejasmin.cookie', 'livejasmin.com', self.defaultParams)
  8332. if not sts: return ''
  8333. printDBG( 'Host listsItems data: '+str(data) )
  8334. return data.meta['url']
  8335. return ''
  8336. if parser == 'https://www.cam4.com':
  8337. COOKIEFILE = os_path.join(GetCookieDir(), 'cam4.cookie')
  8338. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8339. self.HTTP_HEADER['Referer'] = url
  8340. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8341. sts, data = self.get_Page(url, self.defaultParams)
  8342. if not sts: return ''
  8343. self.page = 1
  8344. printDBG( 'Host listsItems data: '+data )
  8345. Url = self.cm.ph.getSearchGroups(data, '''hlsUrl: ['"]([^"^']+?)['"]''')[0]+'?referer=cam4.com&timestamp='+str(int(time_time()*1000))
  8346. #Url = urlparser.decorateUrl(Url, {'User-Agent': host})
  8347. if self.cm.isValidUrl(Url):
  8348. tmp = getDirectM3U8Playlist(Url, checkExt=False, variantCheck=False, checkContent=True, sortWithMaxBitrate=99999999)
  8349. for item in tmp:
  8350. printDBG( 'Host listsItems valtab: ' +str(item))
  8351. return item['url'] #urlparser.decorateUrl(item['url'], {'User-Agent': host})
  8352. return ''
  8353. if parser == 'https://www.camsoda.com/':
  8354. if 'rtmp' in url:
  8355. rtmp = 1
  8356. else:
  8357. rtmp = 0
  8358. url = url.replace('rtmp','')
  8359. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  8360. try: data = self.cm.getURLRequestData(query_data)
  8361. except:
  8362. printDBG( 'Host getResolvedURL query error url: '+url )
  8363. return ''
  8364. #printDBG( 'Host getResolvedURL data: '+data )
  8365. dane = '['+data+']'
  8366. #printDBG( 'Host listsItems json: '+dane )
  8367. result = simplejson.loads(dane)
  8368. if result:
  8369. try:
  8370. for item in result:
  8371. token = str(item["token"])
  8372. app = str(item["app"])
  8373. serwer = str(item["edge_servers"][0])
  8374. #edge_servers2 = str(item["edge_servers"][1])
  8375. stream_name = str(item["stream_name"])
  8376. #printDBG( 'Host listsItems token: '+token )
  8377. #printDBG( 'Host listsItems app: '+app )
  8378. #printDBG( 'Host listsItems edge_servers1: '+serwer )
  8379. #printDBG( 'Host listsItems edge_servers2: '+edge_servers2 )
  8380. #printDBG( 'Host listsItems stream_name: '+stream_name )
  8381. name = re.sub('-enc.+', '', stream_name)
  8382. if rtmp == 0:
  8383. #Url = 'https://%s/%s/mp4:%s_mjpeg/playlist.m3u8?token=%s' % (serwer, app, stream_name, token )
  8384. Url = 'https://%s/%s/mp4:%s_aac/playlist.m3u8?token=%s' % (serwer, app, stream_name, token )
  8385. USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0'
  8386. Url = urlparser.decorateUrl(Url, {'User-Agent': USER_AGENT})
  8387. if self.cm.isValidUrl(Url):
  8388. tmp = getDirectM3U8Playlist(Url)
  8389. for item in tmp:
  8390. #printDBG( 'Host listsItems valtab: ' +str(item))
  8391. if str(item["with"])=='0':
  8392. SetIPTVPlayerLastHostError(' OFFLINE')
  8393. return []
  8394. return item['url']
  8395. SetIPTVPlayerLastHostError(' OFFLINE')
  8396. return []
  8397. else:
  8398. Url = 'rtmp://%s:1935/%s?token=%s/ playpath=?mp4:%s swfUrl=https://www.camsoda.com/lib/video-js/video-js.swf live=1 pageUrl=https://www.camsoda.com/%s' % (serwer, app, token, stream_name, name)
  8399. return Url
  8400. except Exception: printExc()
  8401. return ''
  8402. if parser == 'xxxlist.txt':
  8403. videoUrls = self.getLinksForVideo(url)
  8404. if videoUrls:
  8405. for item in videoUrls:
  8406. Url = item['url']
  8407. Name = item['name']
  8408. printDBG( 'Host url: '+Url )
  8409. return Url
  8410. return ''
  8411. if parser == 'http://xhamster.com/cams':
  8412. config='http://xhamsterlive.com/api/front/config'
  8413. COOKIEFILE = os_path.join(GetCookieDir(), 'xhamsterlive.cookie')
  8414. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8415. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8416. sts, data = self.get_Page(config)
  8417. if not sts: return ''
  8418. printDBG( 'Host listsItems data1: '+data )
  8419. parse = re.search('"sessionHash":"(.*?)"', data, re.S)
  8420. if not parse: return ''
  8421. sessionHash = parse.group(1)
  8422. printDBG( 'Host sessionHash: '+sessionHash )
  8423. models='http://xhamsterlive.com/api/front/models'
  8424. COOKIEFILE = os_path.join(GetCookieDir(), 'xhamsterlive.cookie')
  8425. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8426. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8427. sts, data = self.get_Page(models)
  8428. if not sts: return ''
  8429. printDBG( 'Host listsItems data2: '+data )
  8430. result = simplejson.loads(data)
  8431. try:
  8432. for item in result["models"]:
  8433. ID = str(item["id"])
  8434. Name = item["username"]
  8435. BroadcastServer = item["broadcastServer"]
  8436. swf_url = 'http://xhamsterlive.com/assets/cams/components/ui/Player/player.swf?bgColor=2829099&isModel=false&version=1.5.892&bufferTime=1&camFPS=30&camKeyframe=15&camQuality=85&camWidth=640&camHeight=480'
  8437. Url = 'rtmp://b-eu10.stripcdn.com:1935/%s?sessionHash=%s&domain=xhamsterlive.com playpath=%s swfUrl=%s pageUrl=http://xhamsterlive.com/cams/%s live=1 ' % (BroadcastServer, sessionHash, ID, swf_url, Name)
  8438. Url = 'rtmp://b-eu10.stripcdn.com:1935/%s?sessionHash=%s&domain=xhamsterlive.com playpath=%s swfVfy=%s pageUrl=http://xhamsterlive.com/cams/%s live=1 ' % (BroadcastServer, sessionHash, ID, swf_url, Name)
  8439. if ID == url:
  8440. return urlparser.decorateUrl(Url, {'Referer': 'https://xhamsterlive.com/cams/'+Name, 'iptv_livestream': True})
  8441. except Exception:
  8442. printExc()
  8443. return ''
  8444. if parser == 'http://www.cliphunter.com':
  8445. host = 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3'
  8446. header = {'User-Agent': host, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
  8447. query_data = { 'url': url, 'header': header, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  8448. try:
  8449. data = self.cm.getURLRequestData(query_data)
  8450. except:
  8451. return ''
  8452. #printDBG( 'Host listsItems data: '+data )
  8453. url = re.findall('"url":"(.*?)"}', data, re.S)
  8454. if url:
  8455. url = url[-1]
  8456. url = url.replace('\u0026', '.').replace(r"\/",r"/")
  8457. if url.startswith('http'): return url
  8458. url = re.findall('"url":"(.*?)"}', data, re.S)
  8459. if url:
  8460. url = url[-1]
  8461. url = url.replace('\u0026', '.')
  8462. translation_table = {
  8463. 'm': 'a', 'b': 'b', 'c': 'c', 'i': 'd', 'd': 'e', 'g': 'f', 'a': 'h',
  8464. 'z': 'i', 'y': 'l', 'n': 'm', 'l': 'n', 'f': 'o', 'v': 'p', 'x': 'r',
  8465. 'r': 's', 'q': 't', 'p': 'u', 'e': 'v',
  8466. '$': ':', '&': '.', '(': '=', '^': '&', '=': '/',
  8467. }
  8468. url = ''.join(translation_table.get(c, c) for c in url)
  8469. return url
  8470. else: return ''
  8471. if parser == 'http://www.redtube.com':
  8472. COOKIEFILE = os_path.join(GetCookieDir(), 'redtube.cookie')
  8473. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8474. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8475. sts, data = self.get_Page(url)
  8476. if not sts: return ''
  8477. printDBG( 'Host listsItems data: '+data )
  8478. parse = re.search('mediaDefinition: (.*?)],', data, re.S)
  8479. if not parse: return ''
  8480. result = simplejson.loads(parse.group(1)+']')
  8481. if result:
  8482. for item in result:
  8483. videoUrl = str(item["videoUrl"])
  8484. quality = item["quality"]
  8485. printDBG( 'Host quality'+quality )
  8486. printDBG( 'Host videoUrl'+videoUrl )
  8487. if videoUrl: return videoUrl
  8488. return ''
  8489. if parser == 'http://www.tube8.com/embed/':
  8490. return self.getResolvedURL(url.replace(r"embed/",r""))
  8491. if parser == 'http://www.pornhub.com/embed/':
  8492. return self.getResolvedURL(url.replace(r"embed/",r"view_video.php?viewkey="))
  8493. if parser == 'http://www.tube8.com':
  8494. COOKIEFILE = os_path.join(GetCookieDir(), 'tube8.cookie')
  8495. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8496. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8497. sts, data = self.get_Page(url)
  8498. if not sts: return ''
  8499. #printDBG( 'Host getResolvedURL data: '+data )
  8500. videoUrl = self.cm.ph.getSearchGroups(data, '''quality_720p['"]:['"]([^"^']+?)['"]''')[0]
  8501. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''quality_480p['"]:['"]([^"^']+?)['"]''')[0]
  8502. return videoUrl.replace('\/','/')
  8503. if parser == 'http://www.4tube.com':
  8504. COOKIEFILE = os_path.join(GetCookieDir(), '4tube.cookie')
  8505. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8506. if url.startswith('https://www.4tube.com'):
  8507. self.HTTP_HEADER['Origin'] = 'https://www.4tube.com'
  8508. elif url.startswith('https://www.fux.com'):
  8509. self.HTTP_HEADER['Origin'] = 'https://www.fux.com'
  8510. elif url.startswith('https://www.pornerbros.com'):
  8511. self.HTTP_HEADER['Origin'] = 'https://www.pornerbros.com'
  8512. elif url.startswith('https://www.porntube.com'):
  8513. self.HTTP_HEADER['Origin'] = 'https://www.porntube.com'
  8514. self.HTTP_HEADER['Referer'] = url
  8515. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8516. sts, data = self.get_Page(url)
  8517. if not sts: return ''
  8518. printDBG( 'Host listsItems data: '+data )
  8519. domena = url.split('/')[2].replace ('www.','')
  8520. printDBG( 'Host domain: '+domena )
  8521. videoID = re.findall('data-id="(\d+)".*?data-quality="(\d+)"', data, re.S)
  8522. try:
  8523. init = self.cm.ph.getSearchGroups(data, '''window.INITIALSTATE\s*?=\s*?['"]([^"^']+?)['"]''', 1, True)[0]
  8524. init = urllib.unquote(base64.b64decode(init))
  8525. #printDBG( 'Host listsItems init: '+init )
  8526. try:
  8527. result = byteify(simplejson.loads(init)["page"])
  8528. except Exception:
  8529. printExc()
  8530. result = byteify(simplejson.loads(data))
  8531. videoID = result["video"]["mediaId"]
  8532. info = {}
  8533. res = ''
  8534. for item in result["video"]["encodings"]:
  8535. res += str(item["height"]) + "+"
  8536. res.strip('+')
  8537. posturl = "https://token.%s/0000000%s/desktop/%s" % (domena, videoID, res)
  8538. printDBG( 'Host getResolvedURL posturl: '+posturl )
  8539. sts, data = self.get_Page(posturl)
  8540. if not sts: return ''
  8541. printDBG( 'Host getResolvedURL posturl data1: '+data )
  8542. videoUrl = re.findall('token":"(.*?)"', data, re.S)
  8543. if videoUrl: return videoUrl[-1]
  8544. except Exception:
  8545. printExc()
  8546. if videoID:
  8547. res = ''
  8548. for x in videoID:
  8549. res += x[1] + "+"
  8550. res.strip('+')
  8551. posturl = "https://token.%s/0000000%s/desktop/%s" % (domena, videoID[-1][0], res)
  8552. printDBG( 'Host getResolvedURL posturl: '+posturl )
  8553. sts, data = self.get_Page(posturl)
  8554. if not sts: return ''
  8555. printDBG( 'Host getResolvedURL posturl data2: '+data )
  8556. videoUrl = re.findall('token":"(.*?)"', data, re.S)
  8557. if videoUrl: return videoUrl[-1]
  8558. else: return ''
  8559. return ''
  8560. if parser == 'http://hotmovs.com':
  8561. COOKIEFILE = os_path.join(GetCookieDir(), 'hotmovs.cookie')
  8562. host = "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; androVM for VirtualBox ('Tablet' version with phone caps) Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
  8563. header = {'User-Agent': host, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
  8564. try: data = self.cm.getURLRequestData({ 'url': url, 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  8565. except:
  8566. printDBG( 'Host getResolvedURL query error url: '+url )
  8567. return ''
  8568. printDBG( 'Host getResolvedURL data: '+data )
  8569. videoPage = self.cm.ph.getSearchGroups(data, '''var video_url=['"]([^"^']+?)['"]''')[0]
  8570. hash = self.cm.ph.getSearchGroups(data, '''/get_file/(\d+/[^"^']+?)/''')[0]
  8571. printDBG( 'Host getResolvedURL videoPage: '+videoPage )
  8572. if videoPage:
  8573. decoder = "decrypt=function(_0xf4bdx6) {"\
  8574. "var _0xf4bdx7 = '',"\
  8575. " _0xf4bdx8 = 0;"\
  8576. "/[^\u0410\u0412\u0421\u0415\u041cA-Za-z0-9\.\,\~]/g ['exec'](_0xf4bdx6) && console['log']('error decoding url');"\
  8577. "_0xf4bdx6 = _0xf4bdx6['replace'](/[^\u0410\u0412\u0421\u0415\u041cA-Za-z0-9\.\,\~]/g, '');"\
  8578. "do {"\
  8579. "var _0xf4bdx9 = '\u0410\u0412\u0421D\u0415FGHIJKL\u041CNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~' ['indexOf'](_0xf4bdx6['charAt'](_0xf4bdx8++)),"\
  8580. "_0xf4bdxa = '\u0410\u0412\u0421D\u0415FGHIJKL\u041CNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~' ['indexOf'](_0xf4bdx6['charAt'](_0xf4bdx8++)),"\
  8581. "_0xf4bdxb = '\u0410\u0412\u0421D\u0415FGHIJKL\u041CNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~' ['indexOf'](_0xf4bdx6['charAt'](_0xf4bdx8++)),"\
  8582. "_0xf4bdxc = '\u0410\u0412\u0421D\u0415FGHIJKL\u041CNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~' ['indexOf'](_0xf4bdx6['charAt'](_0xf4bdx8++)),"\
  8583. "_0xf4bdx9 = _0xf4bdx9 << 2 | _0xf4bdxa >> 4,"\
  8584. "_0xf4bdxa = (_0xf4bdxa & 15) << 4 | _0xf4bdxb >> 2,"\
  8585. "_0xf4bdxd = (_0xf4bdxb & 3) << 6 | _0xf4bdxc,"\
  8586. "_0xf4bdx7 = _0xf4bdx7 + String['fromCharCode'](_0xf4bdx9);"\
  8587. "64 != _0xf4bdxb && (_0xf4bdx7 += String['fromCharCode'](_0xf4bdxa));"\
  8588. "64 != _0xf4bdxc && (_0xf4bdx7 += String['fromCharCode'](_0xf4bdxd))"\
  8589. "} while (_0xf4bdx8 < _0xf4bdx6['length']);;"\
  8590. "return unescape(_0xf4bdx7)"\
  8591. "};"
  8592. js = decoder + "\n" + "vidurl = decrypt('"+videoPage+"');"
  8593. printDBG( 'Host getResolvedURL js: '+js )
  8594. urls = js_execute( js+ '\nfor (n in this){print(n+"="+this[n]+";");}')
  8595. videoUrl = self.cm.ph.getSearchGroups(urls['data'], '''vidurl=([^"^']+?);''')[0]
  8596. printDBG( 'Host hash: '+hash )
  8597. printDBG( 'Host videoUrl.split4: '+videoUrl.split('/')[-6] )
  8598. printDBG( 'Host videoUrl.split5: '+videoUrl.split('/')[-5] )
  8599. if hash: videoUrl = videoUrl.replace(videoUrl.split('/')[-6]+'/'+videoUrl.split('/')[-5],hash)
  8600. if videoUrl: return videoUrl
  8601. if videoPage.startswith('http'): return videoPage
  8602. videoUrl = self.cm.ph.getSearchGroups(data, '''file\':\s['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  8603. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  8604. return urllib2.unquote(videoUrl)
  8605. if parser == 'https://www.txxx.com':
  8606. COOKIEFILE = os_path.join(GetCookieDir(), 'txxx.cookie')
  8607. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8608. sts, data = self.getPage(url, 'txxx.cookie', 'txxx.com', self.defaultParams)
  8609. if not sts: return ''
  8610. printDBG( 'Host listsItems data: '+data )
  8611. videoUrl = re.search('video_url":"([^"]+)', data).group(1)
  8612. replacemap = {'M':'\u041c', 'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', '=':'~', '+':'.', '/':','}
  8613. for key in replacemap:
  8614. videoUrl = videoUrl.replace(replacemap[key], key)
  8615. videoUrl = base64.b64decode(videoUrl)
  8616. if videoUrl.startswith('//'): videoUrl = 'https:' + videoUrl
  8617. if videoUrl.startswith('/'): videoUrl = 'https://txxx.com' + videoUrl
  8618. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  8619. if parser == 'http://www.youporn.com':
  8620. COOKIEFILE = os_path.join(GetCookieDir(), 'youporn.cookie')
  8621. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8622. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8623. self.defaultParams['header']['Referer'] = url
  8624. sts, data = self.get_Page(url)
  8625. if not sts: return ''
  8626. printDBG( 'Host getResolvedURL data: '+data )
  8627. if 'mediaDefinition' in data:
  8628. try:
  8629. sources = self.cm.ph.getDataBeetwenMarkers(data, 'mediaDefinition = ', '];', False)[1]
  8630. result = byteify(simplejson.loads(sources+']'))
  8631. for item in result:
  8632. if str(item["quality"])=='720' : return str(item["videoUrl"]).replace('\u0026', '&')
  8633. if str(item["quality"])=='480' : return str(item["videoUrl"]).replace('\u0026', '&')
  8634. if str(item["quality"])=='360' : return str(item["videoUrl"]).replace('\u0026', '&')
  8635. if str(item["quality"])=='240' : return str(item["videoUrl"]).replace('\u0026', '&')
  8636. except Exception as e:
  8637. printExc()
  8638. videoUrl = self.cm.ph.getSearchGroups(data, '''"videoUrl":['"]([^'"]+?)['"]''')[0].replace('&amp;','&').replace(r"\/",r"/")
  8639. if videoUrl: return videoUrl.replace('\u0026', '&')
  8640. return ''
  8641. # make by 12asdfg12
  8642. def ssut51(str):
  8643. str = re.sub(r'\D', '', str)
  8644. sut = 0
  8645. for i in range(0, len(str)):
  8646. sut += int(str[i])
  8647. return sut
  8648. if parser == 'https://yourporn.sexy':
  8649. for x in range(1, 99):
  8650. COOKIEFILE = os_path.join(GetCookieDir(), 'yourporn.cookie')
  8651. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8652. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  8653. self.defaultParams['header']['Origin'] = 'https://sxyprn.com'
  8654. sts, data = self.getPage(url, 'yourporn.cookie', 'sxyprn.com', self.defaultParams)
  8655. if not sts: return ''
  8656. #printDBG( 'Host listsItems data: '+str(data) )
  8657. videoUrl = self.cm.ph.getSearchGroups(data, '''data-vnfo=['"].*?:['"]([^"^']+?)['"]''')[0].replace(r"\/",r"/")
  8658. if videoUrl:
  8659. printDBG( 'Host listsItems videoUrl: '+videoUrl )
  8660. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  8661. if videoUrl.startswith('/'): videoUrl = 'https://sxyprn.com' + videoUrl
  8662. try:
  8663. match = re.search('src="(/js/main[^"]+)"', data, re.DOTALL | re.IGNORECASE)
  8664. if match.group(1).startswith('/'): result = 'https://sxyprn.com' + match.group(1)
  8665. sts, jsscript = self.getPage(result, 'yourporn.cookie', 'sxyprn.com', self.defaultParams)
  8666. replaceint = re.search(r'tmp\[1\]\+= "(\d+)";', jsscript, re.DOTALL | re.IGNORECASE).group(1)
  8667. videoUrl = videoUrl.replace('/cdn/', '/cdn%s/' % replaceint)
  8668. except:
  8669. if '/cdn/' in videoUrl: videoUrl = videoUrl.replace('/cdn/','/cdn'+str(self.yourporn)+'/')
  8670. videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': url, 'Origin': 'https://sxyprn.com'})
  8671. tmp = videoUrl.split('/')
  8672. a = str(int(tmp[-3]) - ssut51(re.sub(r'\D', '', tmp[-2])) - ssut51(re.sub(r'\D', '', tmp[-1])))
  8673. if int(a)>0:
  8674. tmp[-3] = a
  8675. else:
  8676. tmp[-3] = str(int(tmp[-3])-101)
  8677. videoUrl = '/'.join(tmp)
  8678. self.defaultParams['max_data_size'] = 0
  8679. sts, data = self.getPage(videoUrl, 'yourporn.cookie', 'sxyprn.com', self.defaultParams)
  8680. if not sts: return ''
  8681. if not 'sxyprn' in data.meta['url']: return data.meta['url']
  8682. return ''
  8683. if parser == 'https://www.playvids.com':
  8684. COOKIEFILE = os_path.join(GetCookieDir(), 'playvids.cookie')
  8685. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8686. sts, data = self.getPage(url, 'playvids.cookie', 'playvids.com', self.defaultParams)
  8687. if not sts: return ''
  8688. printDBG( 'Host listsItems data: '+str(data) )
  8689. videoUrl = self.cm.ph.getSearchGroups(data, '''src720=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  8690. if videoUrl:
  8691. return self.FullUrl(videoUrl)
  8692. videoUrl = self.cm.ph.getSearchGroups(data, '''src480=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  8693. if videoUrl:
  8694. return self.FullUrl(videoUrl)
  8695. videoUrl = self.cm.ph.getSearchGroups(data, '''src360=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  8696. if videoUrl:
  8697. return self.FullUrl(videoUrl)
  8698. return ''
  8699. if parser == 'http://www.tubewolf.com':
  8700. COOKIEFILE = os_path.join(GetCookieDir(), 'tubewolf.cookie')
  8701. for x in range(1, 10):
  8702. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8703. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8704. sts, data = self.get_Page(url)
  8705. if not sts: return ''
  8706. printDBG( 'Host listsItems data: '+data )
  8707. data = self.cm.ph.getDataBeetwenMarkers(data, '<video id', '</video>', False)[1]
  8708. videoUrl = re.findall('<source\ssrc="(.*?)"', data, re.S)
  8709. if videoUrl:
  8710. return videoUrl[-1]
  8711. if parser == 'https://streamate.com':
  8712. COOKIEFILE = os_path.join(GetCookieDir(), 'streamate.cookie')
  8713. url = 'https://streamate.com/blacklabel/hybrid/?name={}&lang=en&manifestUrlRoot=https://sea1c-ls.naiadsystems.com/sea1c-edge-ls/80/live/s:'.format(url)
  8714. query_data = { 'url': url, 'use_host': False, 'use_cookie': True, 'save_cookie': False, 'load_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
  8715. try:
  8716. data = self.cm.getURLRequestData(query_data)
  8717. except Exception as e:
  8718. printExc()
  8719. printDBG( 'Host listsItems query error url:'+url )
  8720. return ''
  8721. printDBG( 'Host listsItems data: '+data )
  8722. url = self.cm.ph.getSearchGroups(data, '''data-manifesturl=['"]([^"^']+?)['"]''')[0]
  8723. header = {'Referer': 'https://streamate.com', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
  8724. query_data = { 'url': url, 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': False, 'load_cookie': True, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True }
  8725. try:
  8726. data = self.cm.getURLRequestData(query_data)
  8727. except Exception as e:
  8728. printExc()
  8729. printDBG( 'Host listsItems query error url:'+url )
  8730. return ''
  8731. printDBG( 'Host listsItems data2: '+data )
  8732. try:
  8733. videoinfo = simplejson.loads(data)
  8734. videoUrl = videoinfo['formats']['mp4-hls']['manifest']
  8735. videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': 'https://streamate.com', 'iptv_livestream': True})
  8736. if '.m3u8' in videoUrl:
  8737. if self.cm.isValidUrl(videoUrl):
  8738. tmp = getDirectM3U8Playlist(videoUrl)
  8739. for item in tmp:
  8740. printDBG( 'Host listsItems valtab: ' +str(item))
  8741. return item['url']
  8742. return videoUrl
  8743. except Exception as e:
  8744. printExc()
  8745. return ''
  8746. if parser == 'http://www.youjizz.com':
  8747. COOKIEFILE = os_path.join(GetCookieDir(), 'youjizz.cookie')
  8748. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8749. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8750. sts, data = self.get_Page(url)
  8751. if not sts: return
  8752. #printDBG( 'Host listsItems data: '+data )
  8753. #host = 'iPhone'
  8754. #header = {'User-Agent': host, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'X-Requested-With':'XMLHttpRequest'}
  8755. #try: data = self.cm.getURLRequestData({ 'url': url, 'header': header, 'use_host': False, 'use_cookie': True, 'save_cookie': True, 'load_cookie': False, 'cookiefile': COOKIEFILE, 'use_post': False, 'return_data': True })
  8756. #except:
  8757. # printDBG( 'Host getResolvedURL query error url: '+url )
  8758. # return ''
  8759. #printDBG( 'Host getResolvedURL data: '+data )
  8760. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"1080","filename":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  8761. if videoPage:
  8762. if videoPage.startswith('//'): videoPage = 'http:' + videoPage
  8763. return videoPage.replace("&amp;","&")
  8764. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"720","filename":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  8765. if videoPage:
  8766. if videoPage.startswith('//'): videoPage = 'http:' + videoPage
  8767. return videoPage.replace("&amp;","&")
  8768. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"480","filename":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  8769. if videoPage:
  8770. if videoPage.startswith('//'): videoPage = 'http:' + videoPage
  8771. return videoPage.replace("&amp;","&")
  8772. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"360","filename":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  8773. if videoPage:
  8774. if videoPage.startswith('//'): videoPage = 'http:' + videoPage
  8775. return videoPage.replace("&amp;","&")
  8776. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"288","filename":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  8777. if videoPage:
  8778. if videoPage.startswith('//'): videoPage = 'http:' + videoPage
  8779. return videoPage.replace("&amp;","&")
  8780. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"270","filename":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  8781. if videoPage:
  8782. if videoPage.startswith('//'): videoPage = 'http:' + videoPage
  8783. return videoPage.replace("&amp;","&")
  8784. videoPage = self.cm.ph.getSearchGroups(data, '''"filename":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  8785. if videoPage:
  8786. if videoPage.startswith('//'): videoPage = 'http:' + videoPage
  8787. return videoPage.replace("&amp;","&")
  8788. videoPage = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0]
  8789. if videoPage:
  8790. if videoPage.startswith('//'): videoPage = 'http:' + videoPage
  8791. return videoPage.replace("&amp;","&")
  8792. error = self.cm.ph.getDataBeetwenMarkers(data, '<p class="text-gray">', '</p>', False)[1]
  8793. if error:
  8794. SetIPTVPlayerLastHostError(_(error))
  8795. return []
  8796. return ''
  8797. if parser == 'https://www.ashemaletube.com':
  8798. COOKIEFILE = os_path.join(GetCookieDir(), 'ASHEMALETUBE.cookie')
  8799. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  8800. sts, data = self.getPage(url, 'ASHEMALETUBE.cookie', 'ashemaletube.com', self.defaultParams)
  8801. if not sts: return ''
  8802. printDBG( 'Host listsItems data: '+data )
  8803. if 'sources: ' in data:
  8804. try:
  8805. sources = self.cm.ph.getDataBeetwenMarkers(data, 'sources: ', ']', False)[1]
  8806. result = byteify(simplejson.loads(sources+']'))
  8807. for item in result:
  8808. if str(item["desc"])=='720p' and str(item["active"])=='true': return str(item["src"])
  8809. if str(item["desc"])=='480p' and str(item["active"])=='true': return str(item["src"])
  8810. if str(item["desc"])=='360p' and str(item["active"])=='true': return str(item["src"])
  8811. except Exception as e:
  8812. printExc()
  8813. videoUrl = self.cm.ph.getSearchGroups(data, '''source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  8814. if videoUrl:
  8815. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  8816. return videoUrl
  8817. if 'To watch this video please' in data:
  8818. SetIPTVPlayerLastHostError(_(' Login Protected.'))
  8819. return []
  8820. return ''
  8821. if parser == 'http://www.pornhub.com':
  8822. COOKIEFILE = os_path.join(GetCookieDir(), 'pornhub.cookie')
  8823. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8824. sts, data = self._getPage(url, self.defaultParams)
  8825. if not sts: return ''
  8826. printDBG( 'Host listsItems data: '+data )
  8827. try:
  8828. match = re.compile(r"""quality_([0-9]{3,4})p\s*=(?:"|')?([^'";]+)(?:"|')?;""", re.DOTALL | re.IGNORECASE).findall(data)
  8829. match = sorted(match, key=lambda x: int(x[0]), reverse=True)
  8830. videolink = match[0][1]
  8831. if "/*" in videolink:
  8832. videolink = re.sub(r"/\*[^/]+/", "", videolink).replace("+","")
  8833. linkparts = re.compile(r"(\w+)", re.DOTALL | re.IGNORECASE).findall(videolink)
  8834. for part in linkparts:
  8835. partval = re.compile(part+'="(.*?)";', re.DOTALL | re.IGNORECASE).findall(data)[0]
  8836. partval = partval.replace('" + "','')
  8837. videolink = videolink.replace(part, partval)
  8838. videoUrl = videolink.replace(" ","")
  8839. printDBG( 'Host videoUrl: '+videoUrl )
  8840. if videoUrl: return strwithmeta(videoUrl, {'Referer':url})
  8841. except Exception:
  8842. printExc()
  8843. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"720","videoUrl":['"]([^"^']+?)['"]''')[0]
  8844. if videoPage: return videoPage.replace('\/','/')
  8845. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"480","videoUrl":['"]([^"^']+?)['"]''')[0]
  8846. if videoPage: return videoPage.replace('\/','/')
  8847. videoPage = self.cm.ph.getSearchGroups(data, '''"quality":"240","videoUrl":['"]([^"^']+?)['"]''')[0]
  8848. if videoPage: return videoPage.replace('\/','/')
  8849. try:
  8850. #js = re.findall('(var flashvars_(?:\d+).*?)loadScriptUniqueId', data, re.S)
  8851. js = re.findall('type="text/javascript">.*?(var\sflashvars.*?)</script>', data, re.S)
  8852. #js = self.cm.ph.getDataBeetwenMarkers(data, 'var flashvars_', 'loadScriptUniqueId', False)[1]
  8853. printDBG( 'Host data js: '+js[0] )
  8854. if js:
  8855. urls = js_execute( js[0]+ '\nfor (n in this){print(n+"="+this[n]+";");}')
  8856. videoPage = self.cm.ph.getSearchGroups(urls['data'], '''quality_1080p=([^"^']+?);''')[0]
  8857. if videoPage: return videoPage
  8858. videoPage = self.cm.ph.getSearchGroups(urls['data'], '''quality_720p=([^"^']+?);''')[0]
  8859. if videoPage: return videoPage
  8860. videoPage = self.cm.ph.getSearchGroups(urls['data'], '''quality_480p=([^"^']+?);''')[0]
  8861. if videoPage: return videoPage
  8862. videoPage = self.cm.ph.getSearchGroups(urls['data'], '''quality_240p=([^"^']+?);''')[0]
  8863. if videoPage: return videoPage
  8864. except Exception:
  8865. printExc()
  8866. embed = re.search('"embedCode":"<iframe src=."(.*?)"', data, re.S)
  8867. if embed:
  8868. url = embed.group(1).replace('\/','/').replace('\\','')
  8869. printDBG( 'Host data embed: '+url )
  8870. sts, data = self._getPage(url, self.defaultParams)
  8871. if not sts: return ''
  8872. printDBG( 'Host listsItems data: '+data )
  8873. videoPage = re.findall('quality_720p":"(.*?)"', data, re.S)
  8874. if videoPage: return videoPage[0].replace('\/','/')
  8875. videoPage = re.findall('quality_480p":"(.*?)"', data, re.S)
  8876. if videoPage: return videoPage[0].replace('\/','/')
  8877. return ''
  8878. if parser == 'https://chaturbate.com':
  8879. COOKIEFILE = os_path.join(GetCookieDir(), 'chaturbate.cookie')
  8880. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8881. self.defaultParams = {'header':self.HTTP_HEADER}
  8882. for x in range(1, 10):
  8883. sts, data = self.get_Page(url)
  8884. if not sts: return
  8885. printDBG( 'Host listsItems data: '+str(data) )
  8886. if '/auth/login/' in self.cm.meta['url']:
  8887. SetIPTVPlayerLastHostError(_(' PRIVATE.'))
  8888. if 'Room is currently offline' in data:
  8889. SetIPTVPlayerLastHostError(_(' OFFLINE.'))
  8890. host = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110621 Mandriva Linux/1.9.2.18-0.1mdv2010.2 (2010.2) Firefox/3.6.18'
  8891. videoPage = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0]
  8892. if not videoPage:
  8893. data = data.replace(r'\u0022','"').replace(r'\u002D','-')
  8894. videoPage = self.cm.ph.getSearchGroups(data, '''hls_source":\s*['"]([^"^']+?)['"]''')[0]
  8895. try:
  8896. item = []
  8897. videoUrl = videoPage.replace('&amp;','&')
  8898. videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': url, 'User-Agent':host})
  8899. tmp = getDirectM3U8Playlist(videoUrl, checkExt=True, variantCheck=True, checkContent=True, sortWithMaxBitrate=99999999)
  8900. for item in tmp:
  8901. printDBG( 'Host listsItems valtab1: ' +str(item))
  8902. if self.format4k:
  8903. return tmp[0]['url']
  8904. else:
  8905. if tmp[0]['height']<=1080 : return tmp[0]['url']
  8906. if tmp[1]['height']<=1080 : return tmp[1]['url']
  8907. if tmp[2]['height']<=1080 : return tmp[2]['url']
  8908. except Exception:
  8909. printExc()
  8910. return ''
  8911. if parser == 'https://www.mydirtyhobby.to':
  8912. COOKIEFILE = os_path.join(GetCookieDir(), 'mydirtyhobby.cookie')
  8913. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8914. sts, data = self._getPage(url, self.defaultParams)
  8915. if not sts: return
  8916. printDBG( 'Host listsItems data: '+str(data) )
  8917. videoPage = self.cm.ph.getSearchGroups(data, '''<iframe src=['"]([^"^']+?)['"]''', 1, True)[0]
  8918. if videoPage:
  8919. videoPage = urlparser.decorateUrl(videoPage, {'Referer': url})
  8920. return self.getResolvedURL(videoPage)
  8921. if "eval(function(p,a,c,k,e,d)" in data:
  8922. printDBG( 'Host resolveUrl packed' )
  8923. packed = re.compile('>eval\(function\(p,a,c,k,e,d\)(.+?)</script>', re.DOTALL).findall(data)
  8924. if packed:
  8925. data = packed[-1]
  8926. else:
  8927. return ''
  8928. printDBG( 'Host data4: '+str(data) )
  8929. try:
  8930. videoUrl = unpackJSPlayerParams(data, TEAMCASTPL_decryptPlayerParams, 0, True, True)
  8931. printDBG( 'OK4: ')
  8932. except Exception: pass
  8933. printDBG( 'Host videoUrl: '+str(videoUrl) )
  8934. videoPage = self.cm.ph.getSearchGroups(str(videoUrl), '''sources:\[['"]([^"^']+?)['"]''')[0]
  8935. printDBG( 'Host videoPage: '+str(videoPage) )
  8936. if videoPage: return videoPage
  8937. return ''
  8938. if parser == 'https://www.tnaflix.com':
  8939. COOKIEFILE = os_path.join(GetCookieDir(), 'tnaflix.cookie')
  8940. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8941. self.HTTP_HEADER['Referer'] = url
  8942. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8943. sts, data = self.get_Page(url)
  8944. if not sts: return
  8945. printDBG( 'Host listsItems data: '+str(data) )
  8946. vid = self.cm.ph.getSearchGroups(data, '''data-vid=['"]([^"^']+?)['"]''')[0]
  8947. nk = self.cm.ph.getSearchGroups(data, '''data-nk=['"]([^"^']+?)['"]''')[0]
  8948. vk = self.cm.ph.getSearchGroups(data, '''data-vk=['"]([^"^']+?)['"]''')[0]
  8949. xml = 'https://cdn-fck.tnaflix.com/tnaflix/%s.fid?key=%s&VID=%s&nomp4=1&catID=0&rollover=1&startThumb=31&embed=0&utm_source=0&multiview=0&premium=1&country=0user=0&vip=1&cd=0&ref=0&alpha' % (vk, nk, vid)
  8950. sts, data = self.get_Page(xml, self.defaultParams)
  8951. if not sts: return ''
  8952. printDBG( 'Host listsItems data: '+str(data) )
  8953. videoPage = re.findall('<videoLink>.*?//(.*?)(?:]]>|</videoLink>)', data, re.S)
  8954. if videoPage: return 'http://' + videoPage[-1]
  8955. videoUrl = self.cm.ph.getSearchGroups(data, '''download href=['"]([^"^']+?)['"]''')[0]
  8956. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"contentUrl" content=['"]([^"^']+?)['"]''')[0]
  8957. if videoUrl.startswith('//'): videoUrl = 'https:' + videoUrl
  8958. videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': url})
  8959. if videoUrl: return videoUrl
  8960. return ''
  8961. if parser == 'https://www.empflix.com':
  8962. COOKIEFILE = os_path.join(GetCookieDir(), 'empflix.cookie')
  8963. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  8964. self.HTTP_HEADER['Referer'] = url
  8965. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8966. sts, data = self.get_Page(url, self.defaultParams)
  8967. if not sts: return
  8968. printDBG( 'Host listsItems data: '+str(data) )
  8969. vid = self.cm.ph.getSearchGroups(data, '''data-vid=['"]([^"^']+?)['"]''')[0]
  8970. nk = self.cm.ph.getSearchGroups(data, '''data-nk=['"]([^"^']+?)['"]''')[0]
  8971. vk = self.cm.ph.getSearchGroups(data, '''data-vk=['"]([^"^']+?)['"]''')[0]
  8972. xml = 'https://cdn-fck.empflix.com/empflix/%s-1.fid?key=%s&VID=%s&nomp4=1&catID=0&rollover=1&startThumb=31&embed=0&utm_source=0&multiview=0&premium=1&country=0user=0&vip=1&cd=0&ref=0&alpha' % (vk, nk, vid)
  8973. sts, data = self.get_Page(xml, self.defaultParams)
  8974. if not sts: return ''
  8975. printDBG( 'Host listsItems data: '+str(data) )
  8976. videoPage = re.findall('<videoLink>.*?//(.*?)(?:]]>|</videoLink>)', data, re.S)
  8977. if videoPage: return 'http://' + videoPage[-1]
  8978. videoUrl = self.cm.ph.getSearchGroups(data, '''download href=['"]([^"^']+?)['"]''')[0]
  8979. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"contentUrl" content=['"]([^"^']+?)['"]''')[0]
  8980. if videoUrl.startswith('//'): videoUrl = 'https:' + videoUrl
  8981. videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': url})
  8982. if videoUrl: return videoUrl
  8983. return ''
  8984. if parser == 'http://www.moviefap.com':
  8985. COOKIEFILE = os_path.join(GetCookieDir(), 'moviefap.cookie')
  8986. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  8987. self.USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'
  8988. self.HEADER = {'User-Agent': self.USER_AGENT, 'DNT':'1', 'Accept': 'text/html'}
  8989. self.defaultParams = {'header':dict(self.HEADER)}
  8990. self.defaultParams['header']['Referer'] = url
  8991. sts, data = self.get_Page(url, self.defaultParams)
  8992. if not sts: return
  8993. printDBG( 'Host listsItems data: '+str(data) )
  8994. xml = self.cm.ph.getSearchGroups(data, '''flashvars.config.*?//([^"^']+?)['"]''')[0]
  8995. if not xml: xml = self.cm.ph.getSearchGroups(data, '''name="config".*?//([^"^']+?)['"]''')[0]
  8996. if xml:
  8997. videoUrl = "https://" + xml
  8998. sts, data = self.get_Page(videoUrl, self.defaultParams)
  8999. if not sts: return
  9000. printDBG( 'Host listsItems data2: '+str(data) )
  9001. url = re.findall('<videoLink>.*?//(.*?)(?:]]>|</videoLink>)', data, re.S)
  9002. if url:
  9003. return "http://" + url[-1].replace('&amp;','&')
  9004. return ''
  9005. if parser == 'https://www.pinflix.com':
  9006. COOKIEFILE = os_path.join(GetCookieDir(), 'pinflix.cookie')
  9007. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9008. sts, data = self.getPage(url, 'pinflix.cookie', 'pinflix.com', self.defaultParams)
  9009. if not sts: return ''
  9010. printDBG( 'Host listsItems data: '+str(data) )
  9011. videoUrl = self.cm.ph.getSearchGroups(data, '''<source[^>]+?src=['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9012. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"720p":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9013. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"480p":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9014. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"360p":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9015. if videoUrl.startswith('/'): videoUrl = 'https://www.pinflix.com' + videoUrl
  9016. self.defaultParams['max_data_size'] = 0
  9017. sts, data = self.getPage(videoUrl, 'pinflix.cookie', 'pinflix.com', self.defaultParams)
  9018. if not sts: return ''
  9019. return data.meta['url']
  9020. if parser == 'http://www.pornhd.com':
  9021. COOKIEFILE = os_path.join(GetCookieDir(), 'pornhd.cookie')
  9022. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9023. sts, data = self.getPage(url, 'pornhd.cookie', 'pornhd.com', self.defaultParams)
  9024. if not sts: return ''
  9025. printDBG( 'Host listsItems data: '+str(data) )
  9026. videoUrl = self.cm.ph.getSearchGroups(data, '''<source[^>]+?src=['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9027. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"1080p":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9028. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"720p":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9029. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"480p":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9030. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''"360p":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9031. if videoUrl.startswith('/'): videoUrl = 'https://www.pornhd.com' + videoUrl
  9032. self.defaultParams['max_data_size'] = 0
  9033. sts, data = self.getPage(videoUrl, 'pornhd.cookie', 'pornhd.com', self.defaultParams)
  9034. if not sts: return ''
  9035. return data.meta['url']
  9036. if parser == 'http://www.adulttvlive.net':
  9037. COOKIEFILE = os_path.join(GetCookieDir(), 'adulttv.cookie')
  9038. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9039. sts, data = self.getPage(url, 'adulttv.cookie', 'adulttv.net', self.defaultParams)
  9040. if not sts: return ''
  9041. printDBG( 'Host listsItems data1: '+data )
  9042. videoUrl = self.cm.ph.getSearchGroups(data, '''src=['"](https://adult-channels.com/channels/[^"^']+?)['"]''')[0]
  9043. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''src=['"](https://www.adulttvlive.net[^"^']+?embed/)['"]''')[0]
  9044. sts, data = self.getPage(videoUrl, 'adulttv.cookie', 'adulttv.net', self.defaultParams)
  9045. if not sts: return ''
  9046. printDBG( 'Host listsItems data2: '+data )
  9047. if 'porndig' in data:
  9048. videoUrl = self.cm.ph.getSearchGroups(data, '''src=['"]([^"^']+?)['"]''')[0]
  9049. return self.getResolvedURL(videoUrl)
  9050. if 'unescape' in data:
  9051. data = self.cm.ph.getAllItemsBeetwenMarkers(data, 'eval(', ');', False)
  9052. try:
  9053. ddata = ''
  9054. for idx in range(len(data)):
  9055. tmp = data[idx].split('+')
  9056. for item in tmp:
  9057. item = item.strip()
  9058. if item.startswith("'") or item.startswith('"'):
  9059. ddata += self.cm.ph.getSearchGroups(item, '''['"]([^'^"]+?)['"]''')[0]
  9060. else:
  9061. tmp2 = re.compile('''unescape\(['"]([^"^']+?)['"]''').findall(item)
  9062. for item2 in tmp2:
  9063. ddata += urllib.unquote(item2)
  9064. printDBG('Host listsItems ddata2: '+ddata)
  9065. funName = self.cm.ph.getSearchGroups(ddata, '''function\s*([^\(]+?)''')[0].strip()
  9066. sp = self.cm.ph.getSearchGroups(ddata, '''split\(\s*['"]([^'^"]+?)['"]''')[0]
  9067. modStr = self.cm.ph.getSearchGroups(ddata, '''\+\s*['"]([^'^"]+?)['"]''')[0]
  9068. modInt = int( self.cm.ph.getSearchGroups(ddata, '''\+\s*(-?[0-9]+?)[^0-9]''')[0] )
  9069. ddata = self.cm.ph.getSearchGroups(ddata, '''document\.write[^'^"]+?['"]([^'^"]+?)['"]''')[0]
  9070. data = ''
  9071. tmp = ddata.split(sp)
  9072. ddata = urllib.unquote(tmp[0])
  9073. k = urllib.unquote(tmp[1] + modStr)
  9074. for idx in range(len(ddata)):
  9075. data += chr((int(k[idx % len(k)]) ^ ord(ddata[idx])) + modInt)
  9076. printDBG('host data2: '+data)
  9077. if 'rtmp://' in data:
  9078. rtmpUrl = self.cm.ph.getDataBeetwenMarkers(data, '&source=', '&', False)[1]
  9079. if rtmpUrl == '':
  9080. rtmpUrl = self.cm.ph.getSearchGroups(data, r'''['"](rtmp[^"^']+?)['"]''')[0]
  9081. return rtmpUrl
  9082. elif '.m3u8' in data:
  9083. file = self.cm.ph.getSearchGroups(data, r'''['"](http[^"^']+?\.m3u8[^"^']*?)['"]''')[0]
  9084. if file == '': file = self.cm.ph.getDataBeetwenMarkers(data, 'src=', '&amp;', False)[1]
  9085. return file
  9086. except Exception:
  9087. printExc()
  9088. videoUrl = self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"]([^"^']+?)['"]''')[0]
  9089. if not videoUrl:
  9090. link = self.cm.ph.getSearchGroups(data, '''streamer":['"]([^"^']+?)['"]''')[0].replace(r"\/",r"/")
  9091. return 'http://www.filmon.com' + link
  9092. if not videoUrl: return ''
  9093. sts, data = self.getPage(videoUrl, 'adulttv.cookie', 'adulttv.net', self.defaultParams)
  9094. if not sts: return ''
  9095. printDBG( 'Host listsItems data3: '+data )
  9096. videoUrl = self.cm.ph.getSearchGroups(data, '''sources:\[\{file:['"]([^"^']+?)['"]''', 1, True)[0]
  9097. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''source:['"]([^"^']+?)['"]''', 1, True)[0]
  9098. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''file:['"]([^"^']+?)['"]''', 1, True)[0]
  9099. return videoUrl
  9100. if parser == 'https://www.balkanjizz.com':
  9101. COOKIEFILE = os_path.join(GetCookieDir(), 'balkanjizz.cookie')
  9102. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9103. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9104. sts, data = self.get_Page(url)
  9105. if not sts: return ''
  9106. printDBG( 'Host listsItems data: '+data )
  9107. return self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''', 1, True)[0]
  9108. if parser == 'https://pornorussia.tv':
  9109. COOKIEFILE = os_path.join(GetCookieDir(), 'pornorussia.cookie')
  9110. for x in range(1, 10):
  9111. sts, data = self.getPage(url, 'pornorussia.cookie', 'pornorussia.tv', self.defaultParams)
  9112. if not sts: return ''
  9113. #printDBG( 'Host listsItems data: '+data )
  9114. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''', 1, True)[0]
  9115. if videoUrl: return urlparser.decorateUrl(videoUrl, {'Referer': url, 'User-Agent':self.USER_AGENT})
  9116. return ''
  9117. if parser == 'https://www.letmejerk.com':
  9118. for x in range(1, 10):
  9119. COOKIEFILE = os_path.join(GetCookieDir(), 'letmejerk.cookie')
  9120. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9121. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9122. self.defaultParams['header']['Referer'] = url
  9123. sts, data = self.getPage(url, 'letmejerk.cookie', 'letmejerk.com', self.defaultParams)
  9124. if not sts: return ''
  9125. #printDBG( 'Host listsItems data1: '+data )
  9126. file = str(self.cm.ph.getAllItemsBeetwenMarkers(data, '<script', '</script>'))
  9127. tmp = file.split('|')
  9128. post = ''
  9129. for item in tmp:
  9130. item = item.strip()
  9131. if item.endswith("="): post = item
  9132. if item.startswith("eX"): post = item
  9133. if 'IWh0dHB' in item: post = item
  9134. #printDBG( 'Host post:%s' % base64.b64decode(post) )
  9135. #printDBG( 'Host post:%s' % base64.b64decode(post)[1:] )
  9136. #printDBG( 'Host post:%s' % base64.b64decode(post)[:len(post)] )
  9137. postdata = {'id' : url.split('/')[4]}
  9138. self.defaultParams['header']['X-Requested-With'] = 'XMLHttpRequest'
  9139. self.defaultParams['header']['Host'] = 'letmejerk.com'
  9140. sts, data = self.getPage('https://letmejerk.com/load/video/'+post+'/', 'letmejerk.cookie', 'letmejerk.com', self.defaultParams, postdata)
  9141. if not sts: return ''
  9142. printDBG( 'Host listsItems data2: '+data )
  9143. videoUrl = self.cm.ph.getSearchGroups(data, '''<source\ssrc=['"]([^"^']+?)['"]''', 1, True)[0]
  9144. poster = self.cm.ph.getSearchGroups(videoUrl, '''(@[^"^']+?#)''', 1, True)[0]
  9145. videoUrl = videoUrl.replace(poster,'')
  9146. if 'm3u8' in videoUrl:
  9147. videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': url, "Origin": "https://letmejerk.com"})
  9148. tmp = getDirectM3U8Playlist(videoUrl, checkContent=True, sortWithMaxBitrate=999999999)
  9149. for item in tmp:
  9150. return item['url']
  9151. HTTP_HEADER = {'Accept-Encoding': 'gzip, deflate', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'}
  9152. defaultParams = {'header':HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9153. defaultParams['header']['Referer'] = url
  9154. defaultParams['max_data_size'] = 0
  9155. defaultParams['header']['Host'] = videoUrl.split('/')[2]
  9156. #defaultParams['header']['User-Agent'] = ua
  9157. defaultParams['header']['Accept'] = "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5"
  9158. defaultParams['header']['Range'] = "bytes=0-"
  9159. defaultParams['header']['Referer'] = url
  9160. defaultParams['ignore_http_code_ranges'] = []
  9161. sts, data = self.getPage(videoUrl, 'letmejerk.cookie', 'letmejerk.com', defaultParams)
  9162. #if not sts: return ''
  9163. try:
  9164. if data.meta['location']: return self.FullUrl(data.meta['location'])
  9165. except Exception:
  9166. printExc()
  9167. return videoUrl
  9168. if parser == 'https://www.gotporn.com':
  9169. COOKIEFILE = os_path.join(GetCookieDir(), 'gotporn.cookie')
  9170. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9171. sts, data = self.getPage(url, 'gotporn.cookie', 'gotporn.com', self.defaultParams)
  9172. if not sts: return ''
  9173. printDBG( 'Host listsItems data: '+str(data) )
  9174. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9175. if videoUrl.startswith('/'): videoUrl = 'https://www.gotporn.com' + videoUrl
  9176. self.defaultParams['max_data_size'] = 0
  9177. sts, data = self.getPage(videoUrl, 'gotporn.cookie', 'gotporn.com', self.defaultParams)
  9178. if not sts: return ''
  9179. return data.meta['url']
  9180. if parser == 'https://www.analdin.com':
  9181. COOKIEFILE = os_path.join(GetCookieDir(), 'analdin.cookie')
  9182. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9183. sts, data = self.getPage(url, 'analdin.cookie', 'analdin.com', self.defaultParams)
  9184. if not sts: return ''
  9185. printDBG( 'Host listsItems data: '+str(data) )
  9186. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url:\s*['"]([^"^']+?)['"]''')[0].replace('\/','/')
  9187. if videoUrl.startswith('/'): videoUrl = 'https://www.analdin.com' + videoUrl
  9188. self.defaultParams['max_data_size'] = 0
  9189. sts, data = self.getPage(videoUrl, 'analdin.cookie', 'analdin.com', self.defaultParams)
  9190. if not sts: return ''
  9191. return data.meta['url']
  9192. if parser == 'https://www.pornomenge.com':
  9193. COOKIEFILE = os_path.join(GetCookieDir(), 'pornomenge.cookie')
  9194. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9195. sts, data = self.getPage(url, 'pornomenge.cookie', 'pornomenge.com', self.defaultParams)
  9196. if not sts: return ''
  9197. videoUrl = self.cm.ph.getSearchGroups(data, '''<source\ssrc=['"]([^"^']+?)['"]''')[0]
  9198. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9199. return videoUrl
  9200. if parser == 'https://www.koloporno.com':
  9201. COOKIEFILE = os_path.join(GetCookieDir(), 'koloporno.cookie')
  9202. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9203. sts, data = self.getPage(url, 'koloporno.cookie', 'koloporno.com', self.defaultParams)
  9204. if not sts: return ''
  9205. videoUrl = self.cm.ph.getSearchGroups(data, '''<source\ssrc=['"]([^"^']+?)['"]''')[0]
  9206. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9207. return videoUrl
  9208. if parser == 'http://www.sunporno.com':
  9209. COOKIEFILE = os_path.join(GetCookieDir(), 'sunporno.cookie')
  9210. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9211. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9212. sts, data = self.get_Page(url)
  9213. if not sts: return ''
  9214. printDBG( 'Host listsItems data: '+data )
  9215. videoPage = re.findall('video src="(.*?)"', data, re.S)
  9216. if videoPage:
  9217. printDBG( 'Host videoPage:'+videoPage[0])
  9218. return urlparser.decorateUrl(videoPage[0], {'Referer': url})
  9219. return ''
  9220. if parser == 'https://mini.zbiornik.com':
  9221. COOKIEFILE = os_path.join(GetCookieDir(), 'zbiornikmini.cookie')
  9222. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9223. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9224. sts, data = self.get_Page(url)
  9225. if not sts: return ''
  9226. printDBG( 'Host listsItems data: '+data )
  9227. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9228. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9229. return urllib2.unquote(videoUrl)
  9230. if parser == 'http://dato.porn':
  9231. #if not 'embed' in url:
  9232. # url = 'https://datoporn.co/embed-%s-658x400.html' % url.split('/')[-1]
  9233. USER_AGENT = 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36'
  9234. COOKIEFILE = os_path.join(GetCookieDir(), 'datoporn.cookie')
  9235. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9236. sts, data = self.getPage(url, 'datoporn.cookie', 'datoporn.co', self.defaultParams)
  9237. if not sts: return ''
  9238. printDBG( 'Host listsItems data: '+str(data) )
  9239. license_code = self.cm.ph.getSearchGroups(data, '''license_code\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9240. videoUrl = self.cm.ph.getSearchGroups(data, '''video_alt_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9241. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''video_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9242. printDBG( 'Host license_code: %s' % license_code )
  9243. printDBG( 'Host video_url: %s' % videoUrl )
  9244. if 'function/0/' in videoUrl:
  9245. videoUrl = decryptHash(videoUrl, license_code, '16')
  9246. return urlparser.decorateUrl(videoUrl, {'Referer': url, 'User-Agent': USER_AGENT})
  9247. if "eval(function(p,a,c,k,e,d)" in data:
  9248. printDBG( 'Host resolveUrl packed' )
  9249. packed = re.compile('>eval\(function\(p,a,c,k,e,d\)(.+?)</script>', re.DOTALL).findall(data)
  9250. if packed:
  9251. packed = packed[-1]
  9252. else:
  9253. return ''
  9254. printDBG( 'Host data4: '+str(packed) )
  9255. try:
  9256. videoPage = unpackJSPlayerParams(packed, TEAMCASTPL_decryptPlayerParams, 0, True, True)
  9257. printDBG( 'OK4: ')
  9258. except Exception: pass
  9259. printDBG( 'Host videoPage: '+str(videoPage) )
  9260. videoUrl = ph.search(videoPage, '''file:['"]([^'^"]+?)['"]''')[0]
  9261. if not videoUrl: videoUrl = ph.search(videoPage, '''src:['"]([^'^"]+?)['"]''')[0]
  9262. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9263. videoUrl = urlparser.decorateUrl(videoUrl, {'User-Agent': USER_AGENT, 'Referer': url})
  9264. if 'm3u8' in videoUrl:
  9265. tmp = getDirectM3U8Playlist(videoUrl, checkContent=True, sortWithMaxBitrate=999999999)
  9266. for item in tmp:
  9267. videoUrl = item['url']
  9268. return videoUrl
  9269. videoUrl = self.cm.ph.getSearchGroups(data, '''src: ['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9270. if videoUrl: return videoUrl
  9271. videoUrl = self.cm.ph.getSearchGroups(data, '''file:['"]([^"^']+?\.mp4)['"]''')[0].replace('&amp;','&')
  9272. if videoUrl: return videoUrl
  9273. videoUrl = self.cm.ph.getSearchGroups(data, '''file:['"]([^"^']+?\.m3u8)['"]''')[0].replace('&amp;','&')
  9274. if videoUrl: return videoUrl
  9275. if 'File Not Found' in data:
  9276. SetIPTVPlayerLastHostError(_(' File Not Found.'))
  9277. return []
  9278. if 'File is awaiting for moderation' in data:
  9279. SetIPTVPlayerLastHostError(_(' File is awaiting for moderation.'))
  9280. return []
  9281. return ''
  9282. if parser == 'http://porn720.net':
  9283. COOKIEFILE = os_path.join(GetCookieDir(), 'porn720.cookie')
  9284. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9285. sts, data = self.getPage(url, 'porn720.cookie', 'porn720.org', self.defaultParams)
  9286. if not sts: return ''
  9287. printDBG( 'Host listsItems data: '+str(data) )
  9288. videoUrl = self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"]([^"^']+?)['"]''')[0]
  9289. if videoUrl:
  9290. return self.getResolvedURL(self.FullUrl(videoUrl))
  9291. videoUrl = re.compile('<source src="(.+?)"', re.DOTALL).findall(data)
  9292. if videoUrl:
  9293. videoUrl = urlparser.decorateUrl(videoUrl[-1], {'User-Agent': self.USER_AGENT, 'Referer': url})
  9294. self.defaultParams['max_data_size'] = 0
  9295. sts, data = self.getPage(videoUrl, 'porn720.cookie', 'porn720.org', self.defaultParams)
  9296. if not sts: return ''
  9297. return data.meta['url']
  9298. videoUrl = self.cm.ph.getSearchGroups(data, '''720p['"]:['"]([^"^']+?)['"]''')[0]
  9299. if videoUrl:
  9300. return urlparser.decorateUrl(videoUrl, {'User-Agent': self.USER_AGENT, 'Referer': url})
  9301. videoUrl = self.cm.ph.getSearchGroups(data, '''480p['"]:['"]([^"^']+?)['"]''')[0]
  9302. if videoUrl:
  9303. return urlparser.decorateUrl(videoUrl, {'User-Agent': self.USER_AGENT, 'Referer': url})
  9304. return ''
  9305. if parser == 'https://fapset.com':
  9306. COOKIEFILE = os_path.join(GetCookieDir(), 'fapset.cookie')
  9307. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9308. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9309. sts, data = self.get_Page(url)
  9310. if not sts: return ''
  9311. printDBG( 'Host data: '+data )
  9312. videoUrl = self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"]([^"^']+?)['"]''')[0]
  9313. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9314. return self.getResolvedURL(videoUrl)
  9315. if parser == 'http://www.filmyporno.tv':
  9316. COOKIEFILE = os_path.join(GetCookieDir(), 'filmyporno.cookie')
  9317. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9318. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9319. sts, data = self.get_Page(url)
  9320. if not sts: return ''
  9321. match = re.findall('source src="(.*?)"', data, re.S)
  9322. if match: return match[0]
  9323. else: return ''
  9324. if parser == 'https://daftsex.com':
  9325. COOKIEFILE = os_path.join(GetCookieDir(), 'daftsex.cookie')
  9326. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9327. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9328. self.defaultParams['header']['Referer'] = parser
  9329. sts, data = self.get_Page(url)
  9330. if not sts: return ''
  9331. #printDBG( 'Host data: '+data )
  9332. videoUrl = self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"](https://da[^"^']+?)['"]''')[0]
  9333. sts, data2 = self.get_Page(videoUrl)
  9334. if not sts: return ''
  9335. printDBG( 'Host data2: '+data2 )
  9336. server = self.cm.ph.getSearchGroups(data2, '''server:\s*?['"]([^"^']+?)['"]''')[0]
  9337. printDBG( 'Host server1:%s' % server )
  9338. s = list(server)
  9339. printDBG( 'Host server list:%s' % s )
  9340. s.reverse()
  9341. printDBG( 'Host server list2:%s' % s )
  9342. server = base64.b64decode(str(''.join(s)))
  9343. printDBG( 'Host server2:%s' % server)
  9344. try:
  9345. try:
  9346. match = re.compile('id: "([^"]+)_([^"]+)".+:"(\d+)\.([^"]+)"}', re.DOTALL | re.IGNORECASE).findall(data2)[0]
  9347. (id1, id2, res, extra) = match
  9348. video = id1 + '/' + id2 + '/' + res + '.mp4?extra=' + extra
  9349. printDBG( 'Host video: '+video )
  9350. return 'https://' + server + '/videos/' + video
  9351. except Exception:
  9352. printExc()
  9353. try:
  9354. match = re.compile('id: "([^"]+)_([^"]+)".+"(\d+)"\:"([^"]+)"}', re.DOTALL | re.IGNORECASE).findall(data2)[0]
  9355. (id1, id2, res, extra) = match
  9356. video = id1 + '/' + id2 + '/' + res + '.mp4?extra=' + extra
  9357. printDBG( 'Host video: '+video )
  9358. return 'https://' + server + '/videos/' + video
  9359. except Exception:
  9360. printExc()
  9361. except Exception:
  9362. printExc()
  9363. return ''
  9364. if parser == 'https://videobin.co':
  9365. baseUrl = strwithmeta(url)
  9366. referer = baseUrl.meta.get('Referer', '')
  9367. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9368. if referer != '': self.HTTP_HEADER['Referer'] = referer
  9369. COOKIEFILE = os_path.join(GetCookieDir(), 'videobin.cookie')
  9370. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9371. sts, data = self.get_Page(url)
  9372. if not sts: return ''
  9373. printDBG( 'Host data: %s' % data )
  9374. data = self.cm.ph.getDataBeetwenMarkers(data, 'sources:', ']', False)[1]
  9375. data = re.compile('"(http[^"]+?)"').findall(data)
  9376. for videoUrl in data:
  9377. if videoUrl.split('?')[0].endswith('m3u8'):
  9378. printDBG( 'Host videoUrl: %s' % videoUrl )
  9379. #if self.cm.isValidUrl(videoUrl):
  9380. # videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': referer})
  9381. # tmp = getDirectM3U8Playlist(videoUrl, checkContent=True, sortWithMaxBitrate=999999999)
  9382. # for item in tmp:
  9383. # printDBG( 'Host listsItems valtab: ' +str(item))
  9384. # return item['url']
  9385. elif videoUrl.split('?')[0].endswith('mp4'):
  9386. printDBG( 'Host videoUrl: %s' % videoUrl )
  9387. videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': referer, 'User-Agent': self.USER_AGENT})
  9388. return videoUrl
  9389. return ''
  9390. if parser == 'https://lovehomeporn.com/':
  9391. COOKIEFILE = os_path.join(GetCookieDir(), 'lovehomeporn.cookie')
  9392. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9393. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9394. self.defaultParams['header']['Referer'] = parser
  9395. sts, data = self.get_Page(url)
  9396. if not sts: return ''
  9397. printDBG( 'Host data: '+data )
  9398. id = self.cm.ph.getSearchGroups(data, '''video_id\s*=\s*['"]([^"^']+?)['"]''')[0]
  9399. videoUrl = "https://lovehomeporn.com/media/nuevo/config.php?key=%s" % id
  9400. sts, data = self.get_Page(videoUrl)
  9401. if not sts: return ''
  9402. printDBG( 'Host data2: '+data )
  9403. videoUrl = ph.search(data, '''<file>([^>]+?)<''')[0].replace('&amp;','&')
  9404. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9405. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9406. if parser == 'http://www.pornrabbit.com':
  9407. COOKIEFILE = os_path.join(GetCookieDir(), 'pornrabbit.cookie')
  9408. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9409. sts, data = self.getPage(url, 'pornrabbit.cookie', 'pornrabbit.com', self.defaultParams)
  9410. if not sts: return ''
  9411. printDBG( 'Host data: '+data )
  9412. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0]
  9413. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9414. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9415. if parser == 'https://www.eroprofile.com':
  9416. COOKIEFILE = os_path.join(GetCookieDir(), 'eroprofile.cookie')
  9417. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9418. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9419. sts, data = self.get_Page(url)
  9420. if not sts: return ''
  9421. printDBG( 'Host listsItems data: '+data )
  9422. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9423. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9424. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9425. if parser == 'http://www.absoluporn.com':
  9426. COOKIEFILE = os_path.join(GetCookieDir(), 'absoluporn.cookie')
  9427. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9428. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9429. sts, data = self.get_Page(url, self.defaultParams)
  9430. if not sts: return ''
  9431. printDBG( 'Host listsItems data: '+data )
  9432. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9433. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9434. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9435. if parser == 'https://www.amateurcool.com':
  9436. COOKIEFILE = os_path.join(GetCookieDir(), 'amateurcool.cookie')
  9437. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9438. sts, data = self.getPage(url, 'amateurcool.cookie', 'amateurcool.com', self.defaultParams)
  9439. if not sts: return ''
  9440. printDBG( 'Host listsItems data: '+data )
  9441. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9442. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9443. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9444. if parser == 'https://mangovideo':
  9445. COOKIEFILE = os_path.join(GetCookieDir(), 'mangovideo.cookie')
  9446. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9447. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9448. sts, data = self.get_Page(url, self.defaultParams)
  9449. if not sts: return ''
  9450. printDBG( 'Host listsItems data: '+data )
  9451. license_code = self.cm.ph.getSearchGroups(data, '''license_code\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9452. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9453. printDBG( 'Host license_code: %s' % license_code )
  9454. printDBG( 'Host video_url: %s' % videoUrl )
  9455. if 'function/0/' in videoUrl:
  9456. videoUrl = decryptHash(videoUrl, license_code, '16')
  9457. return urlparser.decorateUrl(videoUrl, {'Referer': url, 'User-Agent': self.HTTP_HEADER['User-Agent']})
  9458. if parser == 'https://yespornplease.com':
  9459. COOKIEFILE = os_path.join(GetCookieDir(), 'yespornplease.cookie')
  9460. referer = url.meta.get('Referer', url)
  9461. self.defaultParams = {'header':self.HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9462. self.defaultParams['header']['Referer'] = referer
  9463. sts, data = self.getPage(url, 'yespornplease.cookie', 'yespornplease.com', self.defaultParams)
  9464. if not sts: return ''
  9465. printDBG( 'Host listsItems data: '+data )
  9466. return ''
  9467. if parser == 'http://anybunny.com':
  9468. COOKIEFILE = os_path.join(GetCookieDir(), 'anybunny.cookie')
  9469. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9470. sts, data = self.getPage(url, 'anybunny.cookie', 'anybunny.com', self.defaultParams)
  9471. if not sts: return ''
  9472. printDBG( 'Host listsItems data: '+data )
  9473. videoUrl = self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"]([^"^']+?)['"]''')[0]
  9474. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9475. sts, data = self.get_Page(videoUrl)
  9476. if not sts: return ''
  9477. printDBG( 'Host data2: '+data )
  9478. self.domains = ['vartuc.com', "azblowjobtube.com"]
  9479. js_link = re.compile("src='(/kt_player/.*?)'", re.DOTALL | re.IGNORECASE).search(data).group(1)
  9480. js_path = 'https://' + self.domains[0] + js_link + '&ver=x'
  9481. sts, data = self.getPage(js_path, 'anybunny.cookie', 'anybunny.com', self.defaultParams)
  9482. js = data.split(";")
  9483. js = [line for line in js if (line.startswith("gh") or line.startswith("irue842")) and '=' in line and '(' not in line and ')' not in line]
  9484. js = "\n".join(js)
  9485. printDBG( 'Host js: %s' % js )
  9486. urls = js_execute( js+ '\nfor (n in this){print(n+"="+this[n]+";");}')
  9487. videoUrl = self.cm.ph.getSearchGroups(urls['data'], '''src=['"]([^"^']+?)['"]''')[0]
  9488. if videoUrl:
  9489. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9490. return videoUrl
  9491. return ''
  9492. if parser == 'https://hqporner.com':
  9493. COOKIEFILE = os_path.join(GetCookieDir(), 'hqporner.cookie')
  9494. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9495. sts, data = self.getPage(url, 'hqporner.cookie', 'hqporner.com', self.defaultParams)
  9496. if not sts: return ''
  9497. if 'page not found' in data:
  9498. SetIPTVPlayerLastHostError(_(' Oops, page not found!'))
  9499. return []
  9500. printDBG( 'Host listsItems data: '+data )
  9501. videoUrl = self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"]([^"^']+?)['"]''')[0]
  9502. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9503. sts, data = self.get_Page(videoUrl)
  9504. if not sts: return ''
  9505. printDBG( 'Host data2: '+data )
  9506. p1080 = ''
  9507. p720 = ''
  9508. p360 = ''
  9509. p240 = ''
  9510. subData = data.split('<source')
  9511. if len(subData): del subData[0]
  9512. if subData:
  9513. for item in subData:
  9514. src = self.cm.ph.getSearchGroups(item, '''['"](//[^"^']+?)['"]''')[0].replace('\\','')
  9515. if '1080' in item:
  9516. if src.startswith('//'): src = 'https:' + src
  9517. p1080 = src
  9518. if '720' in item:
  9519. if src.startswith('//'): src = 'https:' + src
  9520. p720 = src
  9521. if '360' in item:
  9522. if src.startswith('//'): src = 'https:' + src
  9523. p360 = src
  9524. if '240' in item:
  9525. if src.startswith('//'): src = 'https:' + src
  9526. p240 = src
  9527. if p1080: return p1080
  9528. if p720: return p720
  9529. if p360: return p360
  9530. if p240: return p240
  9531. subData = self.cm.ph.getDataBeetwenMarkers(data, 'var srca', ']', False)[1].split('}')
  9532. if subData:
  9533. for item in subData:
  9534. label = self.cm.ph.getSearchGroups(item, 'label:\s*?"([^"]+?)"')[0]
  9535. src = self.cm.ph.getSearchGroups(item, 'file:\s*?"([^"]+?)"')[0]
  9536. if '1080' in label:
  9537. if src.startswith('//'): src = 'https:' + src
  9538. p1080 = src
  9539. if '720' in label:
  9540. if src.startswith('//'): src = 'https:' + src
  9541. p720 = src
  9542. if '360' in label:
  9543. if src.startswith('//'): src = 'https:' + src
  9544. p360 = src
  9545. if '240' in label:
  9546. if src.startswith('//'): src = 'https:' + src
  9547. p240 = src
  9548. if p1080: return p1080
  9549. if p720: return p720
  9550. if p360: return p360
  9551. if p240: return p240
  9552. videoUrl = re.compile("<source src='([^']+)'", re.DOTALL | re.IGNORECASE).findall(data)
  9553. if videoUrl:
  9554. videoUrl = videoUrl[0]
  9555. if videoUrl.startswith('//'): videoUrl = 'https:' + videoUrl
  9556. return videoUrl
  9557. videoUrl = re.compile("<script type='text/javascript' src='([^']+)'></script>", re.DOTALL | re.IGNORECASE).findall(data)
  9558. if videoUrl:
  9559. videoUrl = videoUrl[-1]
  9560. sts, data = self.get_Page(videoUrl)
  9561. if not sts: return ''
  9562. printDBG( 'Host data2: '+data )
  9563. videoUrl = re.compile('file": "([^"]+)"', re.DOTALL | re.IGNORECASE).findall(data)
  9564. videoUrl = videoUrl[-1]
  9565. if videoUrl.startswith('//'):
  9566. videoUrl = 'https:' + videoUrl
  9567. return videoUrl
  9568. videoUrl = re.compile('file": "([^"]+)"', re.DOTALL | re.IGNORECASE).findall(data)
  9569. if videoUrl:
  9570. videoUrl = videoUrl[-1]
  9571. if videoUrl.startswith('//'): videoUrl = 'https:' + videoUrl
  9572. return videoUrl
  9573. return ''
  9574. if parser == 'https://www.naked.com':
  9575. COOKIEFILE = os_path.join(GetCookieDir(), 'naked.cookie')
  9576. UA = "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36"
  9577. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': False, 'cookiefile': COOKIEFILE}
  9578. sts, data = self.getPage(url, 'naked.cookie', 'naked.com', self.defaultParams)
  9579. if not sts: return ''
  9580. modelname = self.cm.meta['url'].split('=')[-1]
  9581. id = ''
  9582. host = ''
  9583. printDBG( 'Host listsItems data: '+data )
  9584. data = data.split('<div class="live clearfix')
  9585. if len(data): del data[0]
  9586. for item in data:
  9587. id = self.cm.ph.getSearchGroups(item, '''data-model-id=['"]([^"^']+?)['"]''')[0]
  9588. host = self.cm.ph.getSearchGroups(item, '''data-video-host=['"]([^"^']+?)['"]''')[0]
  9589. if modelname == self.cm.ph.getSearchGroups(item, '''data-model-seo-name=['"]([^"^']+?)['"]''', 1, True)[0]:
  9590. if 'multi-user-private' in item:
  9591. SetIPTVPlayerLastHostError(_(' Private Show.'))
  9592. return []
  9593. break
  9594. videoUrl = 'https://manifest.vscdns.com/manifest.m3u8?key=nil&provider=highwinds&host='+host+'&model_id='+id+'&secure=true&prefix=amlst&youbora-debug=1'
  9595. PHPSESSID = self.cm.getCookieItem(COOKIEFILE, 'PHPSESSID')
  9596. videoUrl = urlparser.decorateUrl(videoUrl, {'Referer': self.cm.meta['url'], 'Cookie':'PHPSESSID=%s' % PHPSESSID, 'User-Agent': UA, 'iptv_livestream':True, 'Origin':'https://www.naked.com'})
  9597. tmp = getDirectM3U8Playlist(videoUrl, checkContent=True, sortWithMaxBitrate=999999999)
  9598. for item in tmp:
  9599. return item['url']
  9600. return ''
  9601. if parser == 'https://www.pornrewind.com':
  9602. COOKIEFILE = os_path.join(GetCookieDir(), 'pornrewind.cookie')
  9603. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9604. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9605. sts, data = self.get_Page(url)
  9606. if not sts: return ''
  9607. printDBG( 'Host listsItems data: '+data )
  9608. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url:\s*['"]([^"^']+?)['"]''')[0]
  9609. return videoUrl
  9610. if parser == 'https://spankbang.com':
  9611. COOKIEFILE = os_path.join(GetCookieDir(), 'spankbang.cookie')
  9612. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9613. sts, data = self.getPage(url, 'spankbang.cookie', 'spankbang.com', self.defaultParams)
  9614. if not sts: return ''
  9615. printDBG( 'Host listsItems data: '+str(data) )
  9616. videoid = self.cm.ph.getSearchGroups(data, '''data-videoid=['"]([^"^']+?)['"]''')[0]
  9617. streamkey = self.cm.ph.getSearchGroups(data, '''data-streamkey=['"]([^"^']+?)['"]''')[0]
  9618. sb_csrf_session = self.cm.getCookieItem(COOKIEFILE,'sb_csrf_session')
  9619. api = 'https://spankbang.com/api/videos/stream'
  9620. postdata = {'id' : streamkey, 'data': 0, 'sb_csrf_session': sb_csrf_session}
  9621. self.defaultParams['header']['X-Requested-With'] = 'XMLHttpRequest'
  9622. self.defaultParams['header']['X-CSRFToken'] = sb_csrf_session
  9623. sts, data = self.getPage(api, 'spankbang.cookie', 'spankbang.com', self.defaultParams, postdata)
  9624. if not sts: return ''
  9625. printDBG( 'Host listsItems data2: '+data )
  9626. try:
  9627. if data.startswith('{'): data = '['+data+']'
  9628. result = byteify(simplejson.loads(data))
  9629. for item in result:
  9630. try:
  9631. if str(item["stream_url_1080p"]) : return self.cm.getFullUrl(str(item["stream_url_1080p"][0]))
  9632. if str(item["stream_url_720p"]) : return self.cm.getFullUrl(str(item["stream_url_720p"][0]))
  9633. if str(item["stream_url_480p"]) : return self.cm.getFullUrl(str(item["stream_url_480p"][0]))
  9634. if str(item["stream_url_320p"]) : return self.cm.getFullUrl(str(item["stream_url_320p"][0]))
  9635. if str(item["stream_url_240p"]) : return self.cm.getFullUrl(str(item["stream_url_240p"][0]))
  9636. except Exception as e:
  9637. printExc()
  9638. try:
  9639. if str(item["1080p"]) != '[]': return self.cm.getFullUrl(str(item["1080p"][0]))
  9640. if str(item["720p"]) != '[]': return self.cm.getFullUrl(str(item["720p"][0]))
  9641. if str(item["480p"]) != '[]': return self.cm.getFullUrl(str(item["480p"][0]))
  9642. if str(item["320p"]) != '[]': return self.cm.getFullUrl(str(item["320p"][0]))
  9643. if str(item["240p"]) != '[]': return self.cm.getFullUrl(str(item["240p"][0]))
  9644. except Exception as e:
  9645. printExc()
  9646. except Exception as e:
  9647. printExc()
  9648. return ''
  9649. if parser == 'https://upstream.to':
  9650. COOKIEFILE = os_path.join(GetCookieDir(), 'upstream.cookie')
  9651. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9652. sts, data = self.getPage(url, 'upstream.cookie', 'upstream.to', self.defaultParams)
  9653. if not sts: return ''
  9654. printDBG( 'Host listsItems data: '+str(data) )
  9655. videoUrl = ph.search(data, '''file:['"]([^'^"]+?)['"]''')[0]
  9656. return videoUrl
  9657. if parser == 'https://prostream.to':
  9658. COOKIEFILE = os_path.join(GetCookieDir(), 'prostream.cookie')
  9659. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE, 'return_data': True}
  9660. sts, data = self.getPage(url, 'prostream.cookie', 'prostream.to', self.defaultParams)
  9661. if not sts: return ''
  9662. printDBG( 'Host listsItems data: '+str(data) )
  9663. if "eval(function(p,a,c,k,e,d)" in data:
  9664. printDBG( 'Host resolveUrl packed' )
  9665. packed = re.compile('>eval\(function\(p,a,c,k,e,d\)(.+?)</script>', re.DOTALL).findall(data)
  9666. if packed:
  9667. packed = packed[-1]
  9668. else:
  9669. return ''
  9670. try:
  9671. videoPage = unpackJSPlayerParams(packed, TEAMCASTPL_decryptPlayerParams, 0, True, True)
  9672. except Exception: pass
  9673. printDBG( 'Host videoPage: '+str(videoPage) )
  9674. videoUrl = ph.search(videoPage, '''file:['"]([^'^"]+?)['"]''')[0]
  9675. if not videoUrl: videoUrl = ph.search(videoPage, '''sources:\[['"]([^'^"]+?)['"]''')[0]
  9676. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9677. return videoUrl
  9678. return ''
  9679. if parser == 'https://www.cumlouder.com':
  9680. COOKIEFILE = os_path.join(GetCookieDir(), 'cumlouder.cookie')
  9681. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9682. sts, data = self.getPage(url, 'cumlouder.cookie', 'cumlouder.com', self.defaultParams)
  9683. if not sts: return ''
  9684. printDBG( 'Host listsItems data: '+data )
  9685. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9686. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9687. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9688. if parser == 'https://www.vporn.com':
  9689. COOKIEFILE = os_path.join(GetCookieDir(), 'vporn.cookie')
  9690. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9691. sts, data = self.getPage(url, 'vporn.cookie', 'vporn.com', self.defaultParams)
  9692. if not sts: return ''
  9693. printDBG( 'Host listsItems data: '+data )
  9694. if 'This video has been deleted' in data:
  9695. SetIPTVPlayerLastHostError(_(' This video has been deleted.'))
  9696. return []
  9697. for video in re.findall(r'flashvars\.videoUrl([^=]+?)\s*=\s*"(https?://[^"]+)"', data):
  9698. videoUrl = urllib2.unquote(video[1].replace('https://','http://'))
  9699. printDBG( 'Host videoUrl '+videoUrl )
  9700. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9701. if videoUrl:
  9702. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9703. return urllib2.unquote(videoUrl)
  9704. if parser == 'http://sexu.com':
  9705. COOKIEFILE = os_path.join(GetCookieDir(), 'sexu.cookie')
  9706. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9707. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9708. sts, data = self.get_Page(url)
  9709. if not sts: return ''
  9710. printDBG( 'Host listsItems data: '+data )
  9711. videoUrl = self.cm.ph.getSearchGroups(data, '''downloadUrl":['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9712. if videoUrl:
  9713. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9714. return urlparser.decorateUrl(videoUrl, {'Referer': 'http://sexu.com/'})
  9715. videoUrl = re.findall('"file":"(.*?\.mp4)"', data, re.S)
  9716. if videoUrl:
  9717. return urlparser.decorateUrl(videoUrl[-1], {'Referer': 'http://sexu.com/'})
  9718. videoUrl = self.cm.ph.getSearchGroups(data, '''"src":['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9719. if videoUrl:
  9720. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9721. return urlparser.decorateUrl(videoUrl, {'Referer': 'http://sexu.com/'})
  9722. if parser == 'http://www.amateurporn.net':
  9723. COOKIEFILE = os_path.join(GetCookieDir(), 'amateurporn.cookie')
  9724. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9725. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9726. sts, data = self.get_Page(url, self.defaultParams)
  9727. if not sts: return ''
  9728. printDBG( 'Host listsItems data: '+data )
  9729. license_code = self.cm.ph.getSearchGroups(data, '''license_code\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9730. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9731. printDBG( 'Host license_code: %s' % license_code )
  9732. printDBG( 'Host video_url: %s' % videoUrl )
  9733. if license_code and videoUrl:
  9734. if 'function/0/' in videoUrl:
  9735. videoUrl = decryptHash(videoUrl, license_code, '16')
  9736. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9737. videoUrl = self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"]([^"^']+?)['"]''')[0]
  9738. if videoUrl:
  9739. return self.getResolvedURL(self.FullUrl(videoUrl))
  9740. videoUrl = self.cm.ph.getSearchGroups(data, '''<source[^>]+?src=['"]([^"^']+?mp4)['"]''')[0]
  9741. if videoUrl:
  9742. return self.FullUrl(videoUrl)
  9743. videoUrl = self.cm.ph.getSearchGroups(data, '''file:\s*?['"]([^"^']+?mp4)['"]''')[0]
  9744. if videoUrl:
  9745. return self.FullUrl(videoUrl)
  9746. return ''
  9747. if parser == 'http://www.hdporn.net':
  9748. COOKIEFILE = os_path.join(GetCookieDir(), 'hdporn.cookie')
  9749. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9750. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9751. sts, data = self.get_Page(url)
  9752. if not sts: return
  9753. printDBG( 'Host listsItems data: '+data )
  9754. match = re.findall('source src="(.*?)"', data, re.S)
  9755. if match: return match[0]
  9756. else: return ''
  9757. if parser == 'http://pornicom.com':
  9758. COOKIEFILE = os_path.join(GetCookieDir(), 'pornicom.cookie')
  9759. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9760. self.HTTP_HEADER['Referer'] = url
  9761. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9762. sts, data = self.get_Page(url, self.defaultParams)
  9763. if not sts: return ''
  9764. #printDBG( 'Host data:%s' % data )
  9765. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'var flashvars', '}', False)[1]
  9766. if data2:
  9767. printDBG( 'Host data2:%s' % data2 )
  9768. return self.cm.ph.getSearchGroups(data2, '''video_url:\s*?['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  9769. videoPage = self.cm.ph.getSearchGroups(data, '''file: ['"]([^"^']+?)['"]''')[0]
  9770. if videoPage:
  9771. printDBG( 'Host data file:%s' % videoPage )
  9772. return videoPage
  9773. return ''
  9774. if parser == 'http://www.porn00.org':
  9775. COOKIEFILE = os_path.join(GetCookieDir(), 'porn00.cookie')
  9776. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9777. sts, data = self.getPage(url, 'porn00.cookie', 'porn00.org', self.defaultParams)
  9778. if not sts: return ''
  9779. printDBG( 'Host listsItems data: '+data )
  9780. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''<source[^>]+?src=['"]([^"^']+?)['"]''')[0])
  9781. if videoUrl:
  9782. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9783. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"]([^"^']+?)['"]''')[0])
  9784. if videoUrl:
  9785. sts, data = self.getPage(videoUrl, 'porn00.cookie', 'porn00.org', self.defaultParams)
  9786. if not sts: return ''
  9787. printDBG( 'Host listsItems data: '+data )
  9788. videoUrl = re.compile(r"""<source[^>]+?src=(?:"|')?([^'";]+)(?:"|')""", re.DOTALL | re.IGNORECASE).findall(data)
  9789. return urlparser.decorateUrl(videoUrl[-1], {'Referer': url})
  9790. return ''
  9791. if parser == 'https://www.volimeee.com':
  9792. COOKIEFILE = os_path.join(GetCookieDir(), 'volimeee.cookie')
  9793. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9794. sts, data = self.getPage(url, 'volimeee.cookie', 'volimeee.com', self.defaultParams)
  9795. if not sts: return ''
  9796. printDBG( 'Host listsItems data: '+data )
  9797. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''<source[^>]+?src=['"]([^"^']+?)['"]''')[0])
  9798. if videoUrl:
  9799. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9800. return ''
  9801. if parser == 'http://porndoe.com':
  9802. host = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'
  9803. COOKIEFILE = os_path.join(GetCookieDir(), 'porndoe.cookie')
  9804. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9805. self.HTTP_HEADER['Referer'] = url
  9806. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9807. sts, data = self.get_Page(url, self.defaultParams)
  9808. if not sts: return ''
  9809. printDBG( 'Host listsItems data: '+data )
  9810. videoPage = self.FullUrl(self.cm.ph.getSearchGroups(data, '''embedURL"\s*href=['"]([^"^']+?)['"]''')[0])
  9811. id = self.cm.ph.getSearchGroups(data, '''"id":\s*['"]([^"^']+?)['"]''')[0]
  9812. videoUrl= 'https://porndoe.com/service/index?device=desktop&page=video&id='+id
  9813. sts, data = self.get_Page(videoUrl, self.defaultParams)
  9814. if not sts: return ''
  9815. printDBG( 'Host listsItems data2: '+data )
  9816. try:
  9817. data = self.cm.ph.getDataBeetwenMarkers(data, '"sources":', '}},', False)[1]
  9818. if data.startswith('{'): data = '['+data+'}]'
  9819. printDBG( 'Host listsItems data3: '+data )
  9820. result = byteify(simplejson.loads(data))
  9821. for item in result:
  9822. try:
  9823. if str(item["720"]["url"]) : return strwithmeta(str(item["720"]["url"]), {'Referer': url})
  9824. if str(item["480"]["url"]) : return strwithmeta(str(item["480"]["url"]), {'Referer': url})
  9825. if str(item["240"]["url"]) : return strwithmeta(str(item["240"]["url"]), {'Referer': url})
  9826. except Exception as e:
  9827. printExc()
  9828. except Exception as e:
  9829. printExc()
  9830. sts, data = self.get_Page(videoPage, self.defaultParams)
  9831. if not sts: return ''
  9832. printDBG( 'Host listsItems data4: '+data )
  9833. try:
  9834. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<source', '>')
  9835. for item in data:
  9836. printDBG( 'Host item: '+str(item) )
  9837. videoUrl = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  9838. if videoUrl: return strwithmeta(videoUrl, {'Referer': url})
  9839. except Exception as e:
  9840. printExc()
  9841. return ''
  9842. if parser == 'https://hdsite.net':
  9843. COOKIEFILE = os_path.join(GetCookieDir(), 'hdsite.cookie')
  9844. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9845. self.HTTP_HEADER['Referer'] = url
  9846. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9847. sts, data = self.get_Page(url, self.defaultParams)
  9848. if not sts: return ''
  9849. printDBG( 'Host listsItems data: '+data )
  9850. license_code = self.cm.ph.getSearchGroups(data, '''license_code\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9851. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9852. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9853. printDBG( 'Host license_code: %s' % license_code )
  9854. printDBG( 'Host video_url: %s' % videoUrl )
  9855. if 'function/0/' in videoUrl:
  9856. videoUrl = decryptHash(videoUrl, license_code, '16')
  9857. return urlparser.decorateUrl(videoUrl, {'Referer': url, 'User-Agent': self.HTTP_HEADER['User-Agent']})
  9858. if parser == 'https://p720.net':
  9859. COOKIEFILE = os_path.join(GetCookieDir(), 'p720.cookie')
  9860. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9861. self.HTTP_HEADER['Referer'] = url
  9862. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9863. sts, data = self.get_Page(url, self.defaultParams)
  9864. if not sts: return ''
  9865. printDBG( 'Host listsItems data: '+data )
  9866. if 'hdsite.net/embed/' in data:
  9867. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''<iframe[^>]+?src=['"]([^"^']+?)['"]''')[0])
  9868. return self.getResolvedURL(videoUrl)
  9869. if not 'mp4' in data: SetIPTVPlayerLastHostError('LOGIN REQUIRED')
  9870. license_code = self.cm.ph.getSearchGroups(data, '''license_code\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9871. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9872. printDBG( 'Host license_code: %s' % license_code )
  9873. printDBG( 'Host video_url: %s' % videoUrl )
  9874. if 'function/0/' in videoUrl:
  9875. videoUrl = decryptHash(videoUrl, license_code, '16')
  9876. return urlparser.decorateUrl(videoUrl, {'Referer': url, 'User-Agent': self.HTTP_HEADER['User-Agent']})
  9877. if parser == 'https://www.extremetube.com':
  9878. COOKIEFILE = os_path.join(GetCookieDir(), 'extremetube.cookie')
  9879. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9880. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9881. sts, data = self.get_Page(url)
  9882. if not sts: return ''
  9883. printDBG( 'Host listsItems data: '+data )
  9884. videoPage = re.findall('"quality_\d+p":"(.*?)"', data, re.S)
  9885. if videoPage:
  9886. url = videoPage[-1].replace('\/','/')
  9887. return self.FullUrl(url)
  9888. return ''
  9889. if parser == 'http://xhamster.com':
  9890. COOKIEFILE = os_path.join(GetCookieDir(), 'xhamster.cookie')
  9891. self.HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
  9892. self.defaultParams = {'header':self.HTTP_HEADER, 'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9893. sts, data = self.get_Page(url)
  9894. if not sts: return ''
  9895. printDBG( 'Host listsItems data: '+data )
  9896. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''1080p['"]:['"]([^'"]+?)['"]''')[0]).replace('&amp;','&').replace(r"\/",r"/")
  9897. if videoUrl:
  9898. return strwithmeta(videoUrl, {'Referer': url})
  9899. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''720p['"]:['"]([^'"]+?)['"]''')[0]).replace('&amp;','&').replace(r"\/",r"/")
  9900. if videoUrl:
  9901. return strwithmeta(videoUrl, {'Referer': url})
  9902. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''480p['"]:['"]([^'"]+?)['"]''')[0]).replace('&amp;','&').replace(r"\/",r"/")
  9903. if videoUrl:
  9904. return strwithmeta(videoUrl, {'Referer': url})
  9905. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''240p['"]:['"]([^'"]+?)['"]''')[0]).replace('&amp;','&').replace(r"\/",r"/")
  9906. if videoUrl:
  9907. return strwithmeta(videoUrl, {'Referer': url})
  9908. videoUrl = self.FullUrl(self.cm.ph.getSearchGroups(data, '''144p['"]:['"]([^'"]+?)['"]''')[0]).replace('&amp;','&').replace(r"\/",r"/")
  9909. if videoUrl:
  9910. return strwithmeta(videoUrl, {'Referer': url})
  9911. return ''
  9912. if parser == 'https://anyporn.com':
  9913. COOKIEFILE = os_path.join(GetCookieDir(), 'anyporn.cookie')
  9914. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9915. sts, data = self.getPage(url, 'anyporn.cookie', 'anyporn.com', self.defaultParams)
  9916. if not sts: return ''
  9917. data = self.cm.ph.getAllItemsBeetwenMarkers(data, '<source', '>')
  9918. for item in data:
  9919. videoUrl = self.cm.ph.getSearchGroups(item, '''src=['"]([^"^']+?)['"]''', 1, True)[0]
  9920. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9921. return strwithmeta(videoUrl, {'Referer': url})
  9922. if parser == 'https://anon-v.com':
  9923. COOKIEFILE = os_path.join(GetCookieDir(), 'anon-v.cookie')
  9924. self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9925. sts, data = self.getPage(url, 'anon-v.cookie', 'anon-v.com', self.defaultParams)
  9926. if not sts: return ''
  9927. license_code = self.cm.ph.getSearchGroups(data, '''license_code\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9928. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9929. printDBG( 'Host license_code: %s' % license_code )
  9930. printDBG( 'Host video_url: %s' % videoUrl )
  9931. if 'function/0/' in videoUrl:
  9932. videoUrl = decryptHash(videoUrl, license_code, '16')
  9933. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9934. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9935. if parser == 'https://www.sleazyneasy.com':
  9936. COOKIEFILE = os_path.join(GetCookieDir(), 'sleazyneasy.cookie')
  9937. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9938. sts, data = self.getPage(url, 'sleazyneasy.cookie', 'sleazyneasy.com', self.defaultParams)
  9939. if not sts: return ''
  9940. printDBG( 'Host listsItems data: '+data )
  9941. license_code = self.cm.ph.getSearchGroups(data, '''license_code\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9942. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url\s*?:\s*?['"]([^"^']+?)['"]''')[0]
  9943. printDBG( 'Host license_code: %s' % license_code )
  9944. printDBG( 'Host video_url: %s' % videoUrl )
  9945. if 'function/0/' in videoUrl:
  9946. videoUrl = decryptHash(videoUrl, license_code, '16')
  9947. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  9948. return urlparser.decorateUrl(videoUrl, {'Referer': self.cm.meta['url']})
  9949. if parser == 'https://javhoho.com':
  9950. COOKIEFILE = os_path.join(GetCookieDir(), 'javhoho.cookie')
  9951. self.defaultParams = {'use_cookie': True, 'load_cookie': False, 'save_cookie': True, 'cookiefile': COOKIEFILE}
  9952. sts, data = self.getPage(url, 'javhoho.cookie', 'javhoho.com', self.defaultParams)
  9953. if not sts: return ''
  9954. printDBG( 'Host listsItems data: '+data )
  9955. videoUrl = self.cm.ph.getSearchGroups(data, '''['"](https://upstream.to[^"^']+?)['"]''')[0]
  9956. if not videoUrl: videoUrl = self.cm.ph.getSearchGroups(data, '''['"](https://www.fembed.com[^"^']+?)['"]''')[0]
  9957. return self.getResolvedURL(videoUrl)
  9958. ##########################################################################################################################
  9959. query_data = {'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True}
  9960. try:
  9961. data = self.cm.getURLRequestData(query_data)
  9962. printDBG( 'Host getResolvedURL data: '+data )
  9963. except:
  9964. printDBG( 'Host getResolvedURL query error' )
  9965. return videoUrl
  9966. if parser == 'file: ':
  9967. return self.cm.ph.getSearchGroups(data, '''file: ['"]([^"^']+?)['"]''')[0]
  9968. if parser == "0p' : '":
  9969. videoPage = re.findall("0p' : '(http.*?)'", data, re.S)
  9970. if videoPage:
  9971. return videoPage[-1]
  9972. return ''
  9973. if parser == 'source src="':
  9974. videoPage = re.findall('source src="(http.*?)"', data, re.S)
  9975. if videoPage:
  9976. return videoPage[-1]
  9977. return ''
  9978. if parser == "video_url: '":
  9979. videoPage = re.findall("video_url: '(.*?).'", data, re.S)
  9980. if videoPage:
  9981. printDBG( 'Host videoPage:'+videoPage[0])
  9982. return videoPage[0]
  9983. return ''
  9984. if parser == 'videoFile="':
  9985. videoPage = re.findall('videoFile="(.*?)"', data, re.S)
  9986. if videoPage:
  9987. printDBG( 'Host videoPage:'+videoPage[0])
  9988. return videoPage[0]
  9989. return ''
  9990. if parser == 'http://www.ah-me.com':
  9991. videoUrl = ph.search(data, '''<video\ssrc=['"]([^'^"]+?)['"]''')[0]
  9992. return urlparser.decorateUrl(videoUrl, {'Referer': url})
  9993. if parser == 'http://www.nuvid.com':
  9994. videoUrl = re.search("http://www.nuvid.com/video/(.*?)/.+", url, re.S)
  9995. if videoUrl:
  9996. xml = 'http://m.nuvid.com/video/%s' % videoUrl.group(1)
  9997. try: data = self.cm.getURLRequestData({'url': xml, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True})
  9998. except:
  9999. printDBG( 'Host getResolvedURL query error xml' )
  10000. return ''
  10001. #printDBG( 'Host data json: '+data )
  10002. videoPage = re.findall('source src="(.*?)"', data, re.S)
  10003. if videoPage:
  10004. return videoPage[0]
  10005. return ''
  10006. if parser == 'http://www.wankoz.com':
  10007. videoPage = re.findall("'video_html5_url']='(.*?).'", data, re.S)
  10008. if videoPage:
  10009. printDBG( 'Host videoPage:'+videoPage[0])
  10010. return videoPage[0]
  10011. return ''
  10012. if parser == 'https://alpha.tnaflix.com':
  10013. videoPage = re.findall('"embedUrl" content="(.*?)"', data, re.S)
  10014. if videoPage:
  10015. printDBG( 'Host videoPage:'+videoPage[0])
  10016. return 'http:'+videoPage[0]
  10017. return ''
  10018. if parser == 'http://www.faphub.xxx':
  10019. videoPage = re.findall("url: '(.*?)'", data, re.S)
  10020. if videoPage:
  10021. printDBG( 'Host videoPage:'+videoPage[0])
  10022. return videoPage[0]
  10023. return ''
  10024. if parser == 'http://www.proporn.com':
  10025. videoPage = re.findall('source src="(.*?)"', data, re.S)
  10026. if videoPage:
  10027. printDBG( 'Host videoPage:'+videoPage[0])
  10028. return videoPage[0]
  10029. return ''
  10030. if parser == 'http://www.xnxx.com':
  10031. videoUrl = self.cm.ph.getSearchGroups(data, '''VideoUrlHigh\(['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10032. if videoUrl:
  10033. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10034. return urllib2.unquote(videoUrl)
  10035. videoUrl = self.cm.ph.getSearchGroups(data, '''VideoUrlLow\(['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10036. if videoUrl:
  10037. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10038. return urllib2.unquote(videoUrl)
  10039. videoUrl = self.cm.ph.getSearchGroups(data, '''VideoHLS\(['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10040. if videoUrl:
  10041. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10042. return urllib2.unquote(videoUrl)
  10043. videoUrl = re.search('flv_url=(.*?)&', data, re.S)
  10044. if videoUrl: return decodeUrl(videoUrl.group(1))
  10045. return ''
  10046. if parser == 'http://www.xvideos.com':
  10047. videoUrl = re.search("setVideoUrlHigh\('(.*?)'", data, re.S)
  10048. if videoUrl: return decodeUrl(videoUrl.group(1))
  10049. videoUrl = re.search('flv_url=(.*?)&', data, re.S)
  10050. if videoUrl: return decodeUrl(videoUrl.group(1))
  10051. return ''
  10052. if parser == 'http://embed.redtube.com':
  10053. videoPage = re.findall('sources:.*?":"(.*?)"', data, re.S)
  10054. if videoPage:
  10055. link = videoPage[-1].replace(r"\/",r"/")
  10056. if link.startswith('//'): link = 'http:' + link
  10057. return link
  10058. return ''
  10059. if parser == 'http://www.eporner.com':
  10060. videoID = re.search("http://www.eporner.com/hd-porn/(.*?)/.+", url)
  10061. if not videoID: return ''
  10062. parse = re.findall("hash: '(.*?)'", data, re.S)
  10063. hash = urllib.unquote_plus(parse[0]).decode("utf-8")
  10064. x = calc_hash(hash)
  10065. printDBG( 'Host getResolvedURL hash: '+parse[0]+' calc_hash:'+x)
  10066. xml = 'http://www.eporner.com/xhr/video/%s?device=generic&domain=www.eporner.com&hash=%s&fallback=false' % (videoID.group(1), x)
  10067. try: data = self.cm.getURLRequestData({'url': xml, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True})
  10068. except:
  10069. printDBG( 'Host getResolvedURL query error xml' )
  10070. return ''
  10071. #printDBG( 'Host data json: '+data )
  10072. videoPage = re.findall('src": "(.*?)"', data, re.S)
  10073. if videoPage: return videoPage[0]
  10074. return ''
  10075. if parser == 'http://www.pornhub.com/embed/':
  10076. match = re.findall("container.*?src.*?'(.*?)'", data, re.S)
  10077. if match: return match[0]
  10078. return ''
  10079. if parser == 'http://m.tube8.com':
  10080. match = re.compile('<div class="play_video.+?<a href="(.+?)"', re.DOTALL).findall(data)
  10081. return match[0]
  10082. if parser == 'http://m.pornhub.com':
  10083. match = re.compile('<div class="play_video.+?<a href="(.+?)"', re.DOTALL).findall(data)
  10084. return match[0]
  10085. if parser == 'http://www.dachix.com':
  10086. videoPage = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0]
  10087. if videoPage:
  10088. return urllib2.unquote(videoPage)
  10089. return ''
  10090. if parser == 'http://www.drtuber.com':
  10091. params = re.findall('params\s\+=\s\'h=(.*?)\'.*?params\s\+=\s\'%26t=(.*?)\'.*?params\s\+=\s\'%26vkey=\'\s\+\s\'(.*?)\'', data, re.S)
  10092. if params:
  10093. for (param1, param2, param3) in params:
  10094. hash = hashlib.md5(param3 + base64.b64decode('UFQ2bDEzdW1xVjhLODI3')).hexdigest()
  10095. url = '%s/player_config/?h=%s&t=%s&vkey=%s&pkey=%s&aid=' % ("http://www.drtuber.com", param1, param2, param3, hash)
  10096. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  10097. try:
  10098. data = self.cm.getURLRequestData(query_data)
  10099. except:
  10100. printDBG( 'Host listsItems query error' )
  10101. printDBG( 'Host listsItems query error url: '+url )
  10102. #printDBG( 'Host listsItems data: '+data )
  10103. url = re.findall('video_file>.*?(http.*?)\]\]><\/video_file>', data, re.S)
  10104. if url:
  10105. url = str(url[0])
  10106. url = url.replace("&amp;","&")
  10107. printDBG( 'Host listsItems url: '+url )
  10108. return url
  10109. return ''
  10110. if parser == 'http://www.el-ladies.com':
  10111. videoUrl = self.cm.ph.getSearchGroups(data, '''<source[^>]+?src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10112. if videoUrl:
  10113. return self.FullUrl(videoUrl)
  10114. videoPage = re.findall(',file:\'(.*?)\'', data, re.S)
  10115. if videoPage:
  10116. return videoPage[0]
  10117. return ''
  10118. if parser == 'http://sexylies.com':
  10119. videoPage = re.search('source\stype="video/mp4"\ssrc="(.*?)"', data, re.S)
  10120. if videoPage:
  10121. return videoPage.group(1)
  10122. return ''
  10123. if parser == 'http://www.eskimotube.com':
  10124. videoPage = re.search('color=black.*?href=(.*?)>', data, re.S)
  10125. if videoPage:
  10126. return videoPage.group(1)
  10127. return ''
  10128. if parser == 'http://www.porn5.com':
  10129. videoPage = re.findall('p",url:"(.*?)"', data, re.S)
  10130. if videoPage:
  10131. return videoPage[-1]
  10132. return ''
  10133. if parser == 'http://www.pornyeah.com':
  10134. videoPage = re.findall('settings=(.*?)"', data, re.S)
  10135. if not videoPage: return ''
  10136. xml = videoPage[0]
  10137. printDBG( 'Host getResolvedURL xml: '+xml )
  10138. try: data = self.cm.getURLRequestData({'url': xml, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True})
  10139. except:
  10140. printDBG( 'Host getResolvedURL query error xml' )
  10141. return videoUrl
  10142. videoPage = re.findall('defaultVideo:(.*?);', data, re.S)
  10143. if videoPage: return videoPage[0]
  10144. return ''
  10145. if parser == 'http://rusporn.tv':
  10146. videoUrl = self.cm.ph.getSearchGroups(data, '''video_alt_url: ['"]([^"^']+?)['"]''')[0]
  10147. if videoUrl: return videoUrl
  10148. videoUrl = self.cm.ph.getSearchGroups(data, '''video_url: ['"]([^"^']+?)['"]''')[0]
  10149. if videoUrl: return videoUrl
  10150. return ''
  10151. if parser == 'http://www.pornpillow.com':
  10152. videoPage = re.findall("'file': '(.*?)'", data, re.S)
  10153. if videoPage:
  10154. return videoPage[0]
  10155. return ''
  10156. if parser == 'http://www.thumbzilla.com':
  10157. match = re.findall('data-quality="(.*?)"', data)
  10158. if match:
  10159. fetchurl = urllib2.unquote(match[-1])
  10160. fetchurl = fetchurl.replace(r"\/",r"/")
  10161. if fetchurl.startswith('//'): fetchurl = 'http:' + fetchurl
  10162. return fetchurl
  10163. return ''
  10164. if parser == 'https://vidlox.tv':
  10165. parse = re.search('sources.*?"(http.*?)"', data, re.S)
  10166. if parse: return parse.group(1).replace('\/','/')
  10167. return ''
  10168. if parser == 'http://xxxkingtube.com':
  10169. parse = re.search("File = '(http.*?)'", data, re.S)
  10170. if parse: return parse.group(1).replace('\/','/')
  10171. return ''
  10172. if parser == 'http://pornsharing.com':
  10173. parse = re.search('btoa\("(http.*?)"', data, re.S)
  10174. if parse: return parse.group(1).replace('\/','/')
  10175. return ''
  10176. if parser == 'http://pornxs.com':
  10177. parse = re.search('config-final-url="(http.*?)"', data, re.S)
  10178. if parse: return parse.group(1).replace('\/','/')
  10179. return ''
  10180. if parser == 'http://www.flyflv.com':
  10181. parse = re.search('fileUrl="(http.*?)"', data, re.S)
  10182. if parse: return parse.group(1).replace('\/','/')
  10183. return ''
  10184. if parser == 'http://www.yeptube.com':
  10185. videoUrl = re.search('video_id = "(.*?)"', data, re.S)
  10186. if videoUrl:
  10187. xml = 'http://www.yeptube.com/player_config_json/?vid=%s&aid=0&domain_id=0&embed=0&ref=&check_speed=0' % videoUrl.group(1)
  10188. try: data = self.cm.getURLRequestData({'url': xml, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True})
  10189. except:
  10190. printDBG( 'Host getResolvedURL query error xml' )
  10191. return ''
  10192. #printDBG( 'Host data json: '+data )
  10193. videoPage = re.search('"hq":"(http.*?)"', data, re.S)
  10194. if videoPage: return videoPage.group(1).replace('\/','/')
  10195. videoPage = re.search('"lq":"(http.*?)"', data, re.S)
  10196. if videoPage: return videoPage.group(1).replace('\/','/')
  10197. return ''
  10198. if parser == 'http://vivatube.com':
  10199. videoUrl = re.search('video_id = "(.*?)"', data, re.S)
  10200. if videoUrl:
  10201. xml = 'http://vivatube.com/player_config_json/?vid=%s&aid=0&domain_id=0&embed=0&ref=&check_speed=0' % videoUrl.group(1)
  10202. try: data = self.cm.getURLRequestData({'url': xml, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True})
  10203. except:
  10204. printDBG( 'Host getResolvedURL query error xml' )
  10205. return ''
  10206. #printDBG( 'Host data json: '+data )
  10207. videoPage = re.search('"hq":"(http.*?)"', data, re.S)
  10208. if videoPage: return videoPage.group(1).replace('\/','/')
  10209. videoPage = re.search('"lq":"(http.*?)"', data, re.S)
  10210. if videoPage: return videoPage.group(1).replace('\/','/')
  10211. return ''
  10212. if parser == 'http://www.tubeon.com':
  10213. videoUrl = re.search('video_id = "(.*?)"', data, re.S)
  10214. if videoUrl:
  10215. xml = 'http://www.tubeon.com/player_config_json/?vid=%s&aid=0&domain_id=0&embed=0&ref=&check_speed=0' % videoUrl.group(1)
  10216. try: data = self.cm.getURLRequestData({'url': xml, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True})
  10217. except:
  10218. printDBG( 'Host getResolvedURL query error xml' )
  10219. return ''
  10220. #printDBG( 'Host data json: '+data )
  10221. videoPage = re.search('"hq":"(http.*?)"', data, re.S)
  10222. if videoPage: return videoPage.group(1).replace('\/','/')
  10223. videoPage = re.search('"lq":"(http.*?)"', data, re.S)
  10224. if videoPage: return videoPage.group(1).replace('\/','/')
  10225. return ''
  10226. if parser == 'http://www.yuvutu.com':
  10227. match = re.findall('iframe src="(.*?)"', data, re.S)
  10228. if match:
  10229. url = 'http://www.yuvutu.com'+match[0]
  10230. query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  10231. try:
  10232. data = self.cm.getURLRequestData(query_data)
  10233. except:
  10234. printDBG( 'Host listsItems query error url: '+url )
  10235. #printDBG( 'Host listsItems data: '+data )
  10236. url = re.findall('file: "(.*?)"', data, re.S)
  10237. if url:
  10238. videoUrl = url[-1]
  10239. return videoUrl
  10240. return ''
  10241. if parser == 'https://www.realgfporn.com':
  10242. videoUrl = self.cm.ph.getSearchGroups(data, '''<source\ssrc=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10243. if videoUrl:
  10244. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10245. return videoUrl
  10246. videoUrl = self.cm.ph.getSearchGroups(data, '''file: ['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10247. if videoUrl:
  10248. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10249. return videoUrl
  10250. if parser == 'http://www.homemoviestube.com':
  10251. videoUrl = self.cm.ph.getSearchGroups(data, '''value="settings=([^"^']+?)['"]''')[0]
  10252. if videoUrl:
  10253. query_data = { 'url': videoUrl, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
  10254. try:
  10255. data = self.cm.getURLRequestData(query_data)
  10256. except:
  10257. printDBG( 'Host listsItems query error url: '+url )
  10258. #printDBG( 'Host listsItems data: '+data )
  10259. return self.cm.ph.getSearchGroups(data, '''flvMask:([^"^']+?);''')[0]
  10260. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10261. if videoUrl:
  10262. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10263. return videoUrl
  10264. return ''
  10265. if parser == 'https://porndig.com':
  10266. videoUrl = self.cm.ph.getSearchGroups(data, '''<source\ssrc=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10267. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10268. if '.m3u8' in videoUrl:
  10269. if self.cm.isValidUrl(videoUrl):
  10270. tmp = getDirectM3U8Playlist(videoUrl)
  10271. for item in tmp:
  10272. printDBG( 'Host listsItems valtab: ' +str(item))
  10273. return item['url']
  10274. if 'sources": ' in data:
  10275. try:
  10276. sources = self.cm.ph.getDataBeetwenMarkers(data, 'sources": ', ']', False)[1]
  10277. result = byteify(simplejson.loads(sources+']'))
  10278. for item in result:
  10279. try:
  10280. if str(item["label"])=='720p': return str(item["src"]).replace('\/','/')
  10281. except Exception as e:
  10282. printExc()
  10283. try:
  10284. if str(item["label"])=='480p': return str(item["src"]).replace('\/','/')
  10285. except Exception as e:
  10286. printExc()
  10287. try:
  10288. if str(item["label"])=='360p': return str(item["src"]).replace('\/','/')
  10289. except Exception as e:
  10290. printExc()
  10291. try:
  10292. if str(item["label"])=='240p': return str(item["src"]).replace('\/','/')
  10293. except Exception as e:
  10294. printExc()
  10295. except Exception as e:
  10296. printExc()
  10297. return videoUrl
  10298. if parser == 'http://hentaigasm.com':
  10299. videoUrl = self.cm.ph.getSearchGroups(data, '''file: ['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10300. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10301. return urllib2.unquote(videoUrl)
  10302. if parser == 'https://www.katestube.com':
  10303. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'var flashvars', '}', False)[1]
  10304. if data2: return self.cm.ph.getSearchGroups(data2, '''['"](https://www.katestube.com/get_file[^"^']+?)['"]''')[0].replace('&amp;','&')
  10305. data2 = self.cm.ph.getDataBeetwenMarkers(data, 'sources:', ']', False)[1]
  10306. if data2: return self.cm.ph.getSearchGroups(data, '''src:\s['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10307. videoUrl = self.cm.ph.getSearchGroups(data, '''file: ['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10308. if videoUrl:
  10309. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10310. return urllib2.unquote(videoUrl)
  10311. videoUrl = self.cm.ph.getSearchGroups(data, '''['"](https://www.katestube.com/get_file[^"^']+?)['"]''')[0].replace('&amp;','&')
  10312. if videoUrl:
  10313. return urllib2.unquote(videoUrl)
  10314. return ''
  10315. if parser == 'https://www.pornoxo.com':
  10316. videoUrl = self.cm.ph.getSearchGroups(data, '''"file":['"]([^"^']+?)['"]''')[0].replace('\/','/')
  10317. if videoUrl:
  10318. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10319. return urllib2.unquote(videoUrl)
  10320. videoUrl = self.cm.ph.getSearchGroups(data, '''file\':\s['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10321. if videoUrl:
  10322. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10323. return urllib2.unquote(videoUrl)
  10324. videoUrl = self.cm.ph.getSearchGroups(data, '''filefallback\':\s['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10325. if videoUrl:
  10326. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10327. return urllib2.unquote(videoUrl)
  10328. videoUrl = self.cm.ph.getSearchGroups(data, '''<source\ssrc=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10329. if videoUrl:
  10330. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10331. return urllib2.unquote(videoUrl)
  10332. videoUrl = self.cm.ph.getSearchGroups(data, '''file:\s['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10333. if videoUrl:
  10334. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10335. return urllib2.unquote(videoUrl)
  10336. if parser == 'http://sexkino.to':
  10337. videoUrl = re.findall('<iframe.*?src="(.*?)"', data, re.S)
  10338. if videoUrl:
  10339. return self.getResolvedURL(videoUrl[-1])
  10340. if parser == 'https://momxxxfun.com':
  10341. videoUrl = self.cm.ph.getSearchGroups(data, '''<source src=['"]([^"^']+?)['"]''')[0].replace('&amp;','&')
  10342. if videoUrl:
  10343. if videoUrl.startswith('//'): videoUrl = 'http:' + videoUrl
  10344. return urlparser.decorateUrl(videoUrl, {'Referer': 'https://momxxxfun.com'})
  10345. videoUrls = []
  10346. urlSupport = self.up.checkHostSupport( url )
  10347. if 1 == urlSupport:
  10348. retTab = self.up.getVideoLinkExt( url )
  10349. videoUrls.extend(retTab)
  10350. printDBG("Video url[%s]" % videoUrls)
  10351. if videoUrls:
  10352. for item in videoUrls:
  10353. if item['url']: return item['url']
  10354. printDBG( 'Host getResolvedURL end' )
  10355. return videoUrl
  10356. ############################################
  10357. # functions for host
  10358. ############################################
  10359. def decodeUrl(text):
  10360. text = text.replace('%20',' ')
  10361. text = text.replace('%21','!')
  10362. text = text.replace('%22','"')
  10363. text = text.replace('%23','&')
  10364. text = text.replace('%24','$')
  10365. text = text.replace('%25','%')
  10366. text = text.replace('%26','&')
  10367. text = text.replace('%2B','+')
  10368. text = text.replace('%2F','/')
  10369. text = text.replace('%3A',':')
  10370. text = text.replace('%3B',';')
  10371. text = text.replace('%3D','=')
  10372. text = text.replace('&#x3D;','=')
  10373. text = text.replace('%3F','?')
  10374. text = text.replace('%40','@')
  10375. return text
  10376. def decodeHtml(text):
  10377. text = text.replace('&auml;','ä')
  10378. text = text.replace('\u00e4','ä')
  10379. text = text.replace('&#228;','ä')
  10380. text = text.replace('&oacute;','ó')
  10381. text = text.replace('&eacute;','e')
  10382. text = text.replace('&aacute;','a')
  10383. text = text.replace('&ntilde;','n')
  10384. text = text.replace('&Auml;','Ä')
  10385. text = text.replace('\u00c4','Ä')
  10386. text = text.replace('&#196;','Ä')
  10387. text = text.replace('&ouml;','ö')
  10388. text = text.replace('\u00f6','ö')
  10389. text = text.replace('&#246;','ö')
  10390. text = text.replace('&ouml;','Ö')
  10391. text = text.replace('\u00d6','Ö')
  10392. text = text.replace('&#214;','Ö')
  10393. text = text.replace('&uuml;','ü')
  10394. text = text.replace('\u00fc','ü')
  10395. text = text.replace('&#252;','ü')
  10396. text = text.replace('&Uuml;','Ü')
  10397. text = text.replace('\u00dc','Ü')
  10398. text = text.replace('&#220;','Ü')
  10399. text = text.replace('&szlig;','ß')
  10400. text = text.replace('\u00df','ß')
  10401. text = text.replace('&#223;','ß')
  10402. text = text.replace('&amp;','&')
  10403. text = text.replace('&quot;','\"')
  10404. text = text.replace('&quot_','\"')
  10405. text = text.replace('&gt;','>')
  10406. text = text.replace('&apos;',"'")
  10407. text = text.replace('&acute;','\'')
  10408. text = text.replace('&ndash;','-')
  10409. text = text.replace('&bdquo;','"')
  10410. text = text.replace('&rdquo;','"')
  10411. text = text.replace('&ldquo;','"')
  10412. text = text.replace('&lsquo;','\'')
  10413. text = text.replace('&rsquo;','\'')
  10414. text = text.replace('&#034;','\'')
  10415. text = text.replace('&#038;','&')
  10416. text = text.replace('&#039;','\'')
  10417. text = text.replace('&#39;','\'')
  10418. text = text.replace('&#160;',' ')
  10419. text = text.replace('\u00a0',' ')
  10420. text = text.replace('&#174;','')
  10421. text = text.replace('&#225;','a')
  10422. text = text.replace('&#233;','e')
  10423. text = text.replace('&#243;','o')
  10424. text = text.replace('&#8211;',"-")
  10425. text = text.replace('\u2013',"-")
  10426. text = text.replace('&#8216;',"'")
  10427. text = text.replace('&#8217;',"'")
  10428. text = text.replace('#8217;',"'")
  10429. text = text.replace('&#8220;',"'")
  10430. text = text.replace('&#8221;','"')
  10431. text = text.replace('&#8222;',',')
  10432. text = text.replace('&#x27;',"'")
  10433. text = text.replace('&#8230;','...')
  10434. text = text.replace('\u2026','...')
  10435. text = text.replace('&#41;',')')
  10436. text = text.replace('&lowbar;','_')
  10437. text = text.replace('&rsquo;','\'')
  10438. text = text.replace('&lpar;','(')
  10439. text = text.replace('&rpar;',')')
  10440. text = text.replace('&comma;',',')
  10441. text = text.replace('&period;','.')
  10442. text = text.replace('&plus;','+')
  10443. text = text.replace('&num;','#')
  10444. text = text.replace('&excl;','!')
  10445. text = text.replace('&#039','\'')
  10446. text = text.replace('&semi;','')
  10447. text = text.replace('&lbrack;','[')
  10448. text = text.replace('&rsqb;',']')
  10449. text = text.replace('&nbsp;','')
  10450. text = text.replace('&#133;','')
  10451. text = text.replace('&#4','')
  10452. text = text.replace('&#40;','')
  10453. text = text.replace('&atilde;',"'")
  10454. text = text.replace('&colon;',':')
  10455. text = text.replace('&sol;','/')
  10456. text = text.replace('&percnt;','%')
  10457. text = text.replace('&commmat;',' ')
  10458. return text
  10459. ############################################
  10460. # functions for pornhub
  10461. ############################################
  10462. def decrypt(ciphertext, password, nBits):
  10463. printDBG( 'decrypt begin ' )
  10464. blockSize = 16
  10465. if not nBits in (128, 192, 256): return ""
  10466. ciphertext = base64.b64decode(ciphertext)
  10467. # password = password.encode("utf-8")
  10468. nBytes = nBits//8
  10469. pwBytes = [0] * nBytes
  10470. for i in range(nBytes): pwBytes[i] = 0 if i>=len(password) else ord(password[i])
  10471. key = Cipher(pwBytes, KeyExpansion(pwBytes))
  10472. key += key[:nBytes-16]
  10473. counterBlock = [0] * blockSize
  10474. ctrTxt = ciphertext[:8]
  10475. for i in range(8): counterBlock[i] = ord(ctrTxt[i])
  10476. keySchedule = KeyExpansion(key)
  10477. nBlocks = int( math.ceil( float(len(ciphertext)-8) / float(blockSize) ) )
  10478. ct = [0] * nBlocks
  10479. for b in range(nBlocks):
  10480. ct[b] = ciphertext[8+b*blockSize : 8+b*blockSize+blockSize]
  10481. ciphertext = ct
  10482. plaintxt = [0] * len(ciphertext)
  10483. for b in range(nBlocks):
  10484. for c in range(4): counterBlock[15-c] = urs(b, c*8) & 0xff
  10485. for c in range(4): counterBlock[15-c-4] = urs( int( float(b+1)/0x100000000-1 ), c*8) & 0xff
  10486. cipherCntr = Cipher(counterBlock, keySchedule)
  10487. plaintxtByte = [0] * len(ciphertext[b])
  10488. for i in range(len(ciphertext[b])):
  10489. plaintxtByte[i] = cipherCntr[i] ^ ord(ciphertext[b][i])
  10490. plaintxtByte[i] = chr(plaintxtByte[i])
  10491. plaintxt[b] = "".join(plaintxtByte)
  10492. plaintext = "".join(plaintxt)
  10493. # plaintext = plaintext.decode("utf-8")
  10494. return plaintext
  10495. Sbox = [
  10496. 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,
  10497. 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0,
  10498. 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15,
  10499. 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75,
  10500. 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84,
  10501. 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf,
  10502. 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8,
  10503. 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2,
  10504. 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73,
  10505. 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb,
  10506. 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79,
  10507. 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08,
  10508. 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a,
  10509. 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e,
  10510. 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf,
  10511. 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
  10512. ]
  10513. Rcon = [
  10514. [0x00, 0x00, 0x00, 0x00],
  10515. [0x01, 0x00, 0x00, 0x00],
  10516. [0x02, 0x00, 0x00, 0x00],
  10517. [0x04, 0x00, 0x00, 0x00],
  10518. [0x08, 0x00, 0x00, 0x00],
  10519. [0x10, 0x00, 0x00, 0x00],
  10520. [0x20, 0x00, 0x00, 0x00],
  10521. [0x40, 0x00, 0x00, 0x00],
  10522. [0x80, 0x00, 0x00, 0x00],
  10523. [0x1b, 0x00, 0x00, 0x00],
  10524. [0x36, 0x00, 0x00, 0x00]
  10525. ]
  10526. def Cipher(input, w):
  10527. printDBG( 'cipher begin ' )
  10528. Nb = 4
  10529. Nr = len(w)/Nb - 1
  10530. state = [ [0] * Nb, [0] * Nb, [0] * Nb, [0] * Nb ]
  10531. for i in range(0, 4*Nb): state[i%4][i//4] = input[i]
  10532. state = AddRoundKey(state, w, 0, Nb)
  10533. for round in range(1, Nr):
  10534. state = SubBytes(state, Nb)
  10535. state = ShiftRows(state, Nb)
  10536. state = MixColumns(state, Nb)
  10537. state = AddRoundKey(state, w, round, Nb)
  10538. state = SubBytes(state, Nb)
  10539. state = ShiftRows(state, Nb)
  10540. state = AddRoundKey(state, w, Nr, Nb)
  10541. output = [0] * 4*Nb
  10542. for i in range(4*Nb): output[i] = state[i%4][i//4]
  10543. return output
  10544. def SubBytes(s, Nb):
  10545. printDBG( 'subbytes begin ' )
  10546. for r in range(4):
  10547. for c in range(Nb):
  10548. s[r][c] = Sbox[s[r][c]]
  10549. return s
  10550. def ShiftRows(s, Nb):
  10551. printDBG( 'shiftrows begin ' )
  10552. t = [0] * 4
  10553. for r in range (1,4):
  10554. for c in range(4): t[c] = s[r][(c+r)%Nb]
  10555. for c in range(4): s[r][c] = t[c]
  10556. return s
  10557. def MixColumns(s, Nb):
  10558. printDBG( 'mixcolumns begin ' )
  10559. for c in range(4):
  10560. a = [0] * 4
  10561. b = [0] * 4
  10562. for i in range(4):
  10563. a[i] = s[i][c]
  10564. b[i] = s[i][c]<<1 ^ 0x011b if s[i][c]&0x80 else s[i][c]<<1
  10565. s[0][c] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]
  10566. s[1][c] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]
  10567. s[2][c] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]
  10568. s[3][c] = a[0] ^ b[0] ^ a[1] ^ a[2] ^ b[3]
  10569. return s
  10570. def AddRoundKey(state, w, rnd, Nb):
  10571. printDBG( 'addroundkey begin ' )
  10572. for r in range(4):
  10573. for c in range(Nb):
  10574. state[r][c] ^= w[rnd*4+c][r]
  10575. return state
  10576. def KeyExpansion(key):
  10577. printDBG( 'keyexpansion begin ' )
  10578. Nb = 4
  10579. Nk = len(key)/4
  10580. Nr = Nk + 6
  10581. w = [0] * Nb*(Nr+1)
  10582. temp = [0] * 4
  10583. for i in range(Nk):
  10584. r = [key[4*i], key[4*i+1], key[4*i+2], key[4*i+3]]
  10585. w[i] = r
  10586. for i in range(Nk, Nb*(Nr+1)):
  10587. w[i] = [0] * 4
  10588. for t in range(4): temp[t] = w[i-1][t]
  10589. if i%Nk == 0:
  10590. temp = SubWord(RotWord(temp))
  10591. for t in range(4): temp[t] ^= Rcon[i/Nk][t]
  10592. elif Nk>6 and i%Nk == 4:
  10593. temp = SubWord(temp)
  10594. for t in range(4): w[i][t] = w[i-Nk][t] ^ temp[t]
  10595. return w
  10596. def SubWord(w):
  10597. printDBG( 'subword begin ' )
  10598. for i in range(4): w[i] = Sbox[w[i]]
  10599. return w
  10600. def RotWord(w):
  10601. printDBG( 'rotword begin ' )
  10602. tmp = w[0]
  10603. for i in range(3): w[i] = w[i+1]
  10604. w[3] = tmp
  10605. return w
  10606. def encrypt(plaintext, password, nBits):
  10607. printDBG( 'encrypt begin ' )
  10608. blockSize = 16
  10609. if not nBits in (128, 192, 256): return ""
  10610. # plaintext = plaintext.encode("utf-8")
  10611. # password = password.encode("utf-8")
  10612. nBytes = nBits//8
  10613. pwBytes = [0] * nBytes
  10614. for i in range(nBytes): pwBytes[i] = 0 if i>=len(password) else ord(password[i])
  10615. key = Cipher(pwBytes, KeyExpansion(pwBytes))
  10616. key += key[:nBytes-16]
  10617. counterBlock = [0] * blockSize
  10618. now = datetime.datetime.now()
  10619. nonce = time.mktime( now.timetuple() )*1000 + now.microsecond//1000
  10620. nonceSec = int(nonce // 1000)
  10621. nonceMs = int(nonce % 1000)
  10622. for i in range(4): counterBlock[i] = urs(nonceSec, i*8) & 0xff
  10623. for i in range(4): counterBlock[i+4] = nonceMs & 0xff
  10624. ctrTxt = ""
  10625. for i in range(8): ctrTxt += chr(counterBlock[i])
  10626. keySchedule = KeyExpansion(key)
  10627. blockCount = int(math.ceil(float(len(plaintext))/float(blockSize)))
  10628. ciphertxt = [0] * blockCount
  10629. for b in range(blockCount):
  10630. for c in range(4): counterBlock[15-c] = urs(b, c*8) & 0xff
  10631. for c in range(4): counterBlock[15-c-4] = urs(b/0x100000000, c*8)
  10632. cipherCntr = Cipher(counterBlock, keySchedule)
  10633. blockLength = blockSize if b<blockCount-1 else (len(plaintext)-1)%blockSize+1
  10634. cipherChar = [0] * blockLength
  10635. for i in range(blockLength):
  10636. cipherChar[i] = cipherCntr[i] ^ ord(plaintext[b*blockSize+i])
  10637. cipherChar[i] = chr( cipherChar[i] )
  10638. ciphertxt[b] = ''.join(cipherChar)
  10639. ciphertext = ctrTxt + ''.join(ciphertxt)
  10640. ciphertext = base64.b64encode(ciphertext)
  10641. return ciphertext
  10642. def urs(a, b):
  10643. printDBG( 'urs begin ' )
  10644. a &= 0xffffffff
  10645. b &= 0x1f
  10646. if a&0x80000000 and b>0:
  10647. a = (a>>1) & 0x7fffffff
  10648. a = a >> (b-1)
  10649. else:
  10650. a = (a >> b)
  10651. return a
  10652. ############################################
  10653. # functions for beeg.com
  10654. ############################################
  10655. def decrypt_key(key, a):
  10656. printDBG( 'beeg_salt= '+a)
  10657. e = urllib.unquote_plus(key).decode("utf-8")
  10658. o = ''.join([
  10659. chr(ord(e[n]) - ord(a[n % len(a)]) % 21)
  10660. for n in range(len(e))])
  10661. return ''.join(split(o, 3)[::-1])
  10662. def split(o, e):
  10663. def cut(s, x):
  10664. n.append(s[:x])
  10665. return s[x:]
  10666. n = []
  10667. r = len(o) % e
  10668. if r > 0:
  10669. o = cut(o, r)
  10670. while len(o) > e:
  10671. o = cut(o, e)
  10672. n.append(o)
  10673. return n
  10674. ############################################
  10675. # functions for eporner
  10676. ############################################
  10677. def calc_hash(s):
  10678. return ''.join((encode_base_n(int(s[lb:lb + 8], 16), 36) for lb in range(0, 32, 8)))
  10679. def encode_base_n(num, n, table=None):
  10680. FULL_TABLE = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
  10681. if not table:
  10682. table = FULL_TABLE[:n]
  10683. if n > len(table):
  10684. raise ValueError('base %d exceeds table length %d' % (n, len(table)))
  10685. if num == 0:
  10686. return table[0]
  10687. ret = ''
  10688. while num:
  10689. ret = table[num % n] + ret
  10690. num = num // n
  10691. return ret
  10692. ############################################
  10693. # functions for myfreecam
  10694. ############################################
  10695. vs_str={}
  10696. vs_str[0]="PUBLIC"
  10697. vs_str[2]="AWAY"
  10698. vs_str[12]="PVT"
  10699. vs_str[13]="GROUP"
  10700. vs_str[90]="CAM OFF"
  10701. vs_str[127]="OFFLINE"
  10702. vs_str[128]="TRUEPVT"
  10703. def fc_decode_json(m):
  10704. try:
  10705. m = m.replace('\r', '\\r').replace('\n', '\\n')
  10706. return simplejson.loads(m[m.find("{"):].decode("utf-8","ignore"))
  10707. except:
  10708. return simplejson.loads("{\"lv\":0}")
  10709. def read_model_data(m):
  10710. global CAMGIRLSERVER
  10711. global CAMGIRLCHANID
  10712. global CAMGIRLUID
  10713. printDBG("INFO - "+str(m))
  10714. usr = ''
  10715. msg = fc_decode_json(m)
  10716. try:
  10717. sid=msg['sid']
  10718. level = msg['lv']
  10719. except:
  10720. printDBG ("errr reply ... We're fucked ..")
  10721. return
  10722. vs = msg['vs']
  10723. usr = msg['nm']
  10724. if vs == 2:
  10725. printDBG ("%s is %s" % (usr, vs_str[vs]))
  10726. SetIPTVPlayerLastHostError(_(vs_str[vs]))
  10727. return []
  10728. if vs == 12:
  10729. printDBG ("%s is %s" % (usr, vs_str[vs]))
  10730. SetIPTVPlayerLastHostError(_(vs_str[vs]))
  10731. return []
  10732. if vs == 13:
  10733. printDBG ("%s is %s" % (usr, vs_str[vs]))
  10734. SetIPTVPlayerLastHostError(_(vs_str[vs]))
  10735. return []
  10736. if vs == 90:
  10737. printDBG ("%s is %s" % (usr, vs_str[vs]))
  10738. SetIPTVPlayerLastHostError(_(vs_str[vs]))
  10739. return []
  10740. if vs == 127:
  10741. printDBG ("%s is %s" % (usr, vs_str[vs]))
  10742. SetIPTVPlayerLastHostError(_(vs_str[vs]))
  10743. return []
  10744. if vs == 128:
  10745. printDBG ("%s is %s" % (usr, vs_str[vs]))
  10746. SetIPTVPlayerLastHostError(_(vs_str[vs]))
  10747. return []
  10748. CAMGIRLUID = msg['uid']
  10749. CAMGIRLCHANID = msg['uid'] + 100000000
  10750. camgirlinfo=msg['m']
  10751. flags = camgirlinfo['flags']
  10752. u_info=msg['u']
  10753. try:
  10754. CAMGIRLSERVER = u_info['camserv']
  10755. printDBG ("Video Server : %d Channel Id : %d Model id : %d " %(CAMGIRLSERVER, CAMGIRLCHANID, CAMGIRLUID))
  10756. SetIPTVPlayerLastHostError(str(CAMGIRLSERVER))
  10757. # with open('/tmp/title', 'w') as titleFile:
  10758. # titleFile.write(str(CAMGIRLSERVER))
  10759. # if CAMGIRLSERVER >= 3000:
  10760. # SetIPTVPlayerLastHostError(str(CAMGIRLSERVER))
  10761. # CAMGIRLSERVER = 0
  10762. # return []
  10763. # CAMGIRLSERVER = CAMGIRLSERVER - 1000
  10764. # elif CAMGIRLSERVER >= 1500:
  10765. # SetIPTVPlayerLastHostError(str(CAMGIRLSERVER))
  10766. # CAMGIRLSERVER = 0
  10767. # return []
  10768. # CAMGIRLSERVER = CAMGIRLSERVER - 800
  10769. # elif CAMGIRLSERVER >= 800:
  10770. # CAMGIRLSERVER = CAMGIRLSERVER - 500
  10771. if vs != 0:
  10772. CAMGIRLSERVER = 0
  10773. except KeyError:
  10774. CAMGIRLSERVER=0
  10775. truepvt = ((flags & 8) == 8)
  10776. buf=usr+" =>"
  10777. try:
  10778. if truepvt == 1:
  10779. buf+=" (TRUEPVT)"
  10780. else:
  10781. buf+=" ("+vs_str[vs]+")"
  10782. except KeyError:
  10783. pass
  10784. printDBG ("%s Video Server : %d Channel Id : %d Model id : %d " %(buf, CAMGIRLSERVER, CAMGIRLCHANID, CAMGIRLUID))
  10785. def myfreecam_start(url):
  10786. global CAMGIRL
  10787. global CAMGIRLSERVER
  10788. global CAMGIRLUID
  10789. global CAMGIRLCHANID
  10790. CAMGIRL= url
  10791. CAMGIRLSERVER = 0
  10792. libsPath = GetPluginDir('libs/')
  10793. import sys
  10794. sys.path.insert(1, libsPath)
  10795. import websocket
  10796. printDBG("Connecting to Chat Server...")
  10797. try:
  10798. xchat = [ 62, 63, 64, 65, 66, 67, 68, 69,
  10799. 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  10800. 80, 81, 83 ,84, 85, 86, 87, 88, 89,
  10801. 91, 94, 95, 96, 97, 98, 99,
  10802. 100, 101, 102, 103, 104, 105, 106, 108, 109,
  10803. 111, 112, 113, 114, 115, 116, 118, 119,
  10804. 120, 121, 122, 123, 124, 125, 126, 127
  10805. ]
  10806. host = "ws://xchat"+str(random.choice(xchat))+".myfreecams.com:8080/fcsl"
  10807. printDBG("Chat Server..."+host)
  10808. ws = websocket.create_connection(host)
  10809. ws.send("hello fcserver\n\0")
  10810. ws.send("1 0 0 20071025 0 guest:guest\n\0")
  10811. except:
  10812. printDBG ("We're fucked ...")
  10813. return ''
  10814. rembuf=""
  10815. quitting = 0
  10816. try:
  10817. while quitting == 0:
  10818. sock_buf = ws.recv()
  10819. sock_buf=rembuf+sock_buf
  10820. rembuf=""
  10821. while True:
  10822. hdr=re.search (r"(\w+) (\w+) (\w+) (\w+) (\w+)", sock_buf)
  10823. if bool(hdr) == 0:
  10824. break
  10825. fc = hdr.group(1)
  10826. mlen = int(fc[0:4])
  10827. fc_type = int(fc[4:])
  10828. msg=sock_buf[4:4+mlen]
  10829. if len(msg) < mlen:
  10830. rembuf=''.join(sock_buf)
  10831. break
  10832. msg=urllib.unquote(msg)
  10833. if fc_type == 1:
  10834. ws.send("10 0 0 20 0 %s\n\0" % CAMGIRL)
  10835. elif fc_type == 10:
  10836. read_model_data(msg)
  10837. quitting=1
  10838. sock_buf=sock_buf[4+mlen:]
  10839. if len(sock_buf) == 0:
  10840. break
  10841. except:
  10842. printDBG ("WebSocket Error")
  10843. return ''
  10844. ws.close()
  10845. if CAMGIRLSERVER != 0:
  10846. #Url="http://video"+str(CAMGIRLSERVER)+".myfreecams.com:1935/NxServer/ngrp:mfc_"+str(CAMGIRLCHANID)+".f4v_mobile/playlist.m3u8" #+'?nc='+str(int(time_time()*1000)) #+str(datetime.now()) #str(time_time()).encode('utf-8')
  10847. #Url="http://video"+str(CAMGIRLSERVER)+".myfreecams.com:1935/NxServer/mfc_"+str(CAMGIRLCHANID)+".f4v_aac/playlist.m3u8" #320x240
  10848. Url="https://video"+str(CAMGIRLSERVER)+".myfreecams.com/NxServer/ngrp:mfc_"+str(CAMGIRLCHANID)+".f4v_mobile/playlist.m3u8?nc=0.5863279394620062" #+str(random.random())
  10849. printDBG("Camgirl - "+CAMGIRL)
  10850. printDBG("Url - "+Url)
  10851. return Url
  10852. else:
  10853. printDBG ("No video server ... _|_ ")
  10854. return ''
  10855. # decrypt function/0/
  10856. def decryptHash(videoUrl, licenseCode, hashRange):
  10857. result = ''
  10858. videoUrlPart = videoUrl.split('/')
  10859. hash = videoUrlPart[7][:2*int(hashRange)]
  10860. nonConvertHash = videoUrlPart[7][2*int(hashRange):]
  10861. seed = calcSeed(licenseCode, hashRange)
  10862. if (seed != '' and hash !=''):
  10863. for k in range(len(hash)-1, -1, -1):
  10864. l = k
  10865. for m in range(k,len(hash)):
  10866. l += int(seed[m])
  10867. l = l % len(hash)
  10868. n = ''
  10869. for o in range(0, len(hash)):
  10870. n = n + hash[l] if o == k else n + hash[k] if o == l else n + hash[o]
  10871. hash = n
  10872. videoUrlPart[7] = hash + nonConvertHash
  10873. videoUrlPart.pop(0)
  10874. videoUrlPart.pop(0)
  10875. result = '/'.join(videoUrlPart)
  10876. return result
  10877. def calcSeed(licenseCode, hashRange):
  10878. f = licenseCode.replace('$', '').replace('0', '1')
  10879. j = int(len(f) / 2)
  10880. k = int(f[:len(f)-j])
  10881. l = int(f[j:])
  10882. g = abs(l - k)
  10883. fi = 4*g
  10884. i = int(int(hashRange) / 2 + 2)
  10885. m = ''
  10886. for g2 in range (0,j+1):
  10887. for h in range (1,5):
  10888. n = int(licenseCode[g2 + h]) + int(str(fi)[g2])
  10889. if n>=i:
  10890. n -= i
  10891. m = m + str(n)
  10892. return m