The branch, eden has been updated
       via  e07afef67d6b429435ee25e2c3d2967796eef892 (commit)
      from  9a84ba75e78b5f4d22301b8ac0fae979493f4538 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=e07afef67d6b429435ee25e2c3d2967796eef892

commit e07afef67d6b429435ee25e2c3d2967796eef892
Author: beenje <[email protected]>
Date:   Thu Nov 21 21:35:18 2013 +0100

    [plugin.video.sarpur] updated to version 2.0.2

diff --git a/plugin.video.sarpur/addon.xml b/plugin.video.sarpur/addon.xml
index e937243..9ed7d89 100755
--- a/plugin.video.sarpur/addon.xml
+++ b/plugin.video.sarpur/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.sarpur"
        name="Sarpur"
-       version="2.0.1"
+       version="2.0.2"
        provider-name="Dagur">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
diff --git a/plugin.video.sarpur/changelog.txt 
b/plugin.video.sarpur/changelog.txt
index 9a9a1ba..8feed72 100644
--- a/plugin.video.sarpur/changelog.txt
+++ b/plugin.video.sarpur/changelog.txt
@@ -1,3 +1,6 @@
+[B]Version 2.0.2[/B]
+- Changed scraper because of changed urls
+
 [B]Version 2.0.1[/B]
 - Changed ip-address for live feed
 
diff --git a/plugin.video.sarpur/default.py b/plugin.video.sarpur/default.py
index ed5b3fa..c57ec54 100755
--- a/plugin.video.sarpur/default.py
+++ b/plugin.video.sarpur/default.py
@@ -64,7 +64,7 @@ def spila(url):
     #rtmp_url = "rtmp://178.19.48.74/ruvvod?key=93292"
     item = xbmcgui.ListItem("RTL")
     item.setProperty("PlayPath", stream_info['playpath'])
-    item.setProperty("SWFPlayer", "http://www.ruv.is/files/spilari/player.swf";)
+    item.setProperty("SWFPlayer", stream_info['swfplayer'])  
#"http://www.ruv.is/files/spilari/player.swf";)
     item.setProperty("PageURL", url)
     xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(stream_info['rtmp_url'], item)
 
@@ -74,9 +74,9 @@ def spila_hladvarp(url):
 def spila_live(stod):
     stream_info = {}
     #if stod == 'ruv':
-    #stream_info['playpath'] = 
'http://194.144.162.36:1935/ruv/beint-2/playlist.m3u8?key=%d' % 
int(math.floor(random.random() * 9999)) 
+    stream_info['rtmp_url'] = 
'http://sip-live.hds.adaptive.level3.net/hls-live/ruv-ruv/_definst_/live/stream1.m3u8'
     stream_info['playpath'] = 'beint-2' 
-    stream_info['rtmp_url'] = 'rtmp://212.30.206.129/ruv?key=%d' % 
int(math.floor(random.random() * 9999))
+    #stream_info['rtmp_url'] = 'rtmp://212.30.206.129/ruv?key=%d' % 
int(math.floor(random.random() * 9999))
     stream_info['page_url'] = 'http://ruv.is/ruv'
 
     item = xbmcgui.ListItem("RTL")
diff --git a/plugin.video.sarpur/scraper.py b/plugin.video.sarpur/scraper.py
index c0f9890..55c2216 100755
--- a/plugin.video.sarpur/scraper.py
+++ b/plugin.video.sarpur/scraper.py
@@ -92,15 +92,24 @@ def get_latest_episodes(url):
 def get_stream_info(page_url):
     "Get a page url and finds the url of the rtmp stream"
     html = fetch_page(page_url)
+    soup = BeautifulSoup(html)
+
+    params = soup.findAll('param', limit=2 )
+    swfplayer = 'http://ruv.is%s' % params[0]['value']
+    details = params[1]['value']
+
+    playpath = re.search('streamer=(.*?)&(file=.*?)&stre', details).group(2)
+    rtmp_url = re.search('http.*?m3u8', html).group()
 
-    access_point_hyperlink = re.search('"http://load.cache.is.*?";', 
html).group()[1:-1]
-    javascript = fetch_page(access_point_hyperlink)
-    access_point = re.search('"(.*?)"', javascript).group(1)
-    path = re.search('ruv(vod)?\?key=\d+', html).group()
-    rtmp_url = "rtmp://%s/%s" % (access_point, path)
-    playpath = re.findall("\'file\': \'(.*?)\'", html)[-1] #.group(1)
+    if 'tengipunktur' in rtmp_url:
+        access_point_hyperlink = re.search('"http://load.cache.is.*?";', 
html).group()[1:-1]
+        javascript = fetch_page(access_point_hyperlink)
+        access_point = re.search('"(.*?)"', javascript).group(1)
+        print access_point
+        rtmp_url = rtmp_url.replace("' + tengipunktur + '", access_point)
 
-    return {'playpath': playpath, 'rtmp_url': rtmp_url}
+    print rtmp_url
+    return {'playpath': playpath, 'rtmp_url': rtmp_url, 'swfplayer': swfplayer}
 
 def update_index():
     "Update the data file with the show list"

-----------------------------------------------------------------------

Summary of changes:
 plugin.video.sarpur/addon.xml     |    2 +-
 plugin.video.sarpur/changelog.txt |    3 +++
 plugin.video.sarpur/default.py    |    6 +++---
 plugin.video.sarpur/scraper.py    |   23 ++++++++++++++++-------
 4 files changed, 23 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to