LSP Regex & Makelist Discussion.

Doom

Member
Sep 16, 2019
155
20
18
@streamwatcher2013 Saw your post on how follow a source, this one has jsunpack.unpack & wmsAuthSign... tried using the code for the jsunkpack.unpack from another post but won't work, is it because missing the wmsAuthSign?
hxxp://www.dubsstreamz.com/ufc.php
 

gujal

Developer
Dec 26, 2013
383
164
43
Enjoy!

LSP XML:
<item>
<title>**http://www.dubsstreamz.com/ufc.php**</title>
<link>$doregex[getURL]|User-Agent=iPad&amp;Referer=http://www.dubsstreamz.com/</link>
<regex>
<name>getURL</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  items = re.findall(r'=\s*(\[[^;]+)', page_data)[0]
  items = re.findall(r'"(.+?)"', items)
  subitem = int(re.findall(r'atob.+?-\s*(\d+)', page_data)[0])
  srp = ''
  for item in items:
    srp += chr(int(re.sub(r'[^\d]', '', item.decode('base64'))) - subitem)
  link = re.findall(r"source:\s*'([^']+)", srp)[0]
  return link
]]></expres>
<page>http://www.dubsstreamz.com/ufc.php</page>
</regex>
</item>
 
  • Like
Reactions: Doom and peterpan

manoflorida

New member
Sep 22, 2012
8
0
1
hello, can someone help me to get this https://rotana*net/live/ it's geoblock on usa how to make it work on vlc? or kodi? thank you
 

peterpan

Active member
Jul 7, 2013
103
73
28
@manoflorida US or no US only 4 links are working right now and they seem to rotate them!

Code:
USA
https://rotana.hibridmedia.com/rotana/kids_dabr/rotana/kids_720p/playlist.m3u8

Need Proxy or VPN
https://rotana.hibridmedia.com/rotana/comedy_dabr/rotana/comedy_720p/playlist.m3u8
https://rotana.hibridmedia.com/rotana/drama_dabr/rotana/drama_720p/playlist.m3u8
https://rotana.hibridmedia.com/rotana/cinema_dabr/rotana/cinema_720p/playlist.m3u8

How to use Proxy with VLC
https://superuser.com/questions/52806/how-can-i-use-autoproxy-configuration-in-vlc-media-player
 
  • Like
Reactions: manoflorida

tungbeng95

Member
Oct 25, 2018
181
7
18
hxxps://www.maspero.eg/wps/portal/home/tv/channels/first-channel
I need help this.
 

peterpan

Active member
Jul 7, 2013
103
73
28
Simple RegEx...
XML:
<item>
<title>MPT SAT **http://play.mrt.com.mk/live/45**</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<thumbnail>http://vod-c57w.interspace.com/t/1/chn/45/poster-ln-1.png</thumbnail>
<regex>
<name>getUrl</name>
<expres>x-mpegURL","src":"(.*?)"</expres>
<page>http://play.mrt.com.mk/live/45</page>
<agent>iPad</agent>
</regex>
</item>
 
  • Like
Reactions: tungbeng95

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
Try this:

LSP XML code:
<item>
<title>First Channel</title>
<inputstream>$doregex[getUrl]|referer=https://www.maspero.eg/wps/portal</inputstream>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  clink,cname=re.findall('livestream-header[\w\W]*?iframe\s*src="(.+player.+?=(.*?)&[^"]+)',page_data)[0]
  source=requests.get('https://www.maspero.eg/player/LivePlayer/Channel-main-amp.js',headers={'user-agent':'Mozilla/5.0','referer':'https://www.maspero.eg/player%s'%clink,'accept':'*/*'},cookies=Cookie_Jar).content
  link=re.findall('url:\s*[\'"]([^\'"]+).\s*\+',source)[0]+cname
  source=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://www.maspero.eg/player%s'%clink,'accept':'*/*'},cookies=Cookie_Jar).content
  return re.findall('"([^"]+)',source)[0]
]]></expres>
<page>https://www.maspero.eg/wps/portal/home/tv/channels/first-channel</page>
</regex>
<thumbnail>https://www.maspero.eg/assets/img/tv_channels/tv_channel_5.jpg</thumbnail>
</item>
 

