The branch, eden has been updated
via 5bfb44cfd380f1b50795e34a365d148f002d28c7 (commit)
via d1bf33107c399d2c1e5f591208c455e15b70bd54 (commit)
from 7b2a4b5608434f07057e3cf59dcb4a8010d8d0bc (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=5bfb44cfd380f1b50795e34a365d148f002d28c7
commit 5bfb44cfd380f1b50795e34a365d148f002d28c7
Author: unknown <[email protected]>
Date: Tue Aug 14 08:43:26 2012 +0200
[plugin.video.manoto] -v0.0.3
diff --git a/plugin.video.manoto/addon.xml b/plugin.video.manoto/addon.xml
index ce6f04e..7130f9c 100644
--- a/plugin.video.manoto/addon.xml
+++ b/plugin.video.manoto/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.manoto"
name="Manoto TV"
- version="0.0.2"
+ version="0.0.3"
provider-name="babak">
<requires>
<import addon="xbmc.python" version="2.0"/>
diff --git a/plugin.video.manoto/default.py b/plugin.video.manoto/default.py
index 83898ce..5f42069 100644
--- a/plugin.video.manoto/default.py
+++ b/plugin.video.manoto/default.py
@@ -4,128 +4,119 @@ from BeautifulSoup import BeautifulSoup
addon = xbmcaddon.Addon('plugin.video.manoto')
profile = xbmc.translatePath(addon.getAddonInfo('profile'))
-
-__settings__ = xbmcaddon.Addon(id='plugin.video.manoto')
+
+__settings__ = xbmcaddon.Addon(id='plugin.video.manoto')
__language__ = __settings__.getLocalizedString
-
+
home = __settings__.getAddonInfo('path')
icon = xbmc.translatePath(os.path.join(home, 'icon.png'))
-
+
if (__settings__.getSetting('username') == "") or
(__settings__.getSetting('password') == ""):
xbmc.executebuiltin("XBMC.Notification(" +
__settings__.getAddonInfo('name') + "," + __language__(30000) +
",10000,"+icon+")")
- __settings__.openSettings()
-
-cj = cookielib.CookieJar()
+ __settings__.openSettings()
+
+cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
-
-domain = 'www.manoto1.com'
-
-# Thanks to micahg!
-def getStreamsFromPlayList(playlist):
- """
- Get the streams from the playlist
-
- @param playlist: The playlist URI
- """
- # create the request
- req = urllib2.Request(playlist)
-
- # request the games
- try:
- resp = urllib2.urlopen(req)
- except urllib2.URLError, ue:
- print("URL error trying to open playlist")
- return None
- except urllib2.HTTPError, he:
- print("HTTP error trying to open playlist")
- return None
-
- # store the base URI from the playlist
- prefix=playlist[0:string.rfind(playlist,'/') + 1]
- lines = string.split(resp.read(), '\n')
-
- # parse the playlist file
- streams = {}
- bandwidth = ""
- for line in lines:
-
- # skip the first line
- if line == "#EXTM3U":
- continue
-
- # is this a description or a playlist
- idx = string.find(line, "BANDWIDTH=")
- if idx > -1:
- # handle the description
- bandwidth = line[idx + 10:len(line)].strip()
- elif len(line) > 0 and len(bandwidth) > 0:
- # add the playlist
- streams[bandwidth] = (prefix + line).strip()
-
- return streams
-
-
-def loginAndParse():
- url = 'http://' + domain + '/live'
-
- if not cj:
- resp = opener.open(url)
- html_data = resp.read()
-
- parsedJS =
re.findall(r"setCookie\('(.*?)'\s*,\s*'(.*?)'\s*,\s*(.*?)\);", html_data)
-
- ck = cookielib.Cookie(version=0, name=parsedJS[0][0],
value=parsedJS[0][1], port=None, port_specified=False, domain=domain,
domain_specified=False, domain_initial_dot=False, path='/',
path_specified=True, secure=False, expires=None, discard=True, comment=None,
comment_url=None, rest={'HttpOnly': None}, rfc2109=False)
- cj.set_cookie(ck)
-
- resp = opener.open(url)
- html_data = resp.read()
-
- soup = BeautifulSoup(html_data)
- eventVal = soup.find('input',id='__EVENTVALIDATION',type='hidden')
- viewState = soup.find('input',id='__VIEWSTATE',type='hidden')
-
+
+domain = 'www.manoto1.com'
+
+# Thanks to micahg!
+def getStreamsFromPlayList(playlist):
+ """
+ Get the streams from the playlist
+
+ @param playlist: The playlist URI
+ """
+ # create the request
+ req = urllib2.Request(playlist)
+
+ # request the games
+ try:
+ resp = urllib2.urlopen(req)
+ except urllib2.URLError, ue:
+ print("URL error trying to open playlist")
+ return None
+ except urllib2.HTTPError, he:
+ print("HTTP error trying to open playlist")
+ return None
+
+ # store the base URI from the playlist
+ prefix=playlist[0:string.rfind(playlist,'/') + 1]
+ lines = string.split(resp.read(), '\n')
+
+ # parse the playlist file
+ streams = {}
+ bandwidth = ""
+ for line in lines:
+
+ # skip the first line
+ if line == "#EXTM3U":
+ continue
+
+ # is this a description or a playlist
+ idx = string.find(line, "BANDWIDTH=")
+ if idx > -1:
+ # handle the description
+ bandwidth = line[idx + 10:len(line)].strip()
+ elif len(line) > 0 and len(bandwidth) > 0:
+ # add the playlist
+ streams[bandwidth] = (prefix + line).strip()
+
+ return streams
+
+
+def loginAndParse():
+ url = 'http://' + domain + '/live'
+
+ resp = opener.open(url)
+ html_data = resp.read()
+
+ soup = BeautifulSoup(html_data)
+ eventVal = soup.find('input',id='__EVENTVALIDATION',type='hidden')
+ viewState = soup.find('input',id='__VIEWSTATE',type='hidden')
+
params =
'__EVENTARGUMENT=&__EVENTTARGET=ctl00%%24ContentPlaceHolderMainContent%%24lbtnEnter&__EVENTVALIDATION=%s&__VIEWSTATE=%s&ctl00%%24ContentPlaceHolderMainContent%%24txtUsername=%s&ctl00%%24ContentPlaceHolderMainContent%%24txtPassword=%s'
% (urllib.quote(eventVal['value']), urllib.quote(viewState['value']),
urllib.quote(__settings__.getSetting('username')),
urllib.quote(__settings__.getSetting('password')))
-
- resp = opener.open('http://www.manoto1.com/LiveStream.aspx', params)
-
- resp = opener.open(url)
- html_data = resp.read()
-
- soup = BeautifulSoup(html_data)
- stream = soup.find('source', type='video/mp4');
-
- if stream is None or stream['src'] is None:
- return False
-
- streams = getStreamsFromPlayList(stream['src'])
-
- if streams == None:
- xbmcplugin.endOfDirectory(handle=int(sys.argv[1]))
- return False
-
- bitrates = []
- for k in streams.keys():
- bitrates.append(int(k))
- bitrates.sort()
- bitrates.reverse()
-
- for bitrate in bitrates:
- stream_id = str(bitrate)
- title = str(int(bitrate) / int(1000)) + " Kbps"
- li = xbmcgui.ListItem(title)
- li.setInfo( type="Video", infoLabels={"Title" : title})
- li.setThumbnailImage(icon)
- xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),
- url=streams[stream_id],
- listitem=li,
- isFolder=False)
-
- xbmcplugin.endOfDirectory(handle=int(sys.argv[1]))
-
- return True
-
-while not loginAndParse():
- xbmc.executebuiltin("XBMC.Notification(" +
__settings__.getAddonInfo('name') + "," + __language__(30001) +
",10000,"+icon+")")
- __settings__.openSettings()
+
+ resp = opener.open('http://www.manoto1.com/LiveStream.aspx', params)
+
+ resp = opener.open(url)
+ html_data = resp.read()
+
+ soup = BeautifulSoup(html_data)
+ stream = soup.find('source', type='video/mp4');
+
+ if stream is None or stream['src'] is None:
+ return False
+
+ streams = getStreamsFromPlayList(stream['src'])
+
+ if streams == None:
+ xbmcplugin.endOfDirectory(handle=int(sys.argv[1]))
+ return False
+
+ bitrates = []
+ for k in streams.keys():
+ bitrates.append(int(k))
+ bitrates.sort()
+ bitrates.reverse()
+
+ for bitrate in bitrates:
+ stream_id = str(bitrate)
+ title = str(int(bitrate) / int(1000)) + " Kbps"
+ li = xbmcgui.ListItem(title)
+ li.setInfo( type="Video", infoLabels={"Title" : title})
+ li.setThumbnailImage(icon)
+ xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),
+ url=streams[stream_id],
+ listitem=li,
+ isFolder=False)
+
+ xbmcplugin.endOfDirectory(handle=int(sys.argv[1]))
+
+ return True
+
+while not loginAndParse():
+ xbmc.executebuiltin("XBMC.Notification(" +
__settings__.getAddonInfo('name') + "," + __language__(30001) +
",10000,"+icon+")")
+ __settings__.openSettings()
diff --git a/plugin.video.manoto/resources/settings.xml
b/plugin.video.manoto/resources/settings.xml
index 2df430d..0126633 100644
--- a/plugin.video.manoto/resources/settings.xml
+++ b/plugin.video.manoto/resources/settings.xml
@@ -1,4 +1,4 @@
<settings>
- <setting id="username" type="text" label="30011" default=""/>
- <setting id="password" type="text" label="30012" default=""/>
-</settings>
+ <setting id="username" type="text" label="30011" default=""/>
+ <setting id="password" type="text" label="30012" default=""/>
+</settings>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=d1bf33107c399d2c1e5f591208c455e15b70bd54
commit d1bf33107c399d2c1e5f591208c455e15b70bd54
Author: unknown <[email protected]>
Date: Tue Aug 14 08:40:25 2012 +0200
[plugin.video.4players] -v1.1.5
diff --git a/plugin.video.4players/addon.xml b/plugin.video.4players/addon.xml
index 191b0a6..e36f1c3 100644
--- a/plugin.video.4players/addon.xml
+++ b/plugin.video.4players/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.4players" name="4Players Videos" version="1.1.4"
provider-name="Tristan Fischer ([email protected])">
+<addon id="plugin.video.4players" name="4Players Videos" version="1.1.5"
provider-name="Tristan Fischer ([email protected])">
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="script.module.beautifulsoup" version="3.0.8"/>
diff --git a/plugin.video.4players/changelog.txt
b/plugin.video.4players/changelog.txt
index b187d4c..91e1b56 100644
--- a/plugin.video.4players/changelog.txt
+++ b/plugin.video.4players/changelog.txt
@@ -1,3 +1,6 @@
+1.1.5
+ Fixed Playback (website changes)
+
1.1.4
Fixed Categories
Removed deprecated Categories
diff --git a/plugin.video.4players/resources/lib/scraper.py
b/plugin.video.4players/resources/lib/scraper.py
index dedb6fd..8fdf4d9 100644
--- a/plugin.video.4players/resources/lib/scraper.py
+++ b/plugin.video.4players/resources/lib/scraper.py
@@ -110,7 +110,7 @@ def __getAjaxContent(url, data_dict=None):
def getVideoFile(page_url):
video_page = URL_PREFIX + page_url + '.html'
html = __getAjaxContent(video_page)
- r = '<video src="(?P<url>[^"]+)"'
+ r =
'https://login.4players.de/flash/jw5/player.swf\?file=(?P<url>.+?)&'
m = re.search(r, html)
url = m.groupdict()['url']
return url
-----------------------------------------------------------------------
Summary of changes:
plugin.video.4players/addon.xml | 2 +-
plugin.video.4players/changelog.txt | 3 +
plugin.video.4players/resources/lib/scraper.py | 2 +-
plugin.video.manoto/addon.xml | 2 +-
plugin.video.manoto/default.py | 223 +++++++++++------------
plugin.video.manoto/resources/settings.xml | 6 +-
6 files changed, 116 insertions(+), 122 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons