LSP Regex & Makelist Discussion.

adrianhn

New member
Mar 20, 2014
6
0
1
hi, someone can hint me a clue how get a data from a page that use a ajax or someting .


Code:
Reference: hxxps://www.dospelis.net/movies/nosotros/

use admin-ajax.php
https://www.dospelis.net/wp-admin/admin-ajax.php

post this data.. 
action=doo_player_ajax&post=75831&nume=4&type=movie


curl "https://www.dospelis.net/wp-admin/admin-ajax.php" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0" -H "Accept: */*" -H "Accept-Language: en-US,en;q=0.5" --compressed -H "Referer: https://www.dospelis.net/movies/nosotros/" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "X-Requested-With: XMLHttpRequest" -H "DNT: 1" -H "Connection: keep-alive" -H "Cookie: __cfduid=d1988b03fac4719a4ddebb9cdefe528541557499036; starstruck_bc416e3d807e9845a9a176d7faa5a1af=14dd9d4a4055b4df38b7258098049652" -H "TE: Trailers" --data "action=doo_player_ajax&post=75831&nume=4&type=movie"

thks for advavance, i want to lear with this page example. for anothers site tha use this way..
 

adrianhn

New member
Mar 20, 2014
6
0
1
i try with this but not work

Code:
<item>
<title>test    </title>
<link>$doregex[makelist2]</link>

 <regex>
<name>makelist2</name>
<listrepeat><![CDATA[
<title>[makelist2.param1]</title>
<link>$doregex[makelist]</link>
<thumbnail>[makelist2.param3]</thumbnail>
]]></listrepeat>
<expres>src=\'(.*?)\'</expres>
<page>https://www.dospelis.net/wp-admin/admin-ajax.php?</page>
<rawpost>action=doo_player_ajax&post=75831&nume=1&type=movie</rawpost>
<referer>https://www.dospelis.net/movies/nosotros/</referer>
<connection>keep-alive</connection>
<accept>*/*</accept>
<X-Req>XMLHttpRequest</X-Req>
</cookieJar>
</regex>
 
</item>
 

streamwatcher2013

Active member
Oct 24, 2013
376
26
28
USA
@adrianhn

By look into your code I saw 2 things you need to change: remove "?" after php and add "amp;" follow &. I also post the whole code for 4 servers

Code:
<page>https://www.dospelis.net/wp-admin/admin-ajax.php</page>
<rawpost>action=doo_player_ajax&amp;post=75831&amp;nume=1&amp;type=movie</rawpost>
Code:
<item>
<title>https://www.dospelis.net/movies/nosotros/</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>Server: [UPPERCASE][COLOR gold][makelist.param4][/COLOR][/UPPERCASE] ([makelist.param3])</title>
  <link>$doregex[getUrl]</link>
  <thumbnail>http:[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[data-post='(\d+).+?nume.+?(\d+).+?title.>([^<]+).+?server.>([^\.<]+)]]></expres>
<page>https://www.dospelis.net/movies/nosotros/</page>
<referer>https://www.dospelis.net/movies/</referer>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,urlresolver
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=requests.post('https://www.dospelis.net/wp-admin/admin-ajax.php',headers={'user-agent':'Mozilla/5.0','referer':'https://www.dospelis.net/movies/nosotros/','x-requested-with':'XMLHttpRequest'},data={'action':'doo_player_ajax','post':'[makelist.param1]','nume':'[makelist.param2]','type':'movie'}).content
  server=re.findall('src=[\'"]([^\'"]+)',source)[0]
  if 'rapidvideo' in server:
     source=requests.get(server,headers={'user-agent':'Mozilla/5.0','host':'rapidvideo.com','referer':'https://www.dospelis.net/movies/nosotros/'}).content
     return re.findall('(?s)<video.+?(?:file|source|src)=[\'"]([^\'"]+)',source)[0]
  else:
     return urlresolver.resolve(server)
]]></expres>
<page></page>
<referer>https://www.dospelis.net/movies/nosotros/</referer>
</regex>
 

Rockey

Member
Sep 11, 2018
67
0
6
Hello and good day to all.
Is it possible to have a regexmakelist for this url?
i think there was made one in the past but not available in pastbin anymore

Code:
http://www.telewebion.com/
thanks in advance
 

streamwatcher2013

Active member
Oct 24, 2013
376
26
28
USA
Try this:

Code:
<item>
<title>https://www.telewebion.com/</title>          
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR gold] [makelist.param1][/COLOR]</title>
  <link>$doregex[makelist2]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re,requests
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=requests.get('https://www.telewebion.com/',headers={'user-agent':'Mozilla/5.0'}).content
  return re.findall('(?s)"ssr-carousel-container".+?_ngcontent-c\d+="">(.*?)<(?s)(.*?)</div>\n',re.findall('</app-shortcut-menu>(?s)(.*?)</app-home',source)[0])
]]></expres>
<page>https://www.telewebion.com/</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold] [makelist2.param2][/COLOR]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[_ngcontent-c\d+=""\s*href.+?/([^\/]+)">[\w\W]*?\s*(.*?)\n.+?</a]]></expres>
<page>[makelist.param2]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re,requests,json
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  source=requests.get('https://wa1.telewebion.com/v2/channels/getChannelLinks?channel_desc=[makelist2.param1]&device=desktop&logo_version=4',headers={'user-agent':'Mozilla/5.0','host':'wa1.telewebion.com','origin':'https://www.telewebion.com','referer':'https://www.telewebion.com/live/[makelist2.param1]','connection':'keep-alive','accept':'application/json, text/plain, */*'}).content #'accept-encoding':'gzip, deflate, br'
  if '"500' in source:
    return re.findall('.+"link":"(.*?)"."bitrate":"500',source)[0]
  elif '"300' in source:
    return re.findall('.+"link":"(.*?)"."bitrate":"300',source)[0]
  else:
    return re.findall('.+"link":"(.*?)"."bitrate":"100',source)[0]
]]></expres>
<page></page>
</regex>
</item>
 
  • Like
Reactions: Rockey

Picapau

Member
Nov 15, 2018
49
4
8
I did two regex that were working, but they have stopped working and I do not find the problem, I think it's because it does not connect to the web and that's why I do not take the information, but I check the referer and the agent and I think they are fine, someone can help me, thanks

Code:
<item>
<title>$doregex[gamocristal]    </title>
    <link>$doregex[gamocristal]</link>
<regex>
<name>gamocristal</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  import requests
  mozhdr = {'User-Agent': 'ipad', 'Referer': 'http://www.seriespapaya.com/enlace/141897/'}
  url = 'http://gamovideo.com/1h1k9noapc3f'
  html = requests.get(url, headers=mozhdr, verify=False).text
  part1,part2 = re.findall('(?s)vplayer...img src=.(http://.*?\/).*?mp4.(.*?)\|', html)[0]
  return '{}{}/v.mp4|Referer={}&Origin=http://gamovideo.com&User-Agent={}'.format(part1, part2, url, mozhdr['User-Agent'])
]]></expres>
<page></page>
</regex>
</item>


<item>
<title>$doregex[gamocristal]  </title>
    <link>$doregex[gamocristal]</link>
<regex>
<name>gamocristal</name>
<expres><![CDATA[#$pyFunction
from urlresolver.plugins.lib import jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
    import re
    import requests
    mozhdr = {'User-Agent': 'Mozilla/5.0', 'Referer': 'http://www.seriespapaya.com/enlace/141897/'}
    url = 'http://gamovideo.com/1h1k9noapc3f'
    html = requests.get(url, headers=mozhdr, verify=False).text
    datos = re.findall('javascript.*?(eval\(function\(p,a,c,k,e,d.*)', html)[0]
    page2 = jsunpack.unpack(datos)
    fin = re.findall('(?s)sources.*?file:"(h.*?)"', page2)[0]
    return fin
]]></expres>
<page></page>
</regex>
</item>
 

gujal

Developer
Dec 26, 2013
189
7
18
Here you go, Enjoy!

Code:
<item>
<title>gamocristal</title>
<link>$doregex[get-url]</link>
<regex>
<name>get-url</name>
<expres><![CDATA[#$pyFunction
from resolveurl.plugins.lib import jsunpack
def GetLSProData(page_data,Cookie_Jar,m):
    import re
    datos = re.findall('javascript.*?(eval\(function\(p,a,c,k,e,d.*)', page_data)[0]
    page2 = jsunpack.unpack(datos)
    fin = re.findall('sources.*?file:"(h.*?)"', page2, re.DOTALL)[0]
    return fin
]]></expres>
<page>http://gamovideo.com/1h1k9noapc3f</page>
<referer>http://www.seriespapaya.com/</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0</agent>
</regex>
</item>
 
  • Like
Reactions: Picapau

gujal