peterpan

Active member
Jul 7, 2013
103
73
28
@tungbeng95 Not sure how long it'll last..., but some of the gurus in here can come up with better code :)
XML:
<item>
<title>1st Channel</title>
<inputstream>https://msertupoc.streaming.mediaservices.windows.net/fc0fbd15-f6da-4035-a0bc-8308a2ae9403/1d2692f6-e590-4a21-996c-68ed2b055df1.ism/manifest</inputstream>
</item>
 
  • Like
Reactions: tungbeng95

C-3PO

New member
Nov 5, 2015
5
0
1
Hi guys

Is this page possible?

Code:
hxxps://sports24.club/tv/v?id=espnbr
 

makal

Member
Jul 23, 2014
56
11
8
Enjoy!!
Code:
<item>
<title>espnbr</title>
<link>$doregex[getUrl]|User-Agent=iPad&amp;Referer=https://sports24.club/tv/v?id=espnbr</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
   return 'https:'+re.findall("atob\('(.*?)'", page_data)[0].decode('base64')
]]></expres>
<page>https://sports24.club/tv/v?id=espnbr</page>
<referer>https://sports24.club/tv/</referer>
</regex>
</item>
 
  • Like
Reactions: peterpan and C-3PO

dantas1990

New member
Apr 10, 2020
29
1
3
Good night.
How do I show the options that I can choose from which channel to want? For example, I used these codes in the list

<item>
<title> </title>
<link> $ name = HD OP1 </link>
<link> $ name = HD OP2 </link>
</item>

When I joined KODI, I wanted the options to appear, according to my list. I noticed that I have to configure it in def play_playlist, what do I have to do actually, something else I have to do?
 
  • Like
Reactions: tungbeng95

kavan

Member
Aug 14, 2016
61
5
8
Code:
<item>
<title>HD OP</title>
<link>http://############.m3u8$$lsname=HD OP1$$lsname=</link>
<link>http://############.m3u8$$lsname=HD OP2$$lsname=</link>
<link>http://############.m3u8$$lsname=HD OP3$$lsname=</link>
<thumbnail></thumbnail>
<fanart></fanart>
</item>
 
  • Like
Reactions: dantas1990

dantas1990

New member
Apr 10, 2020
29
1
3
Thank you for your attention. You did not understand.
I mean, what code do I put in the base file (default.py)?
Finding out that one is on the def play_playlist, what do I have to add?
 

TRC4

New member
Mar 6, 2016
12
2
3
Netherland
hello,
someone regex for one of these
link hxxps://vudeo.net/tq4ugj9k1pjb.html
embed hxxps://vudeo.net/embed-tq4ugj9k1pjb.html
json_stream hxxps://vudeo.net/api/file/direct_link?key=288myhy7yphuz40e6pv&file_code=tq4ugj9k1pjb
 

peterpan

Active member
Jul 7, 2013
103
73
28
Here you go...

