Skip to content

Commit

Permalink
New site added and new hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-alpha committed May 28, 2017
1 parent 949b3f6 commit 3bb5176
Show file tree
Hide file tree
Showing 18 changed files with 1,040 additions and 54 deletions.
2 changes: 2 additions & 0 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import desirulez
import desitvbox
import desitashan
import yodesi

PREFIX = common.PREFIX
NAME = common.NAME
Expand All @@ -31,6 +32,7 @@ def Start():
@handler(PREFIX, NAME, art=ART, thumb=ICON)
def MainMenu():
oc = ObjectContainer()
oc.add(DirectoryObject(key=Callback(yodesi.ChannelsMenu, url=yodesi.SITEURL), title=yodesi.SITETITLE, thumb=R(yodesi.SITETHUMB)))
oc.add(DirectoryObject(key=Callback(desitvbox.ChannelsMenu, url=desitvbox.SITEURL), title=desitvbox.SITETITLE, thumb=R(desitvbox.SITETHUMB)))
oc.add(DirectoryObject(key=Callback(desitashan.ChannelsMenu, url=desitashan.SITEURL), title=desitashan.SITETITLE, thumb=R(desitashan.SITETHUMB)))
oc.add(DirectoryObject(key=Callback(desirulez.TypeMenu, url=desirulez.SITEURL), title=desirulez.SITETITLE, thumb=R(desirulez.SITETHUMB)))
Expand Down
8 changes: 4 additions & 4 deletions Contents/Code/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
TITLE = L('Title')
VERSION = '0.06' # Release notation (x.y - where x is major and y is minor)
VERSION = '0.07' # Release notation (x.y - where x is major and y is minor)
GITHUB_REPOSITORY = 'coder-alpha/DesiTelly.bundle'
PREFIX = "/video/desitelly"
################################################################################
Expand Down Expand Up @@ -86,9 +86,9 @@
#DesiTashan
TV_NEWS = 'TV News'

VALID_SOURCES_DOMAIN = ['dailymotion.','playwire.','vidshare.','openload.','playu.', 'cloudy.', 'vmg.','watchvideo','tvlogy']
VALID_SOURCES = ['Dailymotion','Flash Player','Flash','Playwire','Letwatch','Openload','PlayU','StreamHD','HDStream','Watchvideo','TvLogy']
VALID_SOURCES_ICONS = ['dailymotion','playwire','playwire','playwire','letwatchus','openload','playu','vmg','vmg','source-watchvideo','tvlogy']
VALID_SOURCES_DOMAIN = ['dailymotion.','playwire.','vidshare.','openload.','playu.', 'cloudy.', 'vmg.','watchvideo','tvlogy','google','mediatv.','vidwatch3.','speedwatch.us','tune.pk']
VALID_SOURCES = ['Dailymotion','Flash Player','Flash','Playwire','Letwatch','Openload','PlayU','StreamHD','HDStream','Watchvideo','TvLogy','Google','VidWatch','Vid Watch','SpeedWatch','Speed','TunePK','Tune']
VALID_SOURCES_ICONS = ['dailymotion','playwire','playwire','playwire','letwatchus','openload','playu','vmg','vmg','source-watchvideo','tvlogy','google','vidwatch','vidwatch','speedwatch','speedwatch','tunepk','tunepk']

####################################################################################################

Expand Down
20 changes: 17 additions & 3 deletions Contents/Code/common_fnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ def GetTvURLSource(url, referer, date='', key=None):
elif len(html.xpath("//iframe[contains(@src,'openload.')]/@src")) > 0:
#Log('openload')
url = html.xpath("//iframe[contains(@src,'openload.co')]/@src")[0]
elif len(html.xpath("//iframe[contains(@src,'tune.')]/@src")) > 0:
#Log('tune')
url = html.xpath("//iframe[contains(@src,'tune.')]/@src")[0]
html = HTML.ElementFromURL(url=url, headers={'Referer': url})
url = html.xpath("//iframe[contains(@src,'tune.')]/@src")[0]
else:
#Log('Undefined src')
orig_url = url
Expand Down Expand Up @@ -179,11 +184,17 @@ def GetTvURLSource(url, referer, date='', key=None):
except:
pass

#Log(url)
if Prefs["use_debug"]:
Log("common_fnc.GetTvURLSource : %s" % url)

if url.startswith('//'):
url = 'http:' + url

url = CheckURLSource(url=url, referer=referer, key=key, string=string, html=html)

if Prefs["use_debug"]:
Log("Post CheckURLSource")
Log("common_fnc.GetTvURLSource : %s" % url)

return url

Expand All @@ -193,8 +204,6 @@ def CheckURLSource(url, referer, key=None, string=None, html=None, stringMatch=F
if string == None:
string = HTTP.Request(url=url, headers={'Referer': referer}).content

#Log('string: ' + string)

try:
if string.find('dailymotion.com') != -1:
#Log('dailymotion')
Expand All @@ -206,6 +215,11 @@ def CheckURLSource(url, referer, key=None, string=None, html=None, stringMatch=F
page = HTTP.Request(url, headers={'Referer': referer}).content
if 'Content removed' in page or 'Content rejected' in page or 'This video got removed' in page or 'ERROR' in page:
url = 'disabled'
elif string.find('tune.') != -1:
#Log('tune')
page = HTTP.Request(url, headers={'Referer': referer}).content
if 'Content removed' in page or 'Content rejected' in page or 'this video has been deactivated' in page or 'ERROR' in page:
url = 'disabled'
elif string.find('vidshare.') != -1:
#Log('vidshare')
try:
Expand Down
3 changes: 1 addition & 2 deletions Contents/Code/desitashan.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def ChannelsMenu(url):
# Channel title
channel = item.xpath("text()")[0]
# Log("Channel = "+channel)
# Log("item "+ etree.tostring(item, pretty_print=True))
# Channel link
link = item.xpath("@href")[0]
if link.startswith("http") == False:
Expand Down Expand Up @@ -118,7 +117,7 @@ def EpisodesMenu(url, title):

# Add the found item to the collection
if 'Watch'.lower() in episode.lower():
episode = episode.replace(' Video Watch...','')
episode = episode.replace(' Video Watch...','').replace(' Video Watch','')
oc.add(PopupDirectoryObject(key=Callback(PlayerLinksMenu, url=link, title=episode, type=L('Tv')), title=episode))

# Find the total number of pages
Expand Down
Loading

0 comments on commit 3bb5176

Please sign in to comment.