LSP Regex & Makelist Discussion.

thingy

Member
May 9, 2018
80
1
8
could you help me with this code
Code:
<item>
<title>[CANAL 6] [COLOR lime][/COLOR] </title>
<inputstream>$doregex[getUrl]|User-Agent=iPad&amp;Referer=https://www.repretel.com/</inputstream>
<thumbnail></thumbnail>
<regex>
<name>getUrl</name>
  <expres><![CDATA[#$pyFunction
def GetLSProData(page_data, Cookie_Jar,m):
  import re, requests, time
  def rsk(s):
    def decrypt(v1, v2):
      lv2 = len(v2)
      sv2 = list(v2)
      for i in range(lv2-1, -1, -1):
        t1 = i * v1 % lv2
        t2 = sv2[i]
        sv2[i] = sv2[t1]
        sv2[t1] = t2
      s1 = ''.join(sv2)
      s2 = s1[0:lv2 - 2] if s1[lv2 - 2:lv2] == 'OK' else None
      return s2
    tval = int(time.time()/3600)
    t = decrypt(tval, s) or decrypt(tval-1, s)
    return t
  hdr = {'User-Agent': 'iPad'}
  surl = re.findall(r"var\s*LIVE_URL\s*=\s*'([^']+)", page_data)[0]
  key = re.findall(r"3600000\),'([^']+)", page_data)[0]
  turl = re.findall(r"jQuery\.get\('([^']+)", page_data)[0]
  turl += rsk(key)
  token = requests.get(turl, headers=hdr).json()['token']
  surl += '?iut={}'.format(token)
  return surl
]]></expres>
<page>https://www.repretel.com/envivo-canal6/</page>
</regex>
<thumbnail>http://television.en.cr/files/2011/10/6.png</thumbnail>
<fanart>https://www.dropbox.com/s/ebipdmr3enwltl3/CANCR.jpeg?dl=1</fanart>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
This is a simple code

LSP XML:
<item>
<title> [COLOR lime][CANAL 6][/COLOR] </title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get('https://www.repretel.com/envivo-canal6/',headers={'user-agent':'Mozilla/5.0','referer':'https://www.repretel.com/envivo-canal6/','accept':'*/*'},verify=False).text.replace('\\','')
  strurl=re.findall('var\s*LIVE_URL.+?[\'"]([^\'"]+)',source)[0]
  return '%s|user-agent=ipad&origin=https://www.repretel.com&referer=https://www.repretel.com/'%strurl
]]></expres>
<page></page>
</regex>
<thumbnail>http://television.en.cr/files/2011/10/6.png</thumbnail>
<fanart>https://www.dropbox.com/s/ebipdmr3enwltl3/CANCR.jpeg?dl=1</fanart>
</item>
 

Oxus

New member
Jul 24, 2014
20
2
3
Hi,
Is any way to play acestream link with script.module.horus on kodi 19.x with the help of LSP?
Horus play a encoded link like this:
Code:
plugin://script.module.horus/?eydhY3Rpb24nOiAncGxheScsICdmYW5hcnQnOiAnRDpcXGsxNy42XFwxOS4zXFxBcHBcXHBvcnRhYmxlX2RhdGFcXGFkZG9uc1xcc2NyaXB0Lm1vZHVsZS5ob3J1c1xcZmFuYXJ0LmpwZycsICdpY29uJzogJ0Q6XFxrMTcuNlxcMTkuM1xcQXBwXFxwb3J0YWJsZV9kYXRhXFxhZGRvbnNcXHNjcmlwdC5tb2R1bGUuaG9ydXNcXGljb24ucG5nJywgJ2lkJzogJzBkMzRkYmJkMGIzMTFkYjRmMDEwMmJmY2Y3NzI1ZjY5ODRkZjVlMjgnLCAnbGFiZWwnOiAnT3B0aW9uIDE6IDBkMzRkYmJkMGIzMTFkYjRmMDEwMmJmY2Y3NzI1ZjY5ODRkZjVlMjgnfQ
is base64 encoded.
Decoded is like this:
Code:
plugin://script.module.horus/?{'action': 'play', 'fanart': 'LOACALPATH\\script.module.horus\\fanart.jpg', 'icon': 'LOCALPATH\\script.module.horus\\icon.png', 'id': '0d34dbbd0b311db4f0102bfcf7725f6984df5e28', 'label': 'Option 1: 0d34dbbd0b311db4f0102bfcf7725f6984df5e28'}
Thank you!
 