XML:
<item>
<title>**https://vudeo.net/tq4ugj9k1pjb.html**</title>
<link>$doregex[getUrl]|user-agent=iPad</link>
<regex>
<name>getUrl</name>
<expres>sources: \["(.*?)"</expres>
<page>https://vudeo.net/tq4ugj9k1pjb.html</page>
<agent>iPad</agent>
</regex>
</item>
 

tungbeng95

Member
Oct 25, 2018
181
7
18
hxxps://replay.lsm.lv/lv/tiesraide/visiem/
Please help me this final.Many thanks😊
 

TRC4

New member
Mar 6, 2016
12
2
3
Netherland
Hello, Website is Protected With Cloudflare Protection

PHP Name Lativ_X_RAY_SSL_Options.php

I created a php for you extract m3u + hash but does not play, if anyone can help on the forum
problem is in redirect
example: m3u in php is (no live links)
(no live links)
as u see [m3u8h=] that on browser only, [Not authorized.]
KODI LOGS
2020-07-05 01:31:24.352 T:4336 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for(no live links)
2020-07-05 01:31:24.353 T:3632 NOTICE: Creating InputStream
2020-07-05 01:31:24.761 T:3632 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 410
2020-07-05 01:31:24.761 T:3632 ERROR: CCurlFile::Open failed with code 410 for (no live links)

I do not know why

PHP CODE

Code:
<?php
/* KODI XML
<item> <!-- MANUAL TITLES -->
<title>[B][COLOR lime]Lativ Cloudflare Protection[/COLOR][/B]</title>
<thumbnail></thumbnail>
<fanart></fanart>
<link>$doregex[get_stream]|User-Agent=Mozilla/5.0&amp;Referer=https://eeeeed.latnet.media/ltv/9/</link>
<regex>
<name>get_stream</name>
<expres><![CDATA[(.+?.*)]]></expres>
<page>http://localhost/Lativ_X_RAY_SSL_Options.php</page>
<Connection>keep-alive</Connection>
<Origin>https://eeeeed.latnet.media</Origin>
<Host>00fe00.latnet.media</Host>
<Access-Control-Allow-Origin>*</Access-Control-Allow-Origin>
<User-Agent>Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36</User-Agent>
</regex>
</item>
*/

error_reporting(E_ALL);
/*
Website is Protected With Cloudflare Protection
RSS
https://ltv.lsm.lv/lv/rss/

CHANNELS
https://eeeeed.latnet.media/ltv/1/
https://eeeeed.latnet.media/ltv/7/
https://eeeeed.latnet.media/ltv/9/
*/
$channel = "7"; // <== CHANGE CHANNEL HERE

$url = 'https://eeeeed.latnet.media/ltv/'.$channel;
$get_hash = 'https://ff0000.latnet.media/sl2';

function get_data($url){

    $headers[]  = "User-Agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36";
    $headers[]  = "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9";
    $headers[]  = "Accept-Language:en-us,en;q=0.5";
    $headers[]  = "Accept-Encoding:gzip,deflate";
    $headers[]  = "Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.7";
    $headers[]  = "Keep-Alive:115";
    $headers[]  = "Content-Type: application/json'";
    $headers[]  = "Referer: https://eeeeed.latnet.media'";
    $headers[]  = "Connection:keep-alive";
    $headers[]  = "Cache-Control:max-age=0";
    $headers[]  = "Access-Control-Allow-Origin:*";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_ENCODING, "gzip");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_COOKIEFILE, ".cookies.txt");
    curl_setopt($ch, CURLOPT_COOKIEJAR, ".cookies.txt");
    curl_setopt($ch, CURLOPT_VERBOSE, true);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
   
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    $result = curl_exec($ch);
    curl_close($ch);

    return $result;

    if (!$result = curl_exec($ch))
    {
        return FALSE;
    }

    curl_close($ch);
    return $result;

}

$host = get_data($url);
$hash_data = get_data($get_hash);
if (!$host) die("Could not Read Stream From $url");

preg_match_all("/hls: '(.*?)'/",$host, $matches, PREG_PATTERN_ORDER);
$stream = $matches[1][0];
preg_match_all("/(.+?.*)/",$hash_data, $hash_matches, PREG_PATTERN_ORDER);
$read_hash = ($hash_matches[1][0]);

$test_direct = "https://00ff00.latnet.media/ltv9/chunklist_b1128000_sllv.m3u8"."?h=";
// echo $test_direct.$read_hash;
// echo $stream;

$complete_stream = $stream.$read_hash;
echo $complete_stream;
?>
 
