Help for Regex

Status
Not open for further replies.

sedyo

New member
Apr 28, 2018
11
0
1
pls :D can anyone help me with a regex this hxxp://sportsonline.pw/channels/hd/hd6.html
 

besttest2233

Banned
Jun 7, 2017
26
0
1
someone can help me make regex for me thanks for help

Code:
http://kurdin.eu/
 
Last edited by a moderator:

streamwatcher2013

Well-known member
Oct 24, 2013
817
334
63
USA
pls :D can anyone help me with a regex this hxxp://sportsonline.pw/channels/hd/hd6.html
Try this:

Code:
<item>
<title>http://sportsonline.pw/channels/hd/hd6.html</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>unpacked</name>
<expres>src=[\'"](.*?/embed[^"']+)</expres>
<page>http://sportsonline.pw/channels/hd/hd6.html</page>
</regex>
<regex>
<name>getUrl</name>
 <expres>source.*?[\'"]([^"']+)</expres>
<page>$doregex[packed]</page>
</regex>
<regex>
<name>packed</name>
<expres>$pyFunction:get_unpacked(page_data,'player.*\n.*(eval.*)')</expres>
<page>$doregex[unpacked]</page>
<referer>http://sportsonline.pw/channels/hd/hd6.html</referer>
</regex>
</item>
 

besttest2233

Banned
Jun 7, 2017
26
0
1
someone can help me make regex for me thanks for help
Code:
http://kurdin.eu/
 
Last edited by a moderator:

besttest2233

Banned
Jun 7, 2017
26
0
1
i do not ask i if someone can help me to make regex for me

Code:
http://kurdin.eu/
 
Last edited by a moderator:

Pustule

New member
Mar 2, 2017
20
0
0
Any chance for this regex?

Thanks

Hi.
try this:


Code:
<item><title>redsup</title>
<link>$doregex[makelist]</link>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
    <title>[COLOR yellow][makelist.param2] - [makelist.param3][/COLOR] [makelist.param5]</title>
    <link>$doregex[get-url]</link>
    <thumbnail>[makelist.param1]</thumbnail>
]]></listrepeat>
<expres><![CDATA[<img src="([^"]+).*\n<b>([^<]+)</b><hr>([^<]+)|<li><a href="([^"]+).*\n<img[^>]+> ([^<]*)]]></expres>
<page>hXXp://redups.info/</page>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0</agent>
</regex>
<regex>
<name>get-url</name>
<expres>"(http.*m3u8)"</expres>
<page>hXXp://redups.info/[makelist.param4]</page>
<referer>hXXp://redups.info/</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0</agent>
</regex>
</item>
change hXXp to http
 

Pustule

New member
Mar 2, 2017
20
0
0
You may GG for xbmc.executebuiltin("InstallAddon(id)")
Hi Streamwatcher2013,
could you give an example please?

i try this but it dont work
Code:
<item> 
<title>install youtube addon</title>
<link>$doregex[install]</link>
<regex>
<name>install</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin("InstallAddon(plugin.video.youtube)")
]]></expres>
<page></page>
</regex>
</item>
thank you.
 
Last edited:

sedyo

New member
Apr 28, 2018
11
0
1
streamwatcher2013, I know this work good thank you friend. Can you help me with this error code cause when I try play you regex code.

Code:
<item>
<title>hxxp://sportsonline.pw/channels/hd/hd6.html</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>unpacked</name>
<expres>src=[\'"](.*?/embed[^"']+)</expres>
<page>hxxp://sportsonline.pw/channels/hd/hd6.html</page>
</regex>
<regex>
<name>getUrl</name>
 <expres>source.*?[\'"]([^"']+)</expres>
<page>$doregex[packed]</page>
</regex>
<regex>
<name>packed</name>
<expres>$pyFunction:get_unpacked(page_data,'player.*\n.*(eval.*)')</expres>
<page>$doregex[unpacked]</page>
<referer>hxxp://sportsonline.pw/channels/hd/hd6.html</referer>
</regex>
</item>
KODI .log:
Code:
01:45:53.615 T:9316   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'NoneType' object has no attribute 'decode'
                                            Traceback (most recent call last):
                                              File "C:\Users\ASUS\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\default.py", line 3, in <module>
                                                LS.main()
                                              File "C:\Users\ASUS\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\_lspro.py", line 3718, in main
                                                url,setresolved = getRegexParsed(regexs, url)
                                              File "C:\Users\ASUS\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\_lspro.py", line 1358, in getRegexParsed
                                                pg=getRegexParsed(regexs, m['page'],cookieJar,recursiveCall=True,cachedPages=cachedPages)
                                              File "C:\Users\ASUS\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\_lspro.py", line 1601, in getRegexParsed
                                                except: url = url.replace("$doregex[" + k + "]", val.decode("utf-8"))
                                            AttributeError: 'NoneType' object has no attribute 'decode'
                                            -->End of Python script error report<--
 