gujal

Developer
Dec 26, 2013
590
326
63
LSP is not a player, all it does is pass the link to Kodi player, so yes, you can put the plugin:// url directly in <link></link> and it will work if you have script module and ace engine installed.
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
Like @gujal said. It will playing fine if the acestream ID is playable. The code should like this

LSP XML:
<item>
<title> ESPN USA - FOX Sport HD 1</title>
<link>plugin://script.module.horus/?eydhY3Rpb24nOiAncGxheScsICdmYW5hcnQnOiAnQzpcXFVzZXJzXFxPRU1cXEFwcERhdGFcXFJvYW1pbmdcXEtvZGlcXGFkZG9uc1xcc2NyaXB0Lm1vZHVsZS5ob3J1c1xcZmFuYXJ0LmpwZycsICdpY29uJzogJ0M6XFxVc2Vyc1xcT0VNXFxBcHBEYXRhXFxSb2FtaW5nXFxLb2RpXFxhZGRvbnNcXHNjcmlwdC5tb2R1bGUuaG9ydXNcXGljb24ucG5nJywgJ2lkJzogJzZmNTRmYTg2MWFlNzVmMGZiNmM5YjI1ZWM4NjE0YzNkN2JhMmRhNzAnLCAnbGFiZWwnOiAnRVNQTiBVU0EnfQ==</link>
<link>plugin://script.module.horus/?eydhY3Rpb24nOiAncGxheScsICdmYW5hcnQnOiAnQzpcXFVzZXJzXFxPRU1cXEFwcERhdGFcXFJvYW1pbmdcXEtvZGlcXGFkZG9uc1xcc2NyaXB0Lm1vZHVsZS5ob3J1c1xcZmFuYXJ0LmpwZycsICdpY29uJzogJ0M6XFxVc2Vyc1xcT0VNXFxBcHBEYXRhXFxSb2FtaW5nXFxLb2RpXFxhZGRvbnNcXHNjcmlwdC5tb2R1bGUuaG9ydXNcXGljb24ucG5nJywgJ2lkJzogJzI0NTY0YTQ2YmRmMmY4MTZiY2FiYTRlZjIzNzFmZDJhYjNiMGEwNjcnLCAnbGFiZWwnOiAnRk9YIFNwb3J0IEhEIDEnfQ==</link>
</item>


 
  • Like
Reactions: Oxus

Oxus

New member
Jul 24, 2014
20
2
3
Thank you for your replay!
Is any way to start with acestream link (this kind of links: 0d34dbbd0b311db4f0102bfcf7725f6984df5e28 ) and encode with LSP help to have a playable link like this?
Code:
plugin://script.module.horus/?eydhY3Rpb24nOiAncGxheScsICdmYW5hcnQnOiAnRDpcXGsxNy42XFwxOS4zXFxBcHBcXHBvcnRhYmxlX2RhdGFcXGFkZG9uc1xcc2NyaXB0Lm1vZHVsZS5ob3J1c1xcZmFuYXJ0LmpwZycsICdpY29uJzogJ0Q6XFxrMTcuNlxcMTkuM1xcQXBwXFxwb3J0YWJsZV9kYXRhXFxhZGRvbnNcXHNjcmlwdC5tb2R1bGUuaG9ydXNcXGljb24ucG5nJywgJ2lkJzogJzBkMzRkYmJkMGIzMTFkYjRmMDEwMmJmY2Y3NzI1ZjY5ODRkZjVlMjgnLCAnbGFiZWwnOiAnT3B0aW9uIDE6IDBkMzRkYmJkMGIzMTFkYjRmMDEwMmJmY2Y3NzI1ZjY5ODRkZjVlMjgnfQ
Thank you!
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
Make sure do not use LOACALPATH, use C:\\Users\\OEM\\AppData\\Roaming\\Kodi..... instead