Last edited by a moderator:
  • Like
Reactions: tungbeng95

tungbeng95

Member
Oct 25, 2018
181
7
18
Yes.This link (no live links) only working on safari browser iPhone,iPad.Others do not working for me.I'm tested :)
 
Last edited by a moderator:

TRC4

New member
Mar 6, 2016
12
2
3
Netherland
@peterpan
i've tried this method and many methods but it does not work, i think it has to do with cookies
in php working prefect as raw code in kodi nope, i do not know why.

03:59:30 T:3536 WARNING: CDVDMessageQueue(player)::put MSGQ_NOT_INITIALIZED
03:59:30 T:3464 NOTICE: Creating InputStream
03:59:30 T:3464 ERROR: XFILE::CFileCache::Open - failed to open source <|user-agent=iPad>
03:59:30 T:3464 ERROR: CDVDPlayer::OpenInputStream - error opening [|user-agent=iPad]
03:59:30 T:3464 NOTICE: CDVDPlayer::OnExit()
03:59:30 T:3536 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.live.streamspro/?url=$doregex[getUrl]|user-agent=iPad&mode=17&regexs={u'getUrl': {'expres': u'sources: \\["(.*?)"', 'name': u'getUrl', 'agent': u'iPad', 'page': u'https://vudeo.net/tq4ugj9k1pjb.html'}}]
03:59:30 T:3536 NOTICE: CDVDPlayer::CloseFile()
03:59:30 T:3536 NOTICE: DVDPlayer: waiting for threads to exit
03:59:30 T:3536 NOTICE: DVDPlayer: finished waiting
03:59:30 T:3536 NOTICE: CDVDPlayer::CloseFile()
03:59:30 T:3536 NOTICE: DVDPlayer: waiting for threads to exit
 

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
@TRC4

Eventually It is static link. So it will play by itself without changed. And it has nothing to do with UA. I tested with all 3 links you gave and it is working fine either in Kodi version 17.x or 18.x
Try this:

LSP XML Code:
<item>
<title>Stone Sour - Bother (static link)</title>
<link>https://s0.vudeo.net/2vp35j3gyqvjdohilparrjmfykw3iopcsdo3w5jy7eegbsva525bhjzlsatq/v.mp4</link>
</item>