Developer
Dec 26, 2013
189
7
18
You actually do not need a python block at all for this simple site
Code:
<item>
<title>gamocristal</title>
<link>$doregex[url]</link>
<regex>
<name>url</name>
<expres>file:\s*"(http[^"]+)</expres>
<page>$doregex[unpack]</page>
</regex>
<regex>
<name>unpack</name>
<expres>$pyFunction:get_unpacked(page_data,'(?s)(eval\(function\(p,a,c,k,e,d.*?)&lt;/.+')</expres>
<page>http://gamovideo.com/1h1k9noapc3f</page>
<referer>http://www.seriespapaya.com/</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0</agent>
</regex>
</item>
 
  • Like
Reactions: Picapau

Picapau

Member
Nov 15, 2018
49
4
8
Thank you very much, could you explain to me the reason why mine does not work when I used to work? So I can learn for future regular expressions
 

gujal

Developer
Dec 26, 2013
189
7
18
@Picapau
There were two issues with your code
1. The site is expecting a proper User-Agent presented, does not work with the ancient Firefox 14 agent that LSP uses
2. In the stream url regex, there is a space sometimes after `file:` so adding a `\s*` handles the presence or absence of space
 

Picapau

Member
Nov 15, 2018
49
4
8
thanks, changing the agent of this one has served me, since I have it in several regex and that firefox very often changes the agent, and decided to do a common regex to extract the agent and update it from there, thanks

Code:
<item>
<title>$doregex[gamocristal]    </title>
    <link>$doregex[gamocristal]</link>
<regex>
<name>gamocristal</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
  import re
  import requests
  mozhdr = {'User-Agent': '$doregex[agente]', 'Referer': 'http://www.seriespapaya.com'}
  url = 'http://gamovideo.com/1h1k9noapc3f'
  html = requests.get(url, headers=mozhdr, verify=False).text
  part1,part2 = re.findall('(?s)vplayer...img src=.(http://.*?\/).*?mp4.(.*?)\|', html)[0]
  return '{}{}/v.mp4|Referer={}&Origin=http://gamovideo.com&User-Agent={}'.format(part1, part2, url, mozhdr['User-Agent'])
]]></expres>
<page></page>
</regex>
<regex>
<name>agente</name>
<expres>(.*?)CRISTAL</expres>
<page>https://pastebin.com/raw/2ZiAvShT</page>
</regex>
</item>
 

Lacasitos74

Member
Nov 21, 2016
34
0
6
hi gurus can you help me with this link please

Code:
http://player2.streamshd.fi/hd7/sptv1.html
Thanks a lot
 

Picapau

Member
Nov 15, 2018
49
4
8
here it is


Code:
<item>
<title>[COLOR lightgreen]http://player2.streamshd.fi/hd7/sptv1.html[/COLOR]</title>
<link>plugin://plugin.video.Spor**dev*l/?mode=1&amp;item=catcher%3Dstreams%26url=https:$doregex[fin]</link>
<regex>
<name>cristal</name>
<expres>allow.*?src="(.*?)"</expres>
<page>http://player2.streamshd.fi/hd7/sptv1.html</page>
</regex>
<regex>
<name>fin</name>
<expres><![CDATA[<iframe src="(.*?)"]]></expres>
<page>$doregex[cristal]</page>
<referer>http://player2.streamshd.fi/hd7/sptv1.html</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0</agent>
</regex>
</item>
 

papaya

New member
Apr 4, 2018
27
0
1
hi sifus,

can anyone help me with this site

Code:
https://animeindo.co/dragon-ball-super-movie-broly/
 

Picapau

Member
Nov 15, 2018
49
4
8
hello, I did this function for people to check if they have installed the necessary dependencies, with the rest of the plugin and scrip I am doing well, but with f4mtester in 18 I do not go, in kodi 17 without problems, can someone help me?

Code:
<item>
<title>[COLOR white]tengo instalado f4mtester? $doregex[f4m][/COLOR]</title>
<link>$doregex[cristal]</link>
<regex>
<name>f4m</name>
<expres>$pyFunction:('$doregex[f4m1]').replace('0','[COLOR red]NO, le recomendamos que lo instale, Primero instale el script f4mproxy después instale el plugin f4mTester. Si no lo instala, NO podrá ver la mayoría de tv en directo.[/COLOR]').replace('1','[COLOR green]SI.[/COLOR]')</expres>
<page></page>
</regex>
<regex>
<name>f4m1</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 hola = xbmc.getCondVisibility('System.HasAddon(plugin.video.f4mTester)')
 return hola
]]></expres>
<page></page>
</regex>
</item>
 

tobotminer

New member
Jan 26, 2018
23
0
1
Hi all,

anyone can help me with this.

Code:
https://www.mflix.org/series.html
 

kavan