Last edited:

streamwatcher2013

Well-known member
Oct 24, 2013
817
334
63
USA
Hi Streamwatcher2013,
could you give an example please?

i try this but it dont work
Code:
<item> 
<title>install youtube addon</title>
<link>$doregex[install]</link>
<regex>
<name>install</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin("InstallAddon(plugin.video.youtube)")
]]></expres>
<page></page>
</regex>
</item>
thank you.
Try with
Code:
import xbmc,xbmcaddon,xbmcgui,xbmcplugin,os
 

streamwatcher2013

Well-known member
Oct 24, 2013
817
334
63
USA
streamwatcher2013, I know this work good thank you friend. Can you help me with this error code cause when I try play you regex code.

Code:
<item>
<title>hxxp://sportsonline.pw/channels/hd/hd6.html</title>
<link>$doregex[getUrl]|User-Agent=iPad</link>
<regex>
<name>unpacked</name>
<expres>src=[\'"](.*?/embed[^"']+)</expres>
<page>hxxp://sportsonline.pw/channels/hd/hd6.html</page>
</regex>
<regex>
<name>getUrl</name>
 <expres>source.*?[\'"]([^"']+)</expres>
<page>$doregex[packed]</page>
</regex>
<regex>
<name>packed</name>
<expres>$pyFunction:get_unpacked(page_data,'player.*\n.*(eval.*)')</expres>
<page>$doregex[unpacked]</page>
<referer>hxxp://sportsonline.pw/channels/hd/hd6.html</referer>
</regex>
</item>
KODI .log:
Code:
01:45:53.615 T:9316   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'NoneType' object has no attribute 'decode'
                                            Traceback (most recent call last):
                                              File "C:\Users\ASUS\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\default.py", line 3, in <module>
                                                LS.main()
                                              File "C:\Users\ASUS\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\_lspro.py", line 3718, in main
                                                url,setresolved = getRegexParsed(regexs, url)
                                              File "C:\Users\ASUS\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\_lspro.py", line 1358, in getRegexParsed
                                                pg=getRegexParsed(regexs, m['page'],cookieJar,recursiveCall=True,cachedPages=cachedPages)
                                              File "C:\Users\ASUS\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\_lspro.py", line 1601, in getRegexParsed
                                                except: url = url.replace("$doregex[" + k + "]", val.decode("utf-8"))
                                            AttributeError: 'NoneType' object has no attribute 'decode'
                                            -->End of Python script error report<--
Whick Kodi and LSP version you are running on Windows?
 

sedyo

New member
Apr 28, 2018
11
0
1
Whick Kodi and LSP version you are running on Windows?
Hi sir, I running 2.7.2 cause this mod work with epg grab. In version 2.8.1 work perfectly but cant use epg :(

hxxps://github.com/alibbaba/ShaniXBMCWork2/tree/master/plugin.video.live.streamspro

Can you help me pls
 

Pustule

New member
Mar 2, 2017
20
0
0
Try with
Code:
import xbmc,xbmcaddon,xbmcgui,xbmcplugin,os
yes ! thanks very much. you're the best!

just a little question:
in a same way, do you thing it is possible to open an addon SECTION without <jsonrpc></jsonrpc> ?
(to avoid accents problems in french langage addons)
something like that: (no success)

Code:
<item> <title>Runplugin test</title>
<link>$doregex[test]</link>
<regex>
<name>test</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc,xbmcaddon,xbmcgui,xbmcplugin,os
 xbmc.executebuiltin("XBMC.RunPlugin(plugin://plugin.video.youtube/special/popular_right_now/)")
]]></expres>
<page></page>
</regex>
</item>

or like that ?

<item> <title>activatewindow test</title>
<link>$doregex[test]</link>
<regex>
<name>test</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc,xbmcaddon,xbmcgui,xbmcplugin,os
 xbmc.executebuiltin("ActivateWindow(10025,'plugin://plugin.video.youtube/special/popular_right_now/',return)")
]]></expres>
<page></page>
</regex>
</item>
 
Last edited:
Status
Not open for further replies.