<item>
<title>Stone Sour - Bother</title>
<link>$doregex[mp4]</link>
<regex>
<name>mp4</name>
<expres><![CDATA[player[\w\W]*?(?:sources|src|file):.+?[\'"]([^\'"]+)]]></expres>
<page>https://vudeo.net/tq4ugj9k1pjb.html</page>
</regex>
</item>

<item>
<title>Stone Sour - Bother (with embed)</title>
<link>$doregex[mp4]</link>
<regex>
<name>mp4</name>
<expres><![CDATA[player[\w\W]*?(?:sources|src|file):.+?[\'"]([^\'"]+)]]></expres>
<page>https://vudeo.net/embed-tq4ugj9k1pjb.html</page>
</regex>
</item>

<item>
<title>Stone Sour - Bother (with json)</title>
<link>$doregex[mp4]</link>
<regex>
<name>mp4</name>
<expres><![CDATA[#$pyFunction
import requests
def GetLSProData(page_data,Cookie_Jar,m):
  return requests.get('https://vudeo.net/api/file/direct_link?key=288myhy7yphuz40e6pv&file_code=tq4ugj9k1pjb').json()['result']['n']['url']
]]></expres>
<page></page>
</regex>
</item>
 

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
Happy 4th of July to all.
 
  • Like
Reactions: makal

dantas1990

New member
Apr 10, 2020
29
1
3
For you too.
I need your help please.
I added several links to an item in my list, that is, multilinks.
I wanted it to appear in the kodi, when I clicked it appeared to select option, but it doesn't appear which way do I have to do it?


if '$nome=' in i:
d_name=i.split('$nome=')[1].split('&regexs')[0]
names.append(d_name)
mu_playlist[iloop]=i.split('$nome=')[0]+('&regexs'+i.split('&regexs')[1] if '&regexs' in i else '')
index = dialog.select('[COLOR white] SELECIONE UMA OPÇÃO[/COLOR]', names)
 

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
@dantas1990

Sorry m8. I don't know exactly what you want to do. Is it your own addons? or LSP mod version? With LSP you can make your custom definition module within the regex and call it out. You don't have to mod the default.py. The LSP already support multiple links at result like @kavan posted at above in xml file.
 

TRC4

New member
Mar 6, 2016
12
2
3
Netherland
@streamwatcher2013 yes you are right, I had tried all the ways but I had installed kodi 16, impressed me that in php it works even in xml no, i have ch kodi ver from 16 to 18 and work prefect, THANK YOU DUDE!!!
 

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
You re welcome dude. Your log shows inputstream module which doesn't have on Kodi 16 and previous . Yeah php is completely different environment, as long as html code then php should work doesn't matter what.
 

urualf

Member
Jan 19, 2016
32
0
6
hello please need regex for this playlist ,i have one regex but no more work in lsp thanks for you help

hxxps://www.youtube.com/playlist?list=PL-4I35YERBxJhLTnvA3KmI4lIDScs1CTT
 

streamwatcher2013

Well-known member
Oct 24, 2013
734
275
63
USA
Try this:

LSP XML Code:
<item>
<title>Solamente vos - Capítulos </title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold] [makelist.param1][/COLOR]</title>
  <urlsolve>https://www.youtube.com/watch?v=[makelist.param2]</urlsolve>
  <thumbnail>https://i.ytimg.com/vi/[makelist.param2]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
  if '"pl-load-more-destination' in page_data:
     lists=re.findall('id="pl-load-more-destination">(?s)(.*?)</tbody',page_data)[0].replace('amp;','').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
     YTid=re.findall('data-video-id="(.*?)"',lists)
     title=re.findall('data-title="(.*?)"',lists)
     return zip(title,YTid)
  else:
     lists=re.findall('window."ytInitialData"(?s)(.*?)window."ytInitialPlayerResponse',page_data)[0].replace('amp;','').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
     title=re.findall('views"}},"simpleText":"(\w[^"]+)',lists)
     YTid=re.findall('"playlistVideoRenderer":{"videoId":"([^"]+)',lists)
     return zip(title,YTid)
]]></expres>
<page>https://www.youtube.com/playlist?list=PL-4I35YERBxJhLTnvA3KmI4lIDScs1CTT</page>
</regex>
</item>
 
  • Like
Reactions: urualf

boul

New member
Nov 24, 2017
27
0
1
[email protected]streamwatcher2013 please help, it stop

<item>
<Title>https://ustvgo.tv</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
link='http://ustvgo.tv/'+re.findall('(player.php[^\'"]+)',page_data)[0]
list=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://ustvgo.tv/abc-live-streaming-free/'}).content
source=re.findall('id=.player(?s)(.*?)</body',list)[0]
player=re.findall('file:\s*([^\(]+)',source)[0]
html_list,gtok,tok2=re.findall('(?s)%s.+?return.+?\]=([^\(]+).+?\)\+([^\]\[]+).+?\]\([\'"]([^\'"]+)'%player,source)[0]
tok=re.findall('%s.+?\[("[^\]]+)'%gtok,source)[0];token=''.join(eval(tok))
token2=re.findall('id=%s>([^<]+)'%tok2,list)[0]
ghtml=re.findall('case.+?:\s*return\s*"([^"]+)',re.findall('%s(?s)(.*?)\}\}'%html_list,source)[0])
return 'https://peer%s.ustv24h.live/Telemundo/myStream/playlist.m3u8?wmsAuthSign=%s%s|user-agent=ipad&referer=https://ustvgo.tv/'%(ghtml[8],token,token2)
]]></expres>
<page>https://ustvgo.tv/abc-live-streaming-free/</page>
<referer>https://ustvgo.tv/</referer>
</regex>
<thumbnail></thumbnail>
<fanart></fanart>
</item>
 

tungbeng95

Member
Oct 25, 2018
181
7
18
Try if it working for you:
<item>
<title>ABC</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
link='https://ustvgo.tv/'+re.findall('(player.php[^\'"]+)',page_data)[0]
list=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://ustvgo.tv/abc-live-streaming-free/'}).content
return re.findall('atob.[\'"]([^\'"]+)',list)[0].decode('base64')+'|user-agent=ipad&referer='+link
]]></expres>
<page>https://ustvgo.tv/abc-live-streaming-free/</page>
<referer>https://ustvgo.tv/</referer>
</regex>
</item>
 