LSP XML:
{'action': 'play', 'fanart': 'C:\\Users\\OEM\\AppData\\Roaming\\Kodi\\addons\\script.module.horus\\fanart.jpg', 'icon': 'C:\\Users\\OEM\\AppData\\Roaming\\Kodi\\addons\\script.module.horus\\icon.png', 'id': '0d34dbbd0b311db4f0102bfcf7725f6984df5e28', 'label': 'HBO'}
LSP XML:
<item>
<title>HBO</title>
<link>plugin://script.module.horus/?eydhY3Rpb24nOiAncGxheScsICdmYW5hcnQnOiAnQzpcXFVzZXJzXFxPRU1cXEFwcERhdGFcXFJvYW1pbmdcXEtvZGlcXGFkZG9uc1xcc2NyaXB0Lm1vZHVsZS5ob3J1c1xcZmFuYXJ0LmpwZycsICdpY29uJzogJ0M6XFxVc2Vyc1xcT0VNXFxBcHBEYXRhXFxSb2FtaW5nXFxLb2RpXFxhZGRvbnNcXHNjcmlwdC5tb2R1bGUuaG9ydXNcXGljb24ucG5nJywgJ2lkJzogJzBkMzRkYmJkMGIzMTFkYjRmMDEwMmJmY2Y3NzI1ZjY5ODRkZjVlMjgnLCAnbGFiZWwnOiAnSEJPJ30=</link>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
Or you can use %APPDATA% to hide your profile

LSP XML:
{'action': 'play', 'fanart': '%APPDATA%\\Kodi\\Roaming\\Kodi\\addons\\script.module.horus\\fanart.jpg', 'icon': '%APPDATA%\\Kodi\\Roaming\\Kodi\\addons\\script.module.horus\\icon.png', 'id': '0d34dbbd0b311db4f0102bfcf7725f6984df5e28', 'label': 'HBO'}
 

gujal

