Kod:
# File: t (Python 2.7)
from Screens.MessageBox import MessageBox
from twisted.web.client import getPage
from twisted.web import client, error as weberror
from twisted.internet import reactor
from twisted.internet import defer
from urllib import quote, urlencode
import re
import urllib2
import urllib
import cookielib
from jsunpacker import cJsUnpacker
from t0mm0.common.net import Net
from twagenthelper import TwAgentHelper
from packer import unpack
from otvhelper import *
import otv_kuresel
from OTVPlayer import OTVPlayer
from Plugins.Extensions.OrhanTV1.sources.otvhelper import *
from Plugins.Extensions.OrhanTV1.sources.twagenthelper import TwAgentHelper
from otvscreen import OTVScreen
from showAsThumb import ShowThumbscreen, CoverHelper
import cgi
from BeautifulSoup import BeautifulSoup
from pCommon import common, CParsingHelper
import json
from urlparse import parse_qs
import re
import util
import sys
import struct
import base64
import unicodedata
import requests
import cookielib
from base64 import b64decode as bsdcd
from decrypt import *
from core.item import Item
import urllib
from StringIO import StringIO
from Plugins.Extensions.OrhanTV1.sources.pCommon import common, CParsingHelper
useragent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0'
from OTVPlayer import OTVPlayer
headers = [
[
'User-Agent',
'Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0'],
[
'Accept-Encoding',
'gzip, deflate'],
[
'Connection',
'keep-alive']]
from Plugins.Extensions.OrhanTV1.sources.otvhelper import *
from BeautifulSoup import BeautifulSoup
from Screens.InfoBar import MoviePlayer, InfoBar, InfoBarNotifications, InfoBarServiceNotifications, InfoBarPVRState, InfoBarShowHide, InfoBarAudioSelection, InfoBarSubtitleSupport
from Screens.InfoBarGenerics import InfoBarSeek, InfoBarCueSheetSupport, InfoBarMenu
from enigma import eListboxPythonMultiContent, eServiceReference, getDesktop, iPlayableService, eSize, ePicLoad, iServiceInformation
from ServiceReference import ServiceReference
from enigma import eServiceReference
import urllib
import urllib2
import re
import sys
import struct
import base64
class tvsekiz(OTVScreen):
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn7 import __init__
def sayfaindir(self):
self.kilitkir = True
url = 'http://www.tv8.com.tr/'
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.sayfabilgi).addErrback(self.dataError)
def sayfabilgi(self, data):
self.tarzlistesi.append(('CANLI YAYIN', ''))
self.tarzlistesi.append(('Survivor t\xc3\xbcm b\xc4\xb1l\xc3\xbcmler', 'http://www.tv8.com.tr/Ajax/icerik/kategori_video_listele/22/83'))
self.tarzlistesi.append(('Survivor t\xc3\xbcm bol\xc3\xbcmler 1', 'http://www.tv8.com.tr/Ajax/icerik/kategori_video_listele/22/83'))
data = data.replace('//img', 'http://img')
channels = re.findall('<li ><a href="http://www.tv8.com.tr/(.*?)".*?<img src="(.*?)" alt="" title="" /></a></li>', data, re.S)
if channels:
for (urlveri, resim) in channels:
print urlveri, resim
self.tarzlistesi.append((alfabekodla(urlveri), resim))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.th_ThumbsQuery(self.tarzlistesi, 0, 1, 2, None, None, 1, 1)
self.listinfo()
def listinfo(self):
handlung = self['liste'].getCurrent()[0][0]
self['eylem'].setText(handlung)
coverUrl = self['liste'].getCurrent()[0][1]
PixmapHelper(self['Cover']).getCover(coverUrl)
def keyOK(self):
exist = self['liste'].getCurrent()
if self.kilitkir or exist == None:
return None
add_adi = None['liste'].getCurrent()[0][0]
urladi = self['liste'].getCurrent()[0][0]
urlveri = 'http://www.tv8.com.tr/' + self['liste'].getCurrent()[0][0]
self.session.open(sonbolumizlesenenet1, urlveri, urladi, add_adi)
add_adi = self['liste'].getCurrent()[0][0]
urladi = self['liste'].getCurrent()[0][0]
urlveri = self['liste'].getCurrent()[0][1]
print urladi
if 'Survivor t\xc3\xbcm b\xc4\xb1l\xc3\xbcmler' in urladi:
print add_adi
self.session.open(tumbolumler2, urlveri, urladi, add_adi)
if 'Survivor t\xc3\xbcm bol\xc3\xbcmler 1' in urladi:
print add_adi
self.session.open(tumbolumler2, urlveri, urladi, add_adi)
if 'CANLI YAYIN' in urladi:
url = 'http://www.tv8.com.tr/canli-yayin'
src = 'http://www.tv8.com.tr/Ajax/icerik/video_count_canli'
print url
getPage(url, method = 'POST', postdata = src, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.streamDat).addErrback(self.dataError)
def streamDat(self, data):
print data
def streamDat(self, data):
print data
streamDaten = re.findall('mobileSource\t\t\t: \t"http://mn-i.mncdn.com/tv8_ios/smil:tv8_live.smil/playlist.m3u8?(.*?)",', data, re.S)
if streamDaten:
serviceUrl = streamDaten[0]
streamName = self['liste'].getCurrent()[0][0]
url = 'rtmp://mn-l.mncdn.com/tv8/ playpath=tv8_live3?%s swfUrl=http://players-p.mncdn.com/estv/flowplayer.unlimited-3.2.16.swf pageUrl=http://www.ecanlitvizle.com/Tv8/Tv84.php' % serviceUrl
url = url.replace('m3u8', 'm3u8?')
print streamName, url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False)
def searchCallback(self, callbackStr):
if callbackStr is not None:
print callbackStr
self.session.open(sonbolumizlesenenet1, callbackStr)
class sonbolumizlesenenet1(OTVScreen, CoverHelper):
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import __init__
def sayfaindir(self):
self.kilitkir = True
url = '%s%s' % (self.urlveri, str(self.sayfa))
url = url.replace('[]', '')
print 'url=', url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.sayfabilgi).addErrback(self.dataError)
def sayfabilgi(self, data):
data = data.replace('//img', 'http://img')
rssfeed = re.findall('class="tabVideoListContent-img"><img src="(.*?)" alt="" title="" /><span class="time1">.*?</span><span class="play5">play</span></a><p class="clearfix tabVideoListTextContent"><a href="(.*?)" class="sliderType4TitleCat">.*?class="tabVideoListTitle">(.*?)</a>', data, re.S)
if rssfeed:
for (title, image, channelname) in rssfeed:
print title, image, channelname
self.tarzlistesi.append((alfabekodla(channelname), title, image))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.th_ThumbsQuery(self.tarzlistesi, 0, 1, 2, None, None, 1, 1)
self.listinfo()
def listinfo(self):
handlung = self['liste'].getCurrent()[0][0]
self['eylem'].setText(handlung)
coverUrl = self['liste'].getCurrent()[0][1]
PixmapHelper(self['Cover']).getCover(coverUrl)
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn9 import keyShowThumb
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn1 import keyPageUpFast
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn1 import keyPageDownFast
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyUpRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyDownRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_repeatedUp
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyLeftRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyRightRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyDown
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyTxtPageUp
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyTxtPageDown
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyGreen
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_1
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_4
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_7
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_3
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_6
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_9
def keyOK(self):
if self.kilitkir:
return None
src = None
name = self['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][2]
print url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.streamData).addErrback(self.dataError)
def streamData(self, data):
if re.match(".*?html5AltSrc : '", data, re.S):
stream = re.findall("html5AltSrc : '(.*?)'", data)
if stream:
name = self['liste'].getCurrent()[0][0]
url = '%s' % stream[0]
print name, url
self.session.open(OTVPlayer, [
(name, url)], showPlaylist = False, ltype = 'streamoase')
class tumbolumler(OTVScreen, CoverHelper):
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn12 import __init__
def sayfaindir(self):
self.kilitkir = True
url = '%s/%s' % (self.urlveri, str(self.sayfa))
url = url.replace('[]', '1')
print 'url=', url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.sayfabilgi).addErrback(self.dataError)
def sayfabilgi(self, data):
data = data.replace('(', '')
data = data.replace(')', '')
data = data.replace('\\', '')
data = data.replace('u0', '')
data = data.replace('\\\\/', '/')
data = data.replace('\\/', '/')
data = data.replace('0f6', '\xc3\xb6')
data = data.replace('0fc', '\xc3\xbc')
data = data.replace('15f', '\xc5?')
data = data.replace('131', '\xc4\xb1')
rssfeed = re.findall('"id":"(.*?)".*?"spot":"(.*?)","slug":"(.*?)".*?"620_340":"(.*?)"', data, re.S)
if rssfeed:
for (title, channel, name, image) in rssfeed:
print title, image, channel, name
self.tarzlistesi.append((alfabekodla(channel), name, title, image))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.th_ThumbsQuery(self.tarzlistesi, 0, 1, 2, None, None, 1, 1)
self.listinfo()
def listinfo(self):
Name = self['liste'].getCurrent()[0][1]
self['name'].setText(Name)
handlung = self['liste'].getCurrent()[0][1]
self['eylem'].setText(handlung)
coverUrl = self['liste'].getCurrent()[0][3].replace('uploads', 'http://www.tv8.com.tr/uploads')
PixmapHelper(self['Cover']).getCover(coverUrl)
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn9 import keyShowThumb
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn1 import keyPageUpFast
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn1 import keyPageDownFast
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyUpRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyDownRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_repeatedUp
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyLeftRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyRightRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyDown
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyTxtPageUp
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyTxtPageDown
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyGreen
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_1
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_4
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_7
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_3
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_6
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_9
def keyOK(self):
if self.kilitkir:
return None
src = None
name = self['liste'].getCurrent()[0][2]
veri = self['liste'].getCurrent()[0][1]
url = 'http://www.tv8.com.tr/video/survivor/%s/%s' % (veri, name)
print url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.streamData).addErrback(self.dataError)
def streamData(self, data):
if re.match(".*?html5AltSrc : '", data, re.S):
stream = re.findall("html5AltSrc : '(.*?)'", data)
if stream:
name = self['liste'].getCurrent()[0][0]
url = '%s' % stream[0]
print name, url
self.session.open(OTVPlayer, [
(name, url)], showPlaylist = False, ltype = 'streamoase')
class tumbolumler2(OTVScreen, CoverHelper):
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn12 import __init__
def sayfaindir(self):
self.kilitkir = True
url = '%s/%s' % (self.urlveri, str(self.sayfa))
url = url.replace('[]', '1')
print 'url=', url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.sayfabilgi).addErrback(self.dataError)
def sayfabilgi(self, data):
data = data.replace('(', '')
data = data.replace(')', '')
data = data.replace('\\', '')
data = data.replace('\\u', '')
data = data.replace('\\\\/', '/')
data = data.replace('\\/', '/')
data = data.replace('00f6', '\xc3\xb6')
data = data.replace('00fc', '\xc3\xbc')
data = data.replace('015f', '\xc5?')
data = data.replace('0131', '\xc4\xb1')
rssfeed = re.findall('"id":"(.*?)".*?"spot":"(.*?)","slug":"(.*?)".*?"original":"(.*?)"', data, re.S)
if rssfeed:
for (title, channel, name, image) in rssfeed:
print title, image, channel, name
self.tarzlistesi.append((alfabekodla(channel), name, title, image))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.th_ThumbsQuery(self.tarzlistesi, 0, 1, 2, None, None, 1, 1)
self.listinfo()
def listinfo(self):
Name = self['liste'].getCurrent()[0][1]
self['name'].setText(Name)
handlung = self['liste'].getCurrent()[0][1]
self['eylem'].setText(handlung)
coverUrl = self['liste'].getCurrent()[0][3].replace('uploads', 'http://www.tv8.com.tr/uploads')
PixmapHelper(self['Cover']).getCover(coverUrl)
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn9 import keyShowThumb
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn1 import keyPageUpFast
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn1 import keyPageDownFast
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyUpRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyDownRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_repeatedUp
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyLeftRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyRightRepeated
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyDown
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyTxtPageUp
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyTxtPageDown
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import keyGreen
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_1
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_4
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_7
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_3
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_6
from Plugins.Extensions.OrhanTV1.sources.puzzle.screentn3 import key_9
def keyOK(self):
if self.kilitkir:
return None
src = None
name = self['liste'].getCurrent()[0][2]
veri = self['liste'].getCurrent()[0][1]
streamurl = 'http://www.tv8.com.tr/video/survivor/%s/%s' % (veri, name)
self.session.open(bolumler, streamurl)
def streamData(self, data):
if re.match(".*?html5AltSrc : '", data, re.S):
stream = re.findall("html5AltSrc : '(.*?)'", data)
if stream:
name = self['liste'].getCurrent()[0][0]
url = '%s' % stream[0]
print name, url
self.session.open(OTVPlayer, [
(name, url)], showPlaylist = False, ltype = 'streamoase')
class bolumler(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self['name'] = Label('')
self['eylem'] = Label('')
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
self.imageUrl = []
self.urls = []
self.url = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPage)
def loadPage(self):
self.kilitkir = True
url = '%s%s' % (self.streamurl, str(self.page))
url = url.replace('[]', '')
print url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.pageData).addErrback(self.errorload)
def pageData(self, data):
self.tarzlistesi.append(('1. BOL\xdcM', '%s/1' % self.streamurl))
if re.match('.*?<a href="', data, re.S):
data = data.replace('1. B\xd6L\xdcM', '').replace('class=""', 'class="active"')
channels = re.findall('<a href="(http://www.tv8.com.tr/video/survivor/.*?)" class="active">(.*?)</a>', data)
if channels:
for (streamName, streamurl) in channels:
print streamurl, streamName
self.tarzlistesi.append((alfabekodla(streamurl), streamName))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.th_ThumbsQuery(self.tarzlistesi, 0, 1, 2, None, None, 1, 1)
self.listinfo()
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def listinfo(self):
streamName = self['liste'].getCurrent()[0][1].replace('1', '1. Par\xc3\xa7a').replace('2', '2. Par\xc3\xa7a').replace('3', '3. Par\xc3\xa7a').replace('4', '4. Par\xc3\xa7a').replace('5', '5. Par\xc3\xa7a').replace('6', '6. Par\xc3\xa7a').replace('7', '7. Par\xc3\xa7a').replace('8', '8. Par\xc3\xa7a').replace('9', '9. Par\xc3\xa7a')
self['name'].setText(streamName)
Name = self['liste'].getCurrent()[0][1].replace('1', '1. Par\xc3\xa7a').replace('2', '2. Par\xc3\xa7a').replace('3', '3. Par\xc3\xa7a').replace('4', '4. Par\xc3\xa7a').replace('5', '5. Par\xc3\xa7a').replace('6', '6. Par\xc3\xa7a').replace('7', '7. Par\xc3\xa7a').replace('8', '8. Par\xc3\xa7a').replace('9', '9. Par\xc3\xa7a')
self['eylem'].setText(Name)
def keyOK(self):
if self.kilitkir:
return None
url = None['liste'].getCurrent()[0][1]
print url
getPage(url, agent = std_headers, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.streamData).addErrback(self.dataError)
def streamData(self, data):
if re.match(".*?html5AltSrc : '", data, re.S):
stream = re.findall("html5AltSrc : '(.*?)'", data)
if stream:
name = self['liste'].getCurrent()[0][0]
url = '%s' % stream[0]
print name, url
self.session.open(OTVPlayer, [
(name, url)], showPlaylist = False, ltype = 'streamoase')
class odnoklassniki(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self.kilitkir = True
self['eylem'] = Label('')
self.replace = []
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
if config.orhantv1.premiumize_use.value and config.orhantv1.sp_use_yt_with_proxy.value:
pass
self.useProxy = otv_kuresel.premium_yt_proxy_host
self.favo_path = config.orhantv1.watchlistpath.value + 'mp_yt_favorites.xml'
self.tw_agent_hlp = TwAgentHelper(gzip_decoding = True)
self.playAll = False
self.imageUrl = []
self.headers = []
self.url = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPa)
def loadPa(self):
self.kilitkir = True
url = '%s%s' % (self.streamurl, str(self.page))
url = url.replace('[]', '').replace('#038;', '')
print 'url=', url
print url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.loadPage).addErrback(self.errorload)
def loadPage(self, data):
print data
channels = re.findall('</div><a class="outLnk blk" href="(.*?)"', data, re.S)
if channels:
url = '%s' % channels[0]
print url
self.pageData(url)
def pageData(self, url):
print url
self.tarzlistesi.append(('mobile', '%s' % url.replace('st.mq=2', 'st.mq=4').replace('amp;', '')))
self.tarzlistesi.append(('lowes', '%s' % url.replace('st.mq=2', 'st.mq=1').replace('amp;', '')))
self.tarzlistesi.append(('low', '%s' % url.replace('st.mq=2', 'st.mq=2').replace('amp;', '')))
self.tarzlistesi.append(('sd', '%s' % url.replace('st.mq=2', 'st.mq=3').replace('amp;', '')))
self.tarzlistesi.append(('hd', '%s' % url.replace('st.mq=2', 'st.mq=5').replace('amp;', '')))
self.tarzlistesi.append(('full', '' + url.replace('st.mq=2', 'st.mq=6').replace('amp;', '')))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.listinfo()
def listinfo(self):
streamName = self['liste'].getCurrent()[0][0]
streamHandlung = self['liste'].getCurrent()[0][0]
self['name'].setText(streamName)
self['eylem'].setText(streamHandlung)
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyOK(self):
if self.kilitkir:
return None
streamName = None['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
print streamName, url
self.session.open(OTVPlayer, [
(streamName, url)])
def streamData5(self, url):
streamName = self['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
if url:
print url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def parseVideo(self, data):
data = data.replace('\xc5\x9f', 's').replace('&', '&').replace('’', "'").replace('\xc3\xbc', 'u').replace('\xc3\x87', 'C').replace('\xc4\xb1', '\xc4\xb1').replace('–', '-').replace('\xc3\xa7', 'c').replace('\xc3\x96', 'O').replace('\xc5\x9e', 'S').replace('\xc3\xb6', 'o').replace('\xc4\x9f', 'g').replace('\xc4\xb0', 'I').replace('\xe2\x80\x93', '-')
html = html.replace('\\&', '&').replace('240p', 'lowest').replace('360p', 'low').replace('480p', 'sd').replace('760p', 'hd').replace('720p', 'hd').replace('1080p', 'fullhd')
if re.findall('<p><iframe src="(.*?)"', data, re.S):
channels = re.findall('name="flashvars" value="(.*?)"', data)
if channels:
for iframe in channels:
print iframe
self.kilitkir = False
iframe = re.findall('url720=(.*?)\\&', iframe[0])
print iframe
streamUrl = '%s' % iframe[0]
if streamUrl:
print streamUrl
self.session.open(OTVPlayer, [
(channelname, streamUrl)], showPlaylist = False, ltype = 'tvkino')
continue
class vkru(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self.kilitkir = True
self.replace = []
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
if config.orhantv1.premiumize_use.value and config.orhantv1.sp_use_yt_with_proxy.value:
pass
self.useProxy = otv_kuresel.premium_yt_proxy_host
self.favo_path = config.orhantv1.watchlistpath.value + 'mp_yt_favorites.xml'
self.tw_agent_hlp = TwAgentHelper(gzip_decoding = True)
self.playAll = False
self.imageUrl = []
self.url = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPage)
def loadPage(self):
self.kilitkir = True
url = '%s%s' % (self.streamurl, str(self.page))
url = url.replace('[]', '').replace('#038;', '').replace('&', '&')
print 'url=', url
print url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.pageData).addErrback(self.errorload)
def pageData(self, data):
data = data.replace('\\/', '/')
data = data.replace('amp;', '')
channels = re.findall('"url(.*?)":"(.*?)"', data, re.S)
if channels:
for (streamurl, streamName) in channels:
print streamurl, streamName
self.tarzlistesi.append((alfabekodla(streamurl), streamName))
self.kilitkir = False
else:
self.tarzlistesi.append('This site is blocked by VK.com')
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.listinfo()
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def listinfo(self):
self.streamName = self['liste'].getCurrent()[0][0]
self['handlung'].setText(self.streamName)
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyOK(self):
if self.kilitkir:
return None
streamName = None['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
if url:
print url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def parseVideo(self, data):
streamName = self['liste'].getCurrent()[0][0]
print data
self.session.open(OTVPlayer, [
(streamName, data)], showPlaylist = False, ltype = 'tvkino')
def arseVideo(self, html):
showpage = open(data)
soup = BeautifulSoup(showpage)
panel = soup.find('div', {
'encoding': 'UTF-8' })
a = str(panel)
a = a.strip()
channels = re.findall('<source src="(.*?)"', html, re.S)
if channels:
for iframe in channels:
url = '%s' % iframe[0]
if url:
print name, url
self.session.open(Orhantv, name, url)
continue
class picasaweb(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self.kilitkir = True
self.replace = []
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
if config.orhantv1.premiumize_use.value and config.orhantv1.sp_use_yt_with_proxy.value:
pass
self.useProxy = otv_kuresel.premium_yt_proxy_host
self.favo_path = config.orhantv1.watchlistpath.value + 'mp_yt_favorites.xml'
self.tw_agent_hlp = TwAgentHelper(gzip_decoding = True)
self.playAll = False
self.imageUrl = []
self.urls = []
self.url = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPage)
def loadPage(self):
self.kilitkir = True
url = '%s%s' % (self.streamurl, str(self.page))
url = url.replace('[]', '').replace('#038;', '').replace('amp;', '')
print 'url=', url
print url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.pageData).addErrback(self.errorload)
def pageData(self, data):
data = data.replace('\\/', '/').replace('amp;', '')
channels = re.findall("<media:content url='([Değerli Ziyaretci, linki görmeniz icin bu mesaja cevap yazmanız gerekiyorÜye olmak icin burayı tıklayınız])' height='.*?' width='(.*?)' type='video/mpeg4'/>", data, re.S)
if channels:
for (streamName, streamurl) in channels:
print streamurl, streamName
self.tarzlistesi.append((alfabekodla(streamurl), streamName))
self.kilitkir = False
else:
self.tarzlistesi.append('This site is blocked by VK.com')
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.listinfo()
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def listinfo(self):
self.streamName = self['liste'].getCurrent()[0][0]
self['handlung'].setText(self.streamName)
def keyOK(self):
if self.kilitkir:
return None
streamName = None['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
if url:
print url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def parseVideo(self, data):
streamName = self['liste'].getCurrent()[0][0]
print data
self.session.open(OTVPlayer, [
(streamName, data)], showPlaylist = False, ltype = 'tvkino')
def arseVideo(self, html):
channels = re.findall('<source src="(.*?)"', html, re.S)
if channels:
for iframe in channels:
url = '%s' % iframe[0]
if url:
print name, url
self.session.open(Orhantv, name, url)
continue
class mailru(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self.kilitkir = True
self.replace = []
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self['name'] = Label('')
self.kekse = { }
self.channelname = []
self.net = Net()
self.showmsgbox = True
useProxy = config.orhantv1.premiumize_use.value
self.puser = config.orhantv1.premiumize_username.value
self.ppass = config.orhantv1.premiumize_password.value
self.user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko'
self.net.set_user_agent(self.user_agent)
self.playAll = False
self['eylem'] = Label('')
self._getJsonFromAPI = []
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
self.channelnames = []
self._jsonToSortedTab = []
self.url = []
self.stream_not_found = []
self.kekse = []
self.channels = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPa)
def loadPa(self):
self.kilitkir = True
url3 = '%s%s' % (self.streamurl, str(self.page))
url3 = url3.replace('[]', '')
req = urllib2.Request(url3)
resp = urllib2.urlopen(req)
data = resp.read()
cookie = resp.headers.get('Set-Cookie')
video_key = re.findall('video_key=(.*?);', cookie)[0]
self.video_key = video_key
video_key = self.video_key
page = urllibrequest(url3)
url4 = re.findall('"metadataUrl":"(.*?)"', page)[0]
headers = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate, sdch',
'Accept-Language': 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Cookie': '%s ' % cookie[0],
'Host': 'videoapi.my.mail.ru',
'Upgrade-Insecure-Requests': '1e',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36' }
url = urllibrequest(url4)
print url
urla = hexkodla(url)
kir = re.findall('"key":"(.*?)","url":"(.*?)"', urla)
if kir:
for (stream, Name) in kir:
print Name, stream
self.tarzlistesi.append((alfabekodla(stream), Name))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.listinfo()
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def listinfo(self):
self.streamName = self['liste'].getCurrent()[0][0]
self['name'].setText(self.streamName)
self.streamName = self['liste'].getCurrent()[0][0]
self['eylem'].setText(self.streamName)
def keyOK(self):
if self.kilitkir:
return None
headers = None
streamName = self['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1] + '|Cookie: video_key=%s' % self.video_key
print streamName, url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def streamData(self, data):
data = data.replace('%2F', '/').replace('%3A', ':').replace('12=1', '12=2')
streamDaten = re.findall('73=(.*?)&10=(.*?)&11=(.*?)&', data, re.S)
if streamDaten:
(playPath, rtmp, File) = streamDaten[0]
url = '%s/%s live=1 pageUrl=token swfUrl=%s' % (rtmp, File, playPath)
channelname = self['liste'].getCurrent()[0][0]
self.session.open(OTVPlayer, [
(channelname, url)], ltype = 'filmon')
def setExtraHeaders(dictHeaders):
config.mediaplayer.headers.setValue(headersString)
def resetExtraHeaders(self):
config.mediaplayer.extraHeaders.setValue('')
def Cookies2(self, url):
c = ''
for cookie in self.cookiejar:
if cookie.domain_specified and cookie.domain in url:
c += cookie.name + '=' + cookie.value + ';'
continue
if len(c) > 0:
url += '|Cookie=' + urllib.quote(c)
return url
def testPlay(self):
continue
url = [ self.addCookies2Url(x) for x in self['liste'].getCurrent()[0][1] ]
streamName = self['liste'].getCurrent()[0][0]
self.session.open(OTVPlayer, [
(streamName, url[0])])
return zip(url)
def parseVideo(self, data):
streamName = self['liste'].getCurrent()[0][0]
print data
def arseVideo(self, html):
channels = re.findall('<source src="(.*?)"', html, re.S)
if channels:
for iframe in channels:
url = '%s' % iframe[0]
if url:
print name, url
self.session.open(Orhantv, name, url)
continue
class httpvkfix(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self.kilitkir = True
self.replace = []
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
self.imageUrl = []
self.urls = []
self.url = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPage)
def loadPage(self):
self.kilitkir = True
url = '%s%s' % (self.streamurl, str(self.page))
url = url.replace('[]', '')
print url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.pageData).addErrback(self.errorload)
def pageData(self, data):
print data
data = data.replace('.m3u8"', '.m3u8",label:"HLS"')
channels = re.findall('file":"(.*?)".*?label":"(.*?)"', data, re.S)
if channels:
for (streamName, streamurl) in channels:
print streamName, streamurl
self.tarzlistesi.append((alfabekodla(streamurl), streamName))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.listinfo()
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def listinfo(self):
self.streamName = self['liste'].getCurrent()[0][0]
self['name'].setText(self.streamName)
self.streamName = self['liste'].getCurrent()[0][0]
self['handlung'].setText(self.streamName)
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyOK(self):
if self.kilitkir:
return None
streamName = None['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
print streamName, url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def parseVideo(self, data):
data = data.replace('\xc5\x9f', 's').replace('&', '&').replace('’', "'").replace('\xc3\xbc', 'u').replace('\xc3\x87', 'C').replace('\xc4\xb1', '\xc4\xb1').replace('–', '-').replace('\xc3\xa7', 'c').replace('\xc3\x96', 'O').replace('\xc5\x9e', 'S').replace('\xc3\xb6', 'o').replace('\xc4\x9f', 'g').replace('\xc4\xb0', 'I').replace('\xe2\x80\x93', '-')
html = html.replace('\\&', '&').replace('240p', 'lowest').replace('360p', 'low').replace('480p', 'sd').replace('760p', 'hd').replace('720p', 'hd').replace('1080p', 'fullhd')
if re.findall('<p><iframe src="(.*?)"', data, re.S):
channels = re.findall('name="flashvars" value="(.*?)"', data)
if channels:
for iframe in channels:
print iframe
self.kilitkir = False
iframe = re.findall('url720=(.*?)\\&', iframe[0])
print iframe
streamUrl = '%s' % iframe[0]
if streamUrl:
print streamUrl
self.session.open(OTVPlayer, [
(channelname, streamUrl)], showPlaylist = False, ltype = 'tvkino')
continue
class vimeovideo(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self.kilitkir = True
self.replace = []
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
self['eylem'] = Label('')
self.imageUrl = []
self.urls = []
self.url = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPage)
def loadPage(self):
self.kilitkir = True
url = '%s%s' % (self.streamurl, str(self.page))
url = url.replace('[]', '')
print url
info = 'http://www.filmifullizle.org/playerr/jwplayer.js?jwplayer.key=8bjEVGgiMfVhJhIbwaDDOTawGlvwCtWnvZJZZ9X8wF0Md9oWiVOmbHFMHyXHHwRd'
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.pageData).addErrback(self.errorload)
def pageData(self, data):
print data
channels = re.findall('"url":"(.*?)","cdn":".*?","quality":"(.*?)"', data, re.S)
if channels:
for (Name, url) in channels:
print url, Name
self.tarzlistesi.append((alfabekodla(url), Name))
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def listinfo(self):
streamName = self['liste'].getCurrent()[0]
self['eylem'].setText(streamName)
def keyOK(self):
if self.kilitkir:
return None
streamName = None['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
print streamName, url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def streamData5(self, url):
streamName = self['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
if url:
print url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def parseVideo(self, data):
data = data.replace('\xc5\x9f', 's').replace('&', '&').replace('’', "'").replace('\xc3\xbc', 'u').replace('\xc3\x87', 'C').replace('\xc4\xb1', '\xc4\xb1').replace('–', '-').replace('\xc3\xa7', 'c').replace('\xc3\x96', 'O').replace('\xc5\x9e', 'S').replace('\xc3\xb6', 'o').replace('\xc4\x9f', 'g').replace('\xc4\xb0', 'I').replace('\xe2\x80\x93', '-')
html = html.replace('\\&', '&').replace('240p', 'OdL-lowest').replace('360p', 'OdL-low').replace('480p', 'OdL-sd').replace('760p', 'OdL-hd').replace('720p', 'OdL-hd').replace('1080p', 'OdL-fullhd')
if re.findall('<p><iframe src="(.*?)"', data, re.S):
channels = re.findall('name="flashvars" value="(.*?)"', data)
if channels:
for iframe in channels:
print iframe
self.kilitkir = False
iframe = re.findall('url720=(.*?)\\&', iframe[0])
print iframe
streamUrl = '%s' % iframe[0]
if streamUrl:
print streamUrl
self.session.open(OTVPlayer, [
(channelname, streamUrl)], showPlaylist = False, ltype = 'tvkino')
continue
class httpokru(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self.kilitkir = True
self.replace = []
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
self.imageUrl = []
self.urls = []
self.url = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPage)
def loadPage(self):
self.kilitkir = True
url = '%s%s' % (self.streamurl, str(self.page))
url = url.replace('[]', '').replace('|', '%7C')
src = 'http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-50a402d90c8fbb9f'
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.pageData).addErrback(self.errorload)
def pageData(self, data):
channels = re.findall('file:"(.*?)",\xb7label:"(.*?)", type: "mp4"', data, re.S)
if channels:
for (streamName, streamurl) in channels:
print streamurl, streamName
self.tarzlistesi.append((alfabekodla(streamurl), streamName))
self.OTVList.setList(map(Gir, self.tarzlistesi))
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def listinfo(self):
self.streamName = self['liste'].getCurrent()[0][0]
self['name'].setText(self.streamName)
self.streamName = self['liste'].getCurrent()[0][0]
self['handlung'].setText(self.streamName)
def keyOK(self):
if self.kilitkir:
return None
self.streamName = None['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
print streamName, url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def streamData5(self, url):
streamName = self['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
if url:
print url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def parseVideo(self, data):
data = data.replace('\xc5\x9f', 's').replace('&', '&').replace('’', "'").replace('\xc3\xbc', 'u').replace('\xc3\x87', 'C').replace('\xc4\xb1', '\xc4\xb1').replace('–', '-').replace('\xc3\xa7', 'c').replace('\xc3\x96', 'O').replace('\xc5\x9e', 'S').replace('\xc3\xb6', 'o').replace('\xc4\x9f', 'g').replace('\xc4\xb0', 'I').replace('\xe2\x80\x93', '-')
html = html.replace('\\&', '&').replace('240p', 'OdL-lowest').replace('360p', 'OdL-low').replace('480p', 'OdL-sd').replace('760p', 'OdL-hd').replace('720p', 'OdL-hd').replace('1080p', 'OdL-fullhd')
if re.findall('<p><iframe src="(.*?)"', data, re.S):
channels = re.findall('name="flashvars" value="(.*?)"', data)
if channels:
for iframe in channels:
print iframe
self.kilitkir = False
iframe = re.findall('url720=(.*?)\\&', iframe[0])
print iframe
streamUrl = '%s' % iframe[0]
if streamUrl:
print streamUrl
self.session.open(OTVPlayer, [
(channelname, streamUrl)], showPlaylist = False, ltype = 'tvkino')
continue
class dailymotion(OTVScreen, CoverHelper):
def __init__(self, session, streamurl):
Screen.__init__(self, session)
self.streamurl = streamurl
self.plugin_path = otv_kuresel.pluginPath
self.skin_path = otv_kuresel.pluginPath + '/PNG'
path = '%s/%s/kleinScreen.xml' % (self.skin_path, config.orhantv1.skin.value)
if not fileExists(path):
path = self.skin_path + '/yedek/kleinScreen.xml'
with open(path, 'r') as f:
self.skin = f.read()
f.close()
OTVScreen.__init__(self, session)
CoverHelper.__init__(self)
self['actions'] = ActionMap([
'OkCancelActions',
'ShortcutActions',
'WizardActions',
'ColorActions',
'SetupActions',
'NumberActions',
'MenuActions'], {
'ok': self.keyOK,
'cancel': self.keyCancel }, -1)
self['info'] = Label()
self.kilitkir = True
self.replace = []
self.lastpage = 999
self.kilitkir = True
self.tarzlistesi = []
self.kekse = { }
self.channelname = []
if config.orhantv1.premiumize_use.value and config.orhantv1.sp_use_yt_with_proxy.value:
pass
self.useProxy = otv_kuresel.premium_yt_proxy_host
self.favo_path = config.orhantv1.watchlistpath.value + 'mp_yt_favorites.xml'
self.tw_agent_hlp = TwAgentHelper(gzip_decoding = True)
self.playAll = False
self.imageUrl = []
self.urls = []
self.url = []
self.page = []
self.OTVList = MenuList([], enableWrapAround = True, content = eListboxPythonMultiContent)
self.OTVList.l.setFont(0, gFont('orhantv1', 23))
self.OTVList.l.setItemHeight(25)
self['liste'] = self.OTVList
self.new_service = session.nav.getCurrentlyPlayingServiceReference()
self.refNew = self.session.nav.getCurrentlyPlayingServiceReference()
self.onLayoutFinish.append(self.loadPage)
def loadPage(self):
self.kilitkir = True
url = '%s%s' % (self.streamurl, str(self.page))
url = url.replace('[]', '').replace('#038;', '')
print 'url=', url
print url
getPage(url, headers = {
'Content-Type': 'application/x-www-form-urlencoded' }).addCallback(self.pageData).addErrback(self.errorload)
def pageData(self, data):
data = data.replace('\\/', '/')
channels = re.findall(',"(240|380|480|720)":.*?"type":"video\\/mp4","url":"(.*?)"', data, re.S)
if channels:
for (streamurl, streamName) in channels:
print streamurl, streamName
self.tarzlistesi.append((alfabekodla(streamurl), streamName))
self.kilitkir = False
else:
self.tarzlistesi.append('This site is blocked by VK.com')
self.OTVList.setList(map(Gir, self.tarzlistesi))
self.kilitkir = False
self.listinfo()
def errorload(self, error):
print '[streams]:', error
self.stream_not_found()
def keyShowThumb(self):
if self.kilitkir:
return None
None.th_keyShowThumb(self.filmliste, 0, 1, 2, None, None, 1, 1)
def listinfo(self):
self.streamName = self['liste'].getCurrent()[0][0]
self['handlung'].setText(self.streamName)
def keyOK(self):
if self.kilitkir:
return None
streamName = None['liste'].getCurrent()[0][0]
url = self['liste'].getCurrent()[0][1]
if url:
print url
self.session.open(OTVPlayer, [
(streamName, url)], showPlaylist = False, ltype = 'tvkino')
class AADecoder(object):
def __init__(self, aa_encoded_data):
self.encoded_str = aa_encoded_data
def is_aaencoded(self):
if self.encoded_str.find("\xef\xbe\x9f\xcf\x89\xef\xbe\x9f\xef\xbe\x89= /\xef\xbd\x80\xef\xbd\x8d\xc2\xb4\xef\xbc\x89\xef\xbe\x89 ~\xe2\x94\xbb\xe2\x94\x81\xe2\x94\xbb //*\xc2\xb4\xe2\x88\x87\xef\xbd\x80*/ ['_']; o=(\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f) =_=3; c=(\xef\xbe\x9f\xce\x98\xef\xbe\x9f) =(\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f)-(\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f); ") == -1:
return False
if None.encoded_str.find("(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f)[\xef\xbe\x9fo\xef\xbe\x9f]) (\xef\xbe\x9f\xce\x98\xef\xbe\x9f)) ('_');") == -1:
return False
def clean(self):
return re.sub('^\\s+|\\s+$', '', self.encoded_str)
def base_repr(self, number, base = 2, padding = 0):
digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
if base > len(digits):
base = len(digits)
num = abs(number)
res = []
while num:
res.append(digits[num % base])
num //= base
if padding:
res.append('0' * padding)
if number < 0:
res.append('-')
if not res:
pass
return ''.join(reversed('0'))
def decode(self):
self.encoded_str = self.clean()
pattern = '\\(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f\\)\\[\xef\xbe\x9fo\xef\xbe\x9f\\]\\+ (.+?)\\(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f\\)\\[\xef\xbe\x9fo\xef\xbe\x9f\\]\\)'
result = re.search(pattern, self.encoded_str, re.DOTALL)
if result == None:
print 'AADecoder: data not found'
return False
data = None.group(1)
b = [
'(c^_^o)',
'(\xef\xbe\x9f\xce\x98\xef\xbe\x9f)',
'((o^_^o) - (\xef\xbe\x9f\xce\x98\xef\xbe\x9f) +(c^_^o))',
'(o^_^o)',
'(\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f)',
'((\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f) + (\xef\xbe\x9f\xce\x98\xef\xbe\x9f))',
'((o^_^o) +(o^_^o) +(c^_^o))',
'((\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f) + (o^_^o))',
'((\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f) + (\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f))',
'((\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f) + (\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f) + (\xef\xbe\x9f\xce\x98\xef\xbe\x9f))',
'(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f) .\xef\xbe\x9f\xcf\x89\xef\xbe\x9f\xef\xbe\x89',
'(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f) .\xef\xbe\x9f\xce\x98\xef\xbe\x9f\xef\xbe\x89',
"(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f) ['c']",
'(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f) .\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9f\xef\xbe\x89',
'(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f) .\xef\xbe\x9f\xd0\x94\xef\xbe\x9f\xef\xbe\x89',
'(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f) [\xef\xbe\x9f\xce\x98\xef\xbe\x9f]']
begin_char = '(\xef\xbe\x9f\xd0\x94\xef\xbe\x9f)[\xef\xbe\x9f\xce\xb5\xef\xbe\x9f]+'
alt_char = '(o\xef\xbe\x9f\xef\xbd\xb0\xef\xbe\x9fo)+ '
end_char = '+ '
out = ''
while data != '':
if data.find(begin_char) != 0:
print 'AADecoder: data not found'
return False
data = None[len(begin_char):]
enc_char = ''
if data.find(begin_char) == -1:
enc_char = data
data = ''
else:
enc_char = data[:data.find(begin_char)]
data = data[len(enc_char):]
radix = 8
if enc_char.find(alt_char) == 0:
enc_char = enc_char[len(alt_char):]
radix = 16
str_char = ''
while enc_char != '':
for i in range(len(b)):
if enc_char.find(b[i]) == 0:
str_char += self.base_repr(i, radix)
enc_char = enc_char[len(b[i]):]
break
if i == len(b) - 1:
print 'no match in b array: ' + enc_char
return False
enc_char = enc_char[len(end_char):]
if str_char == '':
print 'no match : ' + data
return False
None += chr(int(str_char, radix))
if out == '':
print 'no match : ' + data
return False
return None
def Decompiling(self, baseUrl):
print 'EasyPythonDecompiler Invalid pyc/pyo file!' % baseUrl
def fun1(x):
o = ''
l = len(x)
i = l - 1
while i >= 0:
try:
o += x[i]
except:
pass
i -= 1
return o
def fun2(x):
o = ''
ol = len(x)
l = ol
while ord(x[l / 13]) != 48:
try:
x += x
l += l
continue
continue
i = l - 1
while i >= 0:
try:
o += x[i]
except:
pass
i -= 1
return o[:ol]
def fun3(x, y, a = 1):
o = ''
i = 0
l = len(x)
while i < l:
if i < y:
y += a
y %= 127
o += JS_FromCharCode(ord(x[i]) ^ y)
y += 1
i += 1
return o
(sts, data) = self.cm.getPage(baseUrl)
if not sts:
return []
data = data[data.find('x="') + 2:data.rfind('"') + 1]
dataTab = data.split('+\n')
data = ''
for line in dataTab:
line = line.strip()
if '"' != line[0] or '"' != line[-1]:
raise Exception('EasyPythonDecompiler Invalid pyc/pyo file!')
data += line[1:-1]
def backslashUnEscaped(data):
tmp = ''
idx = 0
while idx < len(data):
if data[idx] == '\\':
tmp += data[idx + 1]
idx += 2
continue
tmp += data[idx]
idx += 1
return tmp
data = backslashUnEscaped(data)
data = data[data.find('f("') + 3:data.rfind('"')]
data = fun1(data)
print data
data = backslashUnEscaped(data)
print data
data = data[data.find('f("') + 3:data.rfind('"')]
print data
data = data.decode('string_escape')
data = fun3(data, 50, 0)
data = backslashUnEscaped(data)
print data
return None
data = data[data.find('f("') + 3:data.rfind('"')]
data = fun2(data)
data = data.decode('string-escape')
data = data[data.find('f("') + 3:data.rfind('"')]
data = fun3(data, 23, 1)
data = backslashUnEscaped(data)
print data
print 'Invalid pyc/pyo file! '
print data
print 'Invalid pyc/pyo file!'
return None
data = fun3(data, 23, 1)
data = backslashUnEscaped(data)
Paylaş