peterpan

Active member
Jul 7, 2013
103
73
28
Here you go ... It seems to work just fine :)

XML:
<item>
<title>ABC **https://ustvgo.tv/abc-live-streaming-free/**</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):
  link='https://ustvgo.tv/'+re.findall('(player.php[^\'"]+)',page_data)[0]
  list=requests.get(link,headers={'user-agent':'Mozilla/5.0','referer':'https://ustvgo.tv/abc-live-streaming-free/','Upgrade-Insecure-Requests':'1'}).content
  source=re.findall('id=.player(?s)(.*?)</body',list)[0]
  url=re.findall("var filePath = atob\('(.*?)'",source)[0].decode('base64')
  p=re.findall('peer(.*?).us',url.format())[0]
  Auth=re.findall('AuthSign=(.+?)$',url.format())[0]
  DecAuth=Auth.decode('base64')
  return url+'|user-agent=iPad&referer='+link
]]></expres>
<page>https://ustvgo.tv/abc-live-streaming-free/</page>
<referer>https://ustvgo.tv/</referer>
</regex>
</item>
 
  • Like
  • Like
Reactions: tungbeng95 and boul

peterpan

Active member
Jul 7, 2013
103
73
28
Actually, you can remove p, Auth, and DecAuth lines, and it'll still work. I was trying something silly and forgot to remove them :)
 

upd8t3r

Member
Oct 16, 2019
41
13
8
That's how I usually do it. Just checked and now I can see that, but over the weekend when I was trying, it kept displaying No Access instead of the source code. That's why I was wondering what you did special.
 

BymemoLee

Member
Apr 30, 2018
77
8
8
Hello can you help, stopped working

HTML:
<item>
<title>[B]SITE EMBED | [COLOR cyan]SPORTV[/COLOR][/B]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re,requests
  referrer,referer,origin=re.findall('id="player".+?data-player-url="(((http.+?)/)index.php[^#]+)',page_data)[0]
  source=requests.get(referrer,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]','accept':'*/*'}).content
  deco=re.findall('mainSource=atob.[\'"]([^\'"\)]+)',source)[0].decode('base64').replace('\\','')
  decoder=referer+re.findall('src="/(keslan[^\'"\)]+)"[\w\W]+?id="cxz"',source)[0]
  source=requests.get(decoder,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]','accept':'*/*'}).content
  stream,fstream,gstream,mstream=re.findall('url:"/(.+?)"[\w\W]+?source="(http.+?)".+?"(.+?)".+?"(.+?)"',source)[0]
  sdef=referer+stream
  source=requests.get(sdef,headers={'user-agent':'Mozilla/5.0','referer':'[makelist.param1]','accept':'*/*'}).content
  ref=re.findall('"d":\s*"(.+?)"',source)[0]
  return fstream+ref+gstream+deco+mstream+'|User-Agent=Mozilla/5.0 (X11 Linux i686 rv:42.0) Gecko/20100101 Firefox/42.0 Iceweasel/42.0&Origin=%s&Referer=%s'%(origin,referer)
]]></expres>
<page>https://isportv12.com/tv/bein-sports-hd-1/</page>
<referer>https://isportv12.com/</referer>
<cookieJar></cookieJar>
</regex>
</item>
 