Developer
Dec 26, 2013
590
326
63
You mean like this?
LSP XML:
<item>
<title>HBO</title>
<thumbnail></thumbnail>
<link>plugin://script.module.horus/?$doregex[get-code]</link>
<regex>
<name>get-code</name>
<expres>$pyFunction:base64.b64encode("{'action': 'play', 'fanart': '', 'icon': '', 'id': '0d34dbbd0b311db4f0102bfcf7725f6984df5e28', 'label': 'HBO'}".encode('utf-8')).decode('utf-8')</expres>
<page></page>
</regex>
</item>
 

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
Can i a help for this & tk!
Code:
https://api.uztv.tv/v1/channels/163fdfbb-90ac-46a9-85aa-303707a6f33b/stream.json?expand%5Bstream%5D=analytics&protocol=dash&video_codec=h264&audio_codec=mp4a&drm=widevine&client_id=0b47f1fb-e8e7-4a39-bfc9-e0ee028a3d72&client_version=1.19.2&device_token=589a8ef2-147e-43be-8f0c-fa60795b2dcf&locale=en_US&screen_height=2208&screen_width=1242&timezone=25200
Source:
Code:
https://uztv.tv/channels/kinoteatr-uz
 

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
@streamwatcher2013 I see code of @m5Germany working a month ago and no need Client_ID
Code:
<item>
<title>Kinoteatr.uz</title>
  <inputstream>$doregex[getURL]</inputstream>
    <regex>
      <name>getURL</name>
      <expres>url":"([^"]+).+p</expres>
      <page><![CDATA[https://api.uztv.tv/v1/channels/163fdfbb-90ac-46a9-85aa-303707a6f33b/stream.json?expand%5Bstream%5D=analytics&protocol=dash&video_codec=h264&audio_codec=mp4a&drm=widevine&client_id=0b47f1fb-e8e7-4a39-bfc9-e0ee028a3d72&client_version=1.19.2&device_token=589a8ef2-147e-43be-8f0c-fa60795b2dcf&locale=en_US&screen_height=2208&screen_width=1242&timezone=25200]]></page>
      <connection>keep-alive</connection>
      <agent>Mozilla/5.0</agent>
      <accept>application/json</accept>
      <referer>https://uztv.tv/</referer>
    </regex>
</item>
But now it's not working,seems this channel is drm,need license drm.Can you or @m5Germany or @gujal fix it?
 

nkt9911

Member
May 22, 2021
39
0
6
USA
Hi guys can i get help a site & thanks!
Code:
https://tasix.online/tv/13605-sport-uzbekistan.html
 

gujal

Developer
Dec 26, 2013
590
326
63
Enjoy!

LSP XML:
<item>
<title>Sport Uzbekistan</title>
<thumbnail></thumbnail>
<link>$doregex[get-url]|User-Agent=iPad</link>
<regex>
<name>get-url</name>
<expres>$pyFunction:'$doregex[get-embed]'.replace('%26', '&amp;')</expres>
<page></page>
</regex>
<regex>
<name>get-embed</name>
<expres>iframe\s*id.+?src=".+?=([^\s]+)</expres>
<page>https://tasix.online/tv/13605-sport-uzbekistan.html</page>
<referer>https://tasix.online/</referer>
<x-req>XMLHttpRequest</x-req>
</regex>
</item>
 

adriansyafiq

Member
Jan 3, 2016
35
2
8
hi experts.
need help for this.
Thanks in advanced!

Code:
https://livedomplayer.lalalalalori.workers.dev/player?c=9125fbd1c6cd4c93b01387201878f063
 

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
I need help for this & tk.
Code:
https://www.ortn.ne/tele-sahel/
 

gujal

Developer
Dec 26, 2013
590
326
63
Enjoy!

LSP XML:
<item>
<title>Tele Sahel</title>
<thumbnail></thumbnail>
<link>$doregex[get-url]?$doregex[get-token]|User-Agent=iPad</link>
<regex>
<name>get-token</name>
<expres>(.*)</expres>
<page>$doregex[get-turl]</page>
<referer>https://www.ortn.ne/</referer>
<origin>https://www.ortn.ne</origin>
</regex>
<regex>
<name>get-turl</name>
<expres>token:\s*"([^"]+)</expres>
<page>https://libs.easybroadcast.io/ortn/eb.telesahel.min.js</page>
<referer>https://www.ortn.ne/</referer>
</regex>
<regex>
<name>get-url</name>
<expres>src:\s*"([^"]+)</expres>
<page>https://libs.easybroadcast.io/ortn/eb.telesahel.min.js</page>
<referer>https://www.ortn.ne/</referer>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

gladio

New member
Oct 14, 2018
24
3
3
[CODICE][/ICO ]
ho bisogno di aiuto per questo...grazie:
https://www.stream4free.live/nrj-12
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
Whole site makelist and NRL-12. Simple code
LSP XML:
<item>
<title>https://www.stream4free.live/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[makelist.param3]</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>https://www.stream4free.live[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  list=re.findall('"image-title">TV.SHOW(?s)(.*?)href=..forum',page_data)[0]
  return re.findall('itemprop=.url.+?href=./(?!tv-|All\s*Chan|LIVE\s*TV)([^\'"]+).+?src=.([^\'"]+).+?alt=.([^\'"]+)',list)
]]></expres>
<page>https://www.stream4free.live/</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get('https://www.stream4free.live/[makelist.param1]',headers={'user-agent':'Mozilla/5.0','referer':'https://www.stream4free.live/','accept':'*/*'}).text.replace('\\','')
  return re.findall('(?s)<video.+?src=.([^\'"]+)',source)[0]+'|user-agent=ipad&referer=https://www.stream4free.live/'
]]></expres>
<page>https://www.stream4free.live/[makelist.param1]</page>
</regex>
</item>


