LSP Regex & Makelist Discussion.

umonkey

Member
Sep 18, 2012
70
0
6
Can anyone help trying to call this from a plugin from LSPRO but its not working

Code:
plugin://plugin.video.WatchNi****ns2/?action=actionResolve&url=https%3A%2F%2Fwww.thewatchcartoononline.tv%2Flego-jurassic-world-legend-of-isla-nublar-episode-1-mission-critical
Thanks
 

upd8t3r

Member
Oct 16, 2019
46
18
8
The name of a plugin is case sensitive, so it has to be exactly how the name of the plugin is, in this case it should be all lowercase letters. I've tested and both solutions below work minus the *'s. You can have the https%3A%2F%2F but you only need the %2F for it to work.


XML:
<item>
<title>[B]lego-jurassic-world-legend-of-isla-nublar-episode-1-mission-critical[/B]</title>
<link>plugin://plugin.video.w*atchn*ixtoons2/?action=actionResolve&amp;url=%2Flego-jurassic-world-legend-of-isla-nublar-episode-1-mission-critical</link>
<thumbnail></thumbnail>   
<fanart></fanart>
</item>

<item>
<title>[B]lego-jurassic-world-legend-of-isla-nublar-episode-1-mission-critical[/B]</title>
<link>plugin://plugin.video.w*atchn*ixtoons2/?action=actionResolve&amp;url=https%3A%2F%2Fwww.thewatchcartoononline.tv%2Flego-jurassic-world-legend-of-isla-nublar-episode-1-mission-critical</link>
<thumbnail></thumbnail>   
<fanart></fanart>
</item>
 

umonkey

Member
Sep 18, 2012
70
0
6
Thanks for the help but i gave the wrong link it should be
Code:
plugin://plugin.video.WatchNi****ns2/?action=actionEpisodesMenu&amp;url=https%3a%2f%2fwww.thewatchcartoononline.tv%2fanime%2flego-jurassic-world-legend-of-isla-nublar
thanks again for taking the time to look at this cheers
 

haider

New member
Dec 26, 2013
21
0
1
toronto
hi
can any one help how I paly in LSP
hxxps://pe-ak-lp01a-9c9media.akamaized.net/live/News1BNNDigi/p/dash/00000001/1bba52dc66e4c68e/manifest.mpd
 

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!


LSP XML:
<item>
  <title>News 1</title>
  <inputstream>http://pe-ak-lp01a-9c9media.akamaized.net/live/News1BNNDigi/p/dash/00000001/1bba52dc66e4c68e/manifest.mpd</inputstream>
</item>
 
  • Like
Reactions: haider and Doom

MaxSpeed

New member
Nov 3, 2019
17
0
1
Hello my friends,
Regex for hps://steamplay.me/cv9gul700wzd or hps://vidoza.net/yhgyeslu9hhx please!!
Thank you!!!
 

Doom

Member
Sep 16, 2019
292
21
18

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!

The paste below will expire in a week, get it before that
Code:
https://pastebin.com/raw/zBrxpPjH
 
  • Like
Reactions: Doom

m5Germany

Active member
Mar 20, 2014
230
72
28
You might want to install his repo:

LSP XML:
https://github.com/Gujal00/GujalKodiWork/blob/master/zips/repository.gujal/repository.gujal-1.9.zip
Current LSPro is v2.9.3 under KODI 18.5 Leia

Enjoy,
m5
 

adioukrou

Member
May 12, 2012
36
0
6
Hello friends,
Need help on this : hxxs://iframe.dacast.com/b/50160/c/515452
Original webpage is www.nci.ci
Thanks.
 

streamwatcher2013

Well-known member
Oct 24, 2013
931
414
63
USA
It's simple one

LSP XML:
<item>
<title>N'MIX</title>
<link>$doregex[getUrl]</link>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,json
def GetLSProData(page_data,Cookie_Jar,m):
  m3u8=requests.get('https://playback.dacast.com/content/access?contentId=50160_c_515452&provider=dacast',headers={'user-agent':'Mozilla/5.0','origin':'https://iframe.dacast.com','referer':'https://iframe.dacast.com/b/50160/c/515452'}).json()['hls']
  return '%s|user-agent=ipad&origin=https://iframe.dacast.com&referer=https://iframe.dacast.com/b/50160/c/515452'%m3u8
]]></expres>
<page></page>
</regex>
</item>
 

upd8t3r

Member
Oct 16, 2019
46
18
8
Code:
I've seen some people in the past requesting about Fox News links, their website is now broadcasting it for free temporarily, so I thought I'd post the direct link for it.