TRC4

New member
Mar 6, 2016
12
2
3
Netherland
Code:
dont waste your time with this stream, is streaming from facebook & is very slow & is dash


<?php

/* KODI XML
<item>
<title>FACEBOOK Encoded</title>
<link>$doregex[get_mpd]</link>
<thumbnail></thumbnail>
<regex>
<name>get_mpd</name>
<!-- GET ALL LINKS
[^>]+?"([^"]+)"
-->
<expres>[^>]+"([^"]+)"</expres>
<page>http://localhost/Base64_Decode_MPD_Stream.php</page>
<agent></agent>
</regex>
</item>
*/

// https://i.strmrdrpx.xyz/dmzjsn.json
$url = 'https://i.strmrdrpx.xyz/index.php?id=601'; // ENCODED LINK

function get_data($url){

    $headers[]  = "User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A";
    $headers[]  = "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9";
    $headers[]  = "Accept-Language:en-us,en;q=0.5";
    $headers[]  = "Accept-Encoding:gzip,deflate";
    $headers[]  = "Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.7";
    $headers[]  = "Keep-Alive:115";
    $headers[]  = "Content-Type: application/json'";
    $headers[]  = "Referer: https://isportv12.com/tv/bein-sports-hd-1'";
    $headers[]  = "Connection:keep-alive";
    $headers[]  = "Cache-Control:max-age=0";
    $headers[]  = "Access-Control-Allow-Origin:*";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_ENCODING, "gzip");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_COOKIEFILE, ".cookies.txt");
    curl_setopt($ch, CURLOPT_COOKIEJAR, ".cookies.txt");
    curl_setopt($ch, CURLOPT_VERBOSE, true);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    $result = curl_exec($ch);
    curl_close($ch);

    return $result;

    if (!$result = curl_exec($ch))
    {
        return FALSE;
    }

    curl_close($ch);
    return $result;

}

$host = get_data($url);
if (!$host) die("Could not Read Stream From $url");
preg_match_all('/atob.+?"([^"]+)"/',$host, $b64_string_matches, PREG_PATTERN_ORDER);
$b64_decode = base64_decode($b64_string_matches[1][0]);
$replace_b64_decode = str_replace(
    array("\/\/","\/"),
    array("//","/"),
    $b64_decode
);
echo $replace_b64_decode;
?>
 

urualf

Member
Jan 19, 2016
32
0
6
this regex is for more the 200 but no work ,no open in lsp please need help thanks


<item>
<title>Solamente vos - Capítulos </title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold] [makelist.param1][/COLOR]</title>
<urlsolve>https://www.youtube.com/watch?v=[makelist.param2]</urlsolve>
<thumbnail>https://i.ytimg.com/vi/[makelist.param2]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):
if '"pl-load-more-destination' in page_data:
lists=re.findall('id="pl-load-more-destination">(?s)(.*?)</tbody',page_data)[0].replace('amp;','').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
YTid=re.findall('data-video-id="(.*?)"',lists)
title=re.findall('data-title="(.*?)"',lists)
return zip(title,YTid)
else:
lists=re.findall('window."ytInitialData"(?s)(.*?)window."ytInitialPlayerResponse',page_data)[0].replace('amp;','').replace('#038;','').replace('&#39;','\'').replace('&quot;','"')
title=re.findall('views"}},"simpleText":"(\w[^"]+)',lists)
YTid=re.findall('"playlistVideoRenderer":{"videoId":"([^"]+)',lists)
return zip(title,YTid)
]]></expres>
<page></page>
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
383
164
43
Please use code blocks when you post code
Here is the proper way to do playlists, Enjoy!