<item>
<title>nrj-12</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get('https://www.stream4free.live/nrj-12',headers={'user-agent':'Mozilla/5.0','referer':'https://www.stream4free.live/','accept':'*/*'}).text.replace('\\','')
  return re.findall('(?s)<video.+?src=.([^\'"]+)',source)[0]+'|user-agent=ipad&referer=https://www.stream4free.live/'
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: gladio

vbprofi

Member
Feb 9, 2016
87
3
8
Hello experts,
today I have try £$π 3.0.0~alpha4. If I choose a xml file I get this errors.

content of LogFile:
Code:
2021-11-22 08:34:48.502 T:3876    INFO <general>: [plugin.video.live.streamspro-3.0.0~alpha4]: Mode: None
2021-11-22 08:34:48.502 T:3876    INFO <general>: [plugin.video.live.streamspro-3.0.0~alpha4]: Name: None
2021-11-22 08:34:48.502 T:3876    INFO <general>: [plugin.video.live.streamspro-3.0.0~alpha4]: getSources
2021-11-22 08:34:48.509 T:3876    ERROR <general>: Traceback (most recent call last):
                                                  
2021-11-22 08:34:48.510 T:3876    ERROR <general>: 
2021-11-22 08:34:48.510 T:3876    ERROR <general>:  File "C:\kodi\portable_data\addons\plugin.video.live.streamspro\default.py", line 165, in getSources
                                                      getData(sources[0]['url'], sources[0]['fanart'])
                                                  
2021-11-22 08:34:48.510 T:3876    ERROR <general>: 
2021-11-22 08:34:48.510 T:3876    ERROR <general>:  File "C:\kodi\portable_data\addons\plugin.video.live.streamspro\default.py", line 465, in getData
                                                      parse_m3u(soup)
                                                  
2021-11-22 08:34:48.510 T:3876    ERROR <general>: 
2021-11-22 08:34:48.510 T:3876    ERROR <general>:  File "C:\kodi\portable_data\addons\plugin.video.live.streamspro\default.py", line 471, in parse_m3u
                                                      content = data.rstrip()
                                                  
2021-11-22 08:34:48.510 T:3876    ERROR <general>: 
2021-11-22 08:34:48.510 T:3876    ERROR <general>: AttributeError: 'NoneType' object has no attribute 'rstrip'
                                                  
2021-11-22 08:34:48.510 T:3876    ERROR <general>: 
2021-11-22 08:34:48.510 T:3876    INFO <general>: CPythonInvoker(30, C:\kodi\portable_data\addons\plugin.video.live.streamspro\default.py): script successfully
run
2021-11-22 08:34:48.641 T:3876    INFO <general>: Python interpreter stopped
content of source_file:
Code:
[{"title": "test", "url": "C:\\kodi\\portable_data\\userdata\\addon_data\\plugin.video.live.streamspro\\items_example.xml", "fanart": "C:\\kodi\\portable_data\\addons\\plugin.video.live.streamspro\\fanart.jpg"}]
items_example.xml is from folder resources/examples.
in £$π 2.x this is working well.
have someone an idea?
 

gujal

Developer
Dec 26, 2013
590
326
63
The source you have shown is neither an XML nor an m3u but a JSON file. As far as I see ther is no support for parsing JSON in LSP2, so It wont work in LSP3
 

vbprofi

Member
Feb 9, 2016
87
3
8
in LSP 2.x the source_file, which is a JSON file, still works. in it I target to an XML file that is on a server. This no longer works in LSP 3. How can I integrate XML files in LSP 3?
 

vbprofi