<item>
<title>[B]FOX NEWS[/B]</title>
<link>https://fncgohls-i.akamaihd.net/hls/live/263399/FNCGOHLSv2/master.m3u8|User-Agent=iPad</link>
<thumbnail>https://a57.foxnews.com/media2.foxnews.com/BrightCove/694940094001/2018/03/19/640/360/694940094001_5754212826001_5614615980001-vs.jpg</thumbnail>
<fanart>https://a57.foxnews.com/media2.foxnews.com/BrightCove/694940094001/2018/03/19/640/360/694940094001_5754212826001_5614615980001-vs.jpg</fanart>
</item>
 

JonnyB

New member
Oct 8, 2016
23
6
3
Hi,

A question about json with python, in this code:

Code:
"name": "Foo",
"id": 5,
"cover": ["https:\/\/image.org\/cover.jpg"],

I know how to catch the "name" and the "id":

Code:
name = item['name']
id = srt(item['id'])

But how can I catch the cover? And if there are more than 1 value, I think with the bracket it can be more than 1, how can I catch the first one?

And to replace \/ to / it can be direct with .replace('\/', '/') ?

Thanks
 

gujal

Developer
Dec 26, 2013
539
296
63
when you load that into python using json.loads, it will auto-remove the "\", so no need to do string.replace
The main thing there to note is the key types, name is string, id is int and cover is list of strings
So if you want the cover, you need to use cover = item['cover'][0]
 
  • Like
Reactions: JonnyB

Doom

Member
Sep 16, 2019
292
21
18
@gujal Just wanted to stop by and say thanks, really appreciate all that you do for the Kodi community and taking over the resolveurl... can't thank you enough m8!!!😎👏
 
  • Like
Reactions: JonnyB

gujal

Developer
Dec 26, 2013
539
296
63
I didn't take over ResolveURL. The source is still in JSergio's git and all the work continues there as usual. I am only making zip and releasing it when there are enough fixes (usually about 10), as JS is busy.
 

m5Germany