LSP XML:
<item>
<title>Solamente vos - Capítulos</title>
<thumbnail>https://m.media-amazon.com/images/M/MV5BN2Q5MjY5MDct[email protected]._V1_.jpg</thumbnail>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR gold][makelist.param1] [COLOR cyan]([makelist.param2])[/COLOR]</title>
<info>[makelist.param3]</info>
<urlsolve>https://www.youtube.com/watch?v=[makelist.param4]</urlsolve>
<thumbnail>[makelist.param5]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import json
  items = json.loads(page_data).get('video')
  events = []
  for item in items:
    title = item.get('title')
    vid = item.get('encrypted_id')
    info = item.get('description')
    length = item.get('duration')
    thumb = item.get('thumbnail').replace('default', 'hqdefault')
    events.append((title, length, info, vid, thumb))
  return events
]]></expres>
<page>https://www.youtube.com/list_ajax?style=json&amp;action_get_list=1&amp;list=PL-4I35YERBxJhLTnvA3KmI4lIDScs1CTT</page>
</regex>
</item>
 
  • Like
Reactions: urualf

TRC4

New member
Mar 6, 2016
12
2
3
Netherland
@tungbeng95

Code:
Get all links from kineskop.tv with this regex

<item>
<title>ANT1 CY Setcookie</title>
<link>$doregex[url]|User-Agent=iPad&amp;Referer=https://www.ant1.com.cy/</link>
<regex>
<name>url</name>
<expres>console.log\('([^']+)</expres>
<!--
SITE https://www.ant1.com.cy/web-tv-live/
-->
<page>http://kineskop.tv/?page=watch&amp;ch=428</page>
<referer></referer> 
<setcookie>cocha=100</setcookie>
</regex>
<thumbnail></thumbnail>
</item>
 

tungbeng95

Member
Oct 25, 2018
181
7
18
Can help me this:
hxxp://photocall.tv/kF9v/spi?ch=fightbox
Session “kF9v” change everyday :(
 

TRC4

New member
Mar 6, 2016
12
2
3
Netherland
why you dont say I want regex but say the kF9v changed every day? kF9v is path and not token.
try the code and check tomorrow for your kF9v is changed or not.

Code:
<item>
<title>[COLOR lime][B]photocall.tv[/B][/COLOR]</title>
<thumbnail></thumbnail>
<fanart></fanart>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[COLOR lime][B]$doregex[replace_titles][/B][/COLOR]</title>
<link>$doregex[replace_url]|User-Agent=iPad&amp;Referer=http://photocall.tv/</link>
<thumbnail>$doregex[replace_images]</thumbnail>
<fanart>$doregex[replace_images]</fanart>

<SetViewMode>504</SetViewMode>

]]></listrepeat>
<expres><![CDATA[dropdown[^>]+?title="(.+?)"><img src="(.+?)">.\n*.+?>.\n*.+?>.*\n<li><a href="(.*ch.*?)"]]></expres>
<page>http://photocall.tv/</page>
</regex>
<regex>
<name>replace_images</name>
<expres>$pyFunction:'[makelist.param2]'.replace('//','http://')</expres>
<page></page>
</regex>
<regex>
<name>replace_titles</name>
<expres>$pyFunction:'[makelist.param1]'.replace(' (geobloqueo eventual)','')</expres>
<page></page>
</regex>
<regex>
<name>replace_url</name>
<expres>$pyFunction:'$doregex[get_stream]'.replace('.mpd','.m3u8')</expres>
<page></page>
</regex>
<regex>
<name>get_stream</name>
<expres><![CDATA[source:\s*'([^']+)']]></expres>
<page>http://photocall.tv/[makelist.param3]</page>
<Origin>http://photocall.tv</Origin>
<Referer>http://photocall.tv/</Referer>
</regex>
</item>
 
Thread starter Similar threads Forum Replies Date
J Scraper Development 0
D Apple TV 4 44
O Addon Requests 5