Member
Feb 9, 2016
87
3
8
I found the problem. the JSON file (source_file) is not the problem. The XML file is not parsed properly. For example, there may be no & in the <title></title> tags.
In LSP 2x that wasn't a problem. also that the item tag must now be enclosed with <items> </items> is new ....
 

arslion84

New member
Dec 31, 2015
8
0
1
Hi Gurus

Please help to fix , this dont works more??

XML:
<item>
<title>https://www.trt1.com.tr/tv/diziler</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param2] [COLOR dodgerblue] ([makelist.param4])[/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>https://www.trt1.com.tr[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  source=re.findall('class="nav\s*navbar-nav">(?s)(.*?)<footer',page_data)[0]
  return re.findall('(?s)"img-responsive"\s*src="([^"]+)"\s*alt="([^"]+).+?href="([^"]+).+?"date-title">([^<]+)',source)
]]></expres>
<page>https://www.trt1.com.tr/tv/diziler</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist2.param1] Bölüm[/COLOR]</title>
  <urlsolve>https://www.youtube.com/watch?v=$doregex[getUrl]</urlsolve>
  <thumbnail>https://www.trt1.com.tr/[makelist2.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get('https://www.trt1.com.tr[makelist.param3]',headers={'user-agent':'','referer':'https://www.trt1.com.tr/tv/diziler','accept':'*/*'}).content
  eps1='https://www.trt1.com.tr/'+re.findall('id="bolumler">[\w\W]+?(diziler/.+?)\d+',source)[0]+'1-bolum'
  source=requests.get(eps1,headers={'user-agent':'','host':'www.trt1.com.tr','accept':'*/*'}).content
  data=re.findall('</title>(?s)(.*?)class="detail-content">',source)[0]
  epsID=sorted(re.findall('(?:"og:url"\s*content|href).+?bolum/(\d+)',data), key=int)
  link=re.findall('(?:"og:url"\s*content|href).+?((?:arsiv|diziler).+bolum/[^"]+)',data)
  thumb=re.findall('(?:"og:image"\s*content|<img\s*src).+?(public/dm_videolar[^"]+)',data)
  return zip(epsID,thumb,link)
]]></expres>
<page></page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  return re.findall('src=".+?youtube.com/embed/([^\?]+)',page_data)[0]
]]></expres>
<page>https://www.trt1.com.tr/[makelist2.param3]</page>
</regex>
<thumbnail>https://i4.hurimg.com/i/hurriyet/75/0x0/5ca312430f2544169477997c.jpg</thumbnail>
</item>
thanks in Advance
 

undpnd tqucbo

Member
Jan 25, 2021
158
2
18
Can you help me for thid & tk!
Code:
https://rutube.ru/play/embed/10351051
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
Try this:


LSP XML:
<item>
<title>THT Music</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  source=requests.get('https://rutube.ru/api/play/options/10351051/?no_404=true&referer=https://rutube.ru',headers={'user-agent':'Mozilla/5.0','referer':'https://rutube.ru/play/embed/10351051','accept':'*/*'}).text
  return re.findall('"hls".+?"url":(?:\s*|)"([^"]+)',source)[0]+'|user-agent=ipad&origin=https://rutube.ru&referer=https://rutube.ru/'
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

m5Germany