Active member
Mar 20, 2014
230
72
28
Started working on this an have hit a knowledge wall. Hoping someone would find\code a solution.
Start Page:
https://www.fox.com/live/channel/fnc/
or
https://www.fox.com/live/channel/fnc/?cmpid=org=dcg::ag=merkle::mc=display::src=dbm::cmp=270527823::add=130528603&dclid=CjkKEQjwjoH0BRCWkIyc6PrHlsUBEiQAFFidlf3Q3HbSfRd4AReCLsZ8thytGU9kBK3zMgLk1Ew-kmTw_wcB
I get the following using Fiddler:
Info:
GET https://content.uplynk.com/preplay/channel/1e298c9d65a245b3bd37f339cadcca58.json?repl=aboi&ts=&rays=gkjihfedcb&ad=fw_prod&cdn=ec&ad.flags=:slcb+sltp+qtcb+emcr+fbad+dtrd+vicb&ad.csid=foxnow%2Fwebdesktop%2Flive%2Ffnc&ad.prof=516429%3Auplynk_foxnow_webdesktop_live&ad.kvsep=%7C&ad.kv=_fw_ae%7Cnomvpd%7C_fw_us_privacy%7C%7C_fw_did_idfa%7C%7C_fw_did_google_advertising_id%7C%7C_fw_did_android_id%7C%7C_fw_did%7C%7C_fw_nielsen_app_id%7C%7C_fw_vcid2%7Cd935a850-0f22-4dfe-a8e6-eefaf880c199%7Ckuid%7Ct7rvryw0k%7C_fw_seg%7C386123%3Asbsz8qqux%2Cshpmwshty&ad.metr=1031&ad.flexv=2&ad.flex=15&v=2&ad.cping=1&ad.pingf=4&ad.caid=foxnow_FNC_Live&exp=1585574628&tc=1&rn=721023&ct=c&cid=1e298c9d65a245b3bd37f339cadcca58&sig=54e034098d1ecc870c1b4a6063770621da9838d3525367313834cb738e7a3f06 HTTP/1.1
Host: content.uplynk.com
Connection: keep-alive
Accept: application/json, text/plain, */*
Sec-Fetch-Dest: empty
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
Origin: null
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Referer: https://www.fox.com/live/channel/FNC/?cmpid=org=dcg::ag=merkle::mc=display::src=dbm::cmp=270527823::add=130528603&dclid=CjkKEQjwjoH0BRCWkIyc6PrHlsUBEiQAFFidlf3Q3HbSfRd4AReCLsZ8thytGU9kBK3zMgLk1Ew-kmTw_wcB
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

HTTP/1.1 200 OK
Date: Mon, 30 Mar 2020 13:22:54 GMT
Content-Type: application/json
Content-Length: 306
Connection: keep-alive
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Services: 96290441ea874ce7b37b107a4e86a12d
Strict-Transport-Security: max-age=31536000; includeSubDomains
Access-Control-Allow-Origin: *
Referrer-Policy: no-referrer-when-downgrade

{"prefix": "https://content-ausc3.uplynk.com", "playURL": "https://content-ausc3.uplynk.com/preplay2/channel/1e298c9d65a245b3bd37f339cadcca58/e2cf50530364134a22135dd2b639f596/48gm7mo9cDz1UXIiCVIcsx5UMG4bMScZO1BFD6LraiVg.m3u8?pbs=c04fbdac1ca2451085912e3880579826", "sid": "c04fbdac1ca2451085912e3880579826"}
I've been able to play the .m3u8 - but - I can't figure out where the dynamic changes are located to RegEx them. Additionally, I did notice that the .m3u8 - when looked at w/ Fiddler - that there are multiple quality streams. It would be nice to have it automatically default to the highest bitrate - or - an option to choose the quality.

I was able to capture:
Variable.m3u8:
https://content-ausc3.uplynk.com/preplay2/channel/1e298c9d65a245b3bd37f339cadcca58/e2cf50530364134a22135dd2b639f596/48gm7mo9cDz1UXIiCVIcsx5UMG4bMScZO1BFD6LraiVg.m3u8?pbs=c04fbdac1ca2451085912e3880579826

(HD 1080) https://content-ausw3.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/h.m3u8?pbs=672c2ebef8a14f17a9d9c8567a07a106
(HD 720) https://content-ausw3.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/f.m3u8?pbs=672c2ebef8a14f17a9d9c8567a07a106
(SD) https://content-ausw3.uplynk.com/channel/1e298c9d65a245b3bd37f339cadcca58/b.m3u8?pbs=672c2ebef8a14f17a9d9c8567a07a106
As always, Thanks in advance,
m5
 

gujal

Developer
Dec 26, 2013
539
296
63
PM me a fiddler capture archive of the whole session, right from opening the webpage, login and playback of 5 seconds, and I will take a look.
 

vbprofi

Member
Feb 9, 2016
77
3
8
Hello friends,
does anyone have any idea how to manage pagenation from this site in lsp? I don't understand the Javascript source code that is responsible for it.
I would like all pages from pagenation to be listed in lsp.
Code:
http://www.medyahaber.info/tum-haberler/
Thank you in advance!
 

gujal

Developer
Dec 26, 2013
539
296
63
It is using HTML5+AJAX for pagination, so can't be done in LSP as there is no information of total number of pages anywhere on the webpage
Best you can get is assume there are say 10 or 20 pages and code for that many pages
 
  • Like
Reactions: vbprofi

vbprofi

Member
Feb 9, 2016
77
3
8
Hello gujal,
that is also a good solution. However, I have not yet understood how the url for the pages are formed in Javascript/Ajax/HTML5.
Could you please give me an example of the first three pages?
Thank you in advance!
 

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!
LSP XML:
<item>
<title>TÜM HABERLER</title>
<link>$doregex[pages]</link>
<thumbnail>http://www.medyahaber.info/wp-content/uploads/2019/11/logo1-285x300.png</thumbnail>
<regex>
  <name>pages</name>
  <listrepeat><![CDATA[
  <title>[COLOR gold]Page: [COLOR cyan][pages.param1][/COLOR]</title>
  <link>$doregex[makelist]</link>
  <thumbnail>http://www.medyahaber.info/wp-content/uploads/2019/11/logo1-285x300.png</thumbnail>
  ]]></listrepeat>
  <expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  return [(str(page), ) for page in range(1,6)]
]]></expres>
  <page></page>
</regex>
<regex>
  <name>makelist</name>
  <listrepeat><![CDATA[
    <title>[makelist.param3]</title>
    <link>http://www.medyahaber.info$doregex[url]|User-Agent=iPad</link>
    <thumbnail>[makelist.param1]</thumbnail>
  ]]></listrepeat>
  <expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re, requests, HTMLParser
  h = HTMLParser.HTMLParser()
  headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1',
             'Referer': 'http://www.medyahaber.info/'}
  ajax_url = 'http://www.medyahaber.info/?ajax-request=jnews'
  data = {'action': 'jnews_module_ajax_jnews_block_22',
          'data[current_page]': [pages.param1],
          'data[attribute][content_type]': 'all',
          'data[attribute][number_post]': 50,
          'data[attribute][sort_by]': 'latest'}
  page_data = h.unescape(requests.post(ajax_url, data=data, headers=headers).json().get('content'))
  items = re.findall('<article.+?-src="([^"]+).+?title.+?href="([^"]+)">([^<]+)', page_data, re.DOTALL)
  return items
]]></expres>
  <page></page>
</regex>
<regex>
  <name>url</name>
  <expres>source.+?src="([^"]+)</expres>
  <page>[makelist.param2]</page>
  <referer>http://www.medyahaber.info/</referer>
</regex>
</item>
 
  • Like
Reactions: vbprofi

vbprofi

Member
Feb 9, 2016
77
3
8
very good work. Perfect solution!
I will try to understand the code (especially the Ajax code).
stay healthy
best regards and wish you continued success!
 

m5Germany

Active member
Mar 20, 2014
230
72
28
Thanks. I do not think I have posted enough to send PM's though I've been a member since 2014. Here is a link to one of my g-drives.

g-drive:
https://drive.google.com/open?id=1GnuCtfFerJGvn0YUnPQqtHjpKe1CPhOO
Maybe you can PM me which will allow me to converse? Not sure.

Anyway, if you are successful getting the .saz file - Let me know so I can turn the link back to private.

As Always, Thanks.
m5

Additionally, I would like to "Thank You for All The Help" you have given over the years.
 

MaxSpeed

New member
Nov 3, 2019
17
0
1
Hello.
Regex or makelist for hps://www.dailymotion.com/playlist/x5sf4t
Please!!
Thank you.
 

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!
LSP XML:
<item>
  <title>DM Playlist</title>
  <link>$doregex[makelist]</link>
  <regex>
    <name>makelist</name>
    <listrepeat><![CDATA[
      <title>[makelist.param1]</title>
      <dm>[makelist.param3]</dm>
      <thumbnail>[makelist.param2]</thumbnail>
    ]]></listrepeat>
    <expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import json
  js_data = json.loads(page_data).get('list')
  items = [(item.get('title'), item.get('thumbnail_240_url'), item.get('id')) for item in js_data]
  return items
    ]]></expres>
    <page>https://api.dailymotion.com/playlist/x5sf4t/videos?fields=id%2Cthumbnail_240_url%2Ctitle&amp;limit=50</page>
</item>
 

thingy

Member
May 9, 2018
60
1
8
¿Es posible una expresión regular para este canal? [CÓDIGO] hxxp: //www.visionzn.com/nuevo/marcaclaro.php [/ CÓDIGO]
 

cristiano_s

New member
Feb 10, 2020
6
0
1
who can develop the code without the Spor**dev*l addiction?

<item>
<title>SkyLine Webcam</title>
<link>$doregex
  • </link>
    <thumbnail></thumbnail>
    <fanart></fanart>
    <regex>
    <name>list</name>
    <listrepeat><![CDATA[
    <title>[list.param2] </title>
    <link>$doregex[list2]</link>
    <referer></referer>
    <thumbnail></thumbnail>
    <fanart></fanart>
    ]]></listrepeat>
    <expres><![CDATA[href="([^\"]+)" class="menu-item">(.*?)<]]></expres>
    <page>https://www.skylinewebcams.com/live-cams-category/city-cams.html</page>
    <agent>Mozilla/5.0</agent>
    <referer></referer>
    <cookieJar></cookieJar>
    </regex>
    <regex>
    <name>list2</name>
    <listrepeat><![CDATA[
    <title>[list2.param3] </title>
    <link>plugin://plugin.video.Spor**dev*l/?mode=1&amp;item=catcher%3Dstreams%26url=https://www.skylinewebcams.com[list2.param1]</link>
    <referer>https://www.skylinewebcams.com</referer>
    <thumbnail></thumbnail>
    <fanart>https://i.imgur.com/qOV9YHn.png?dl=1</fanart>
    ]]></listrepeat>
    <expres><![CDATA["webcam"><a href="(.*?)".*?inal="(.*?)".*?title">(.*?)<.*?ption">(.*?)<]]></expres>
    <page>https://www.skylinewebcams.com[list.param1]</page>
    <agent>Mozilla/5.0</agent>
    </regex>
    </item>
 

m5Germany

Active member
Mar 20, 2014
230
72
28
Enjoy,
LSP XML:
<item>
<title>SkyLine Webcam</title>
<link>$doregex[list]</link>
<thumbnail>https://i.imgur.com/qOV9YHn.png?dl=1</thumbnail>
<fanart>https://i.imgur.com/qOV9YHn.png?dl=1</fanart>
<regex>
<name>list</name>
<listrepeat><![CDATA[
<title>[list.param2] </title>
<link>$doregex[list2]</link>
<referer></referer>
<thumbnail>https://i.imgur.com/qOV9YHn.png?dl=1</thumbnail>
<fanart>https://i.imgur.com/qOV9YHn.png?dl=1</fanart>
]]></listrepeat>
<expres><![CDATA[href="([^\"]+)" class="menu-item">(.*?)<]]></expres>
<page>https://www.skylinewebcams.com/live-cams-category/city-cams.html</page>
<agent>Mozilla/5.0</agent>
<referer></referer>
<cookieJar></cookieJar>
</regex>
<regex>
<name>list2</name>
<listrepeat><![CDATA[
<title>[list2.param3] </title>
<link>$doregex[getM3U8]|user-agent=ipad&amp;referer=https://www.skylinewebcams.com[list.param1]</link>
<referer>https://www.skylinewebcams.com</referer>
<thumbnail>[list2.param2]</thumbnail>
<fanart>https://i.imgur.com/qOV9YHn.png?dl=1</fanart>
]]></listrepeat>
<expres><![CDATA["webcam"><a href="(.*?)".*?inal="(.*?)".*?title">(.*?)<.*?ption">(.*?)<]]></expres>
<page>https://www.skylinewebcams.com[list.param1]</page>
<agent>Mozilla/5.0</agent>
</regex>
<regex>
<name>getM3U8</name>
<expres><![CDATA[(?:source|src|file):\s*[\'"]([^\'"]+)]]></expres>
<page>https://www.skylinewebcams.com[list2.param1]</page>
</regex>
</item>
 

m5Germany

Active member
Mar 20, 2014
230
72
28
You can delete the <referer> in List2 - not needed and I thought I had already removed it.
LSP XML:
<regex>
<name>list2</name>
<listrepeat><![CDATA[
<title>[list2.param3] </title>
<link>$doregex[getM3U8]|user-agent=ipad&amp;referer=https://www.skylinewebcams.com[list.param1]</link>

REMOVE
<referer>https://www.skylinewebcams.com</referer>
REMOVE

<thumbnail>[list2.param2]</thumbnail>
<fanart>https://i.imgur.com/qOV9YHn.png?dl=1</fanart>
]]></listrepeat>
<expres><![CDATA["webcam"><a href="(.*?)".*?inal="(.*?)".*?title">(.*?)<.*?ption">(.*?)<]]></expres>
<page>https://www.skylinewebcams.com[list.param1]</page>
<agent>Mozilla/5.0</agent>
</regex>
 

BymemoLee

Member
Apr 30, 2018
90
18
8
Hello
Can you help,
broadcast does not work ?

<item>
<title>Bein Sports Haber</title>
<link>$doregex[get-url]</link>
<regex>
<name>get-url</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
import requests
import re
room = re.findall('href="(.*?)" data-lity title="Bein Sports Haber"', page_data)[0]
url = 'https://skystar-2.com/' + room
referer = 'https://skystar-2.com/'
origin = 'https://skystar-2.com'
headers = {'user-agent': 'Mozilla/5.0', 'origin': origin, 'referer': referer, 'accept': '*/*'}
srvr = requests.get(url, headers=headers).content
return re.findall('window.atob.[\'"]([^\'"]+)',srvr)[0].decode('base64')+'|user-agent=ipad&referer='+url
]]></expres>
<page>https://skystar-2.com/live-tv.htm</page>
<referer>https://skystar-2.com/</referer>
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
539
296
63
Enjoy!

LSP XML:
<item>
<title>Bein Sports Haber</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<thumbnail>https://skystar-2.com/video/images/beinsportshaber-logo.png</thumbnail>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  strurl = re.findall('atob\("([^"]+)', page_data)[0].decode('base64')
  strurl = 'http' + strurl.split('http')[-1]
  return strurl
]]></expres>
<page>https://skystar-2.com/video/beinsportshaber.php</page>
<referer>https://skystar-2.com/live-tv.htm</referer>
</regex>
</item>
 
  • Like
Reactions: BymemoLee
Thread starter Similar threads Forum Replies Date
G Scraper Development 0
J Scraper Development 1
O Addon Requests 5