Member
Aug 14, 2016
37
0
6
Hello can any one help me please for
make a makelist for this url
Code:
https://film2movie.ws/category/dubbed-fa/
Thanks in advance
 

Beezlo

New member
Mar 17, 2016
26
0
1
Please help to fix:
<item>
<title>[COLOR red]C[COLOR white]ARPISMA[/COLOR]</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
  <title>[COLOR yellow][makelist.param3][/COLOR]</title>
  <link>$doregex[makelist2]</link>
  <thumbnail>[makelist.param2]</thumbnail>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  return re.findall('(?s)href="/(.*?)".*?src="(.*?)".*?title">([^<]+)',re.findall('class="swiper-wrapper">(?s)(.*?)"section-series-program-info',page_data)[0])
]]></expres>
<page>https://www.showtv.com.tr/dizi/tum_bolumler/carpisma-sezon-1-bolum-2-izle/67987</page>
</regex>
<regex>
<name>makelist2</name>
<listrepeat><![CDATA[
  <title>[COLOR gold][makelist.param3] ([makelist2.param1]. Part)[/COLOR]</title>
  <link>$doregex[getUrl]</link>
]]></listrepeat>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
 if '"video-part"' in page_data:
   list=re.findall('video-part-name">(?s)(.*?)</ul',page_data)[0]
   title=re.findall('href.+?>(\d+)<',list);link=re.findall('href="/([^"]+)',list)
   return zip(title,link)
 elif '"video-part"' not in page_data:
   list=re.findall('"TVEpisode"(?s)(.*?)</script',page_data)[0].replace('\\','')
   return re.findall('"episodeNumber":"([^"]+)".+?url".+?.tr/([^"]+)',list)
]]></expres>
<page>https://www.showtv.com.tr/[makelist.param1]</page>
</regex>
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  list=re.findall('"ht_files"(?s)(.*?)<script',page_data)[0].replace('\\','')
  if '1080' in list:
    return re.findall('"name":"1080"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif '720' in list:
    return re.findall('"name":"720"."file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  elif 'ht_mobile' in list:
    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
  else:
    return re.findall('"Standart","file":"([^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param1]'
]]></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
<fanart>http://www.pixelstalk.net/wp-content/uploads/2016/07/Pink-And-Black-HD-Background.jpg</fanart>
<thumbnail>https://www.turkishcelebritynews.com/wp-content/uploads/2018/10/kivanc-tatlitug-carpisma-collision-turkish-drama.jpg</thumbnail>
</item>
 

streamwatcher2013

Active member
Oct 24, 2013
376
26
28
USA
Replace the getUrl regex with this below section:

Code:
<regex>
<name>getUrl</name>
<expres><![CDATA[#$pyFunction
import re
def GetLSProData(page_data,Cookie_Jar,m):#streamwatcher2013
  list=re.findall('"ht_files"(?s)(.*?)<script',page_data)[0].replace('\\','')
  if '1080' in list:
    return re.findall('"name":"1080"."file":"(.+?vmcdnb[^"]+)',list)[-1]+'|User-Agent=VLC'
  elif '720' in list:
    return re.findall('"name":"720"."file":"(.+?vmcdnb[^"]+)',list)[-1]+'|User-Agent=VLC'
  elif 'ht_mobile' in list:
    return re.findall('"ht_mobile_m3u8":"([^"]+)',list)[0]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param2]'
  else:
    return re.findall('"Standart","file":"(.+?vmcdnb[^"]+)',list)[-1]+'|User-Agent=iPad&Referer=https://www.showtv.com.tr/[makelist2.param2]'
]]></expres>
<page>https://www.showtv.com.tr/[makelist2.param2]</page>
<agent>Mozilla/5.0</agent>
<cookieJar></cookieJar>
</regex>
 
  • Like
Reactions: Beezlo and Picapau

thingy

New member
May 9, 2018
29
0
1
Is it possible through a regex to extract the paste__ list so that I do not have to insert the new address month after month? I appreciate your comments

Code:
hxxxs://fluxustv.blogspot.com/p/iptv.html
 

streamwatcher2013

Active member
Oct 24, 2013
376
26
28
USA
I thought you only want to get the link and do it yourself. Here the simple one from LSP

Code:
<item>
<title>https://fluxustv.blogspot.com/p/iptv.html</title>
<link>ignore-me</link>
<externallink>$doregex[iptvLink]</externallink>
<regex>
<name>iptvLink</name>
<expres>id="myInput1".+?value="([^"]+)</expres>
<page>https://fluxustv.blogspot.com/p/iptv.html</page>
</regex>
</item>
 

Similar threads