Active member
Mar 20, 2014
327
105
43
Curious, with this pared down version. Does Code work for you?
Secondly, When do I need to add UA, Origin, Referer, etc to the Code?
Is there a "Rule of Thumb\Standard" or is it contingent on the stream?
LSP3 XML:
<item>
<title>THT Music</title>
<link>$doregex[m5]</link>
<regex>
<name>m5</name>
<expres>l.{4}([^"]+)"}</expres>
<page>http://rutube.ru/api/play/options/10351051/?no_404=true&amp;referer=http://rutube.ru</page>
</regex>
</item>
 
  • Like
Reactions: undpnd tqucbo

m5Germany

Active member
Mar 20, 2014
327
105
43
Huh - pause- I must be having a brain fart. I get an Error when using <urlsolve> Code.

From Log: (truncated)

script.module.resolveurl v5.1.51 installed

INFO <general>: initializing python engine.
ERROR <general>: ResolveURL: ResolverError Error - From: rutube.ru Link: https://rutube.ru/play/embed/10351051: No playable video found.
ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'resolveurl.resolver.ResolverError'>
Error Contents: No playable video found.

No clue. Do I need to install something else in/for 19.3? Didn't have a problem w/ older versions.
 

m5Germany

Active member
Mar 20, 2014
327
105
43
Truncated Log:
FindAddons: script.module.resolveurl v5.1.51 installed
FindAddons: script.module.urlresolver v7.0.00 installed

Copied rutube.py from resolveurl plugins folder to urlresolver plugins folder.

Same Error Message. Oh well

Uninstalled urlresolver v7.0.00 and tried to reinstall same.

From: h ttp://fusion.tvaddons.co/kodi-scripts/
script.module.resolveurl-5.1.50.zip
script.module.urlresolver-7.0.00.zip

Now I get an Error while trying to install urlresolver v7.0.00 that failed due to invalid structure.
 

gujal

Developer
Dec 26, 2013
590
326
63
@m5Germany You do not have to install urlresolver unless any other addon that you have uses it.
ResolveURL is used by many addons and is enough if you install that one for LSP. And yes rutube livestream support was added in 5.1.52 and will probably be added into urlresolver in the coming weeks
 

boomski2

Member
Aug 19, 2019
45
1
8
anyone has this site regex?

Code:
http://p2pstreams.live/soccer-streams/
 

m5Germany

Active member
Mar 20, 2014
327
105
43
LSP3 XML:
<item>
<title>[COLOR=FF00FFFF]Soccer Games [/COLOR][COLOR=red]|[/COLOR][COLOR=FF00CCFF] p2pstreams.live [/COLOR][COLOR=FF006680]active 10 min before Event[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR=FF00FFFF][makelist.param3] [/COLOR][COLOR=red]|[/COLOR][COLOR=FF00CCFF] [makelist.param2][/COLOR]</title>
  <link>$doregex[m5]|User-Agent=Mozilla/5.0&amp;Accept=*/*&amp;Origin=http://nbazones.com&amp;Referer=http://nbazones.com/</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):# time adjust by streamwatcher2013
  gtime=re.findall('class.+?\d\s*(\d+:\d+)',page_data)
  for t in gtime:
    localtime = int(t[:-3]) - 10  # Eastern Time Zone 'adjust time zone by changing 10 up or down - not perfect'
    if localtime > 24:
       localtime -= 24
    if localtime < 1:
       localtime += 24
    lctime = str(localtime)+t[2:]
    lctime = lctime.zfill(5)   #  insure the var time is 5 spaces by adding leading zero
    page_data=page_data.replace(t, lctime)
  return re.findall('class="takos"[\w\W]*?.*?href="([^"]+)[\w\W]*?.*?class.+?\d">([^<]+)[\w\W]*?.*?(\d+:\d+)',page_data)
]]></expres>
<page>http://p2pstreams.live/soccer-streams/</page>
</regex>
<regex>
<name>m5</name>
<expres>file:\s*'([^']+)</expres>
<page>$doregex[m4]|Upgrade-Insecure-Requests=1</page> # m4 gets http://nbazones.com/embed/ch**.php
<referer>http://p2pstreams.live/</referer>
<cookiejar>$doregex[getCookie]</cookiejar>
</regex>
<regex>
<name>m4</name>
<expres>iframe\s*src="([^"]+)</expres>
<page>$doregex[m3]|Upgrade-Insecure-Requests=1</page> # m3 gets http://p2pstreams.live/e01/***.php?site=p2p
<referer>http://p2pstreams.live/</referer>
<cookiejar>$doregex[getCookie]</cookiejar>
</regex>
<regex>
<name>m3</name>
<expres>item"\s*src="([^"]+)</expres>
<page>[makelist.param1]|Upgrade-Insecure-Requests=1</page> # gets http://p2pstreams.live/stream-feed-*/
<referer>http://p2pstreams.live/</referer>
<cookiejar>$doregex[getCookie]</cookiejar>
</regex>
<regex>
<name>getCookie</name>
<expres />
<page>http://p2pstreams.live/|Upgrade-Insecure-Requests=1</page> # getCookie learned from Gujal
<cookiejar />
</regex>
</item>
 

tpoupi

Member
Jan 2, 2016
38
0
6

m5Germany

Active member
Mar 20, 2014
327
105
43
Not sure Url can be RegEx'd without 'Personal APIKey' (which You have to setup/initiate w/ youtube)
Personally/Presently, I only use links which I can extract the value (ie: L5Ppr0JvPws) Less chance of api problems.
The longer and or ones which contain '- or _ ' seem to request the api.
LSP3 XML:
<item>
<title>Africa24</title>
<fanart>https://ohcbrands.com/wp-content/uploads/2018/05/black-background.jpg</fanart>
<thumbnail>https://www.monpetitforfait.com/comparateur-box-internet/wp-content/uploads/2020/04/Etnium-Africa-24.png.webp</thumbnail>
<utube>L5Ppr0JvPws</utube>
</item>
 

m5Germany

Active member
Mar 20, 2014
327
105
43
Here's and Old (May 30, 2018) mp4 Reference: #589
Does anyone have the time to Update this? Rhetorical question.
Actually, knowing to click the 'Insert' (3 dots followed by a down arrow) graphic might not be readily knowledgeable.
LSP3 XML:
<item>
<title>CODE TAG Video</title>
<link>$doregex[CODE TAG Video]</link>
<regex>
<name>CODE TAG Video</name>
<expres>file:\s*'([^']+).*\n.*?mp4</expres>
<page><![CDATA[https://screencast-o-matic.com/embed?sc=cFhvYFbM6A&v=5&ff=1]]></page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
985
443
63
USA
@m5Germany

In the source it has 3 times with "file:". With me I will go with "sources:" because with regex101 it only 1 match.

LSP XML:
https://regex101.com/r/tunw16/1
the 1st "file:" after "sources:" start with "rtmp://". You don't want to capture it, so it should be the 2nd "file:" which start with "https://"

LSP XML:
https://regex101.com/r/MvbStv/1

https://d3v55qvjb2v012.cloudfront.net/QV3C/2018/05/30/20/18/cFhvYFbM6A/sc.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kM3Y1NXF2amIydjAxMi5jbG91ZGZyb250Lm5ldC9RVjNDLzIwMTgvMDUvMzAvMjAvMTgvY0ZodllGYk02QS9zYy5tcDQiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2MzgyODQ1OTZ9fX1dfQ__&Signature=Xs-AraLQzsScPF8bQZrPfU1wV8WddvXGv4Obp7idKQ5a19b08IzeQcEf9-ftyCQ-~jn1YuU6uORXGPK5i7Qv9OUwIdntM6lAvRmhXo3z3o9E13VrtG-CMA6-d~xEhgj4d~QuiYeyBuVK0ah~NdZ-vy3o01yYPjlaLJmv0FrxGxs_&Key-Pair-Id=APKAI4E2RN57D46ONMEQ
 

m5Germany

Active member
Mar 20, 2014
327
105
43
Was only asking if a video/instruction was/is/could be available to Members to learn how to place request for Code in proper tags.
We use to not answer request if proper protocol was followed. Have we relaxed those standards. Some make inadvertent mistakes,
including myself which I did recently. Others seem to not understand/comply.
When I looked at Code there was multiple results. I thought I reduced capture to 1 result.
Additionally, I'm not to keen with using regex101 as I prefer myregextester.
For me - it works better - I can submit http for it to do it's purpose.

 
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5