Recent Changes - Search:

LiveStreamsPro

PmWiki

pmwiki.org

edit SideBar

Headers

HTTP request headers are supported for regex blocks and for the final url inside the link element

Headers for final url are already natively supported by xbmc/kodi via the pipe | sign, so the syntax would be http://UrlToTheMedia|Header1=Values1&Header2=Value2.

So in the link element the syntax would be <link>http://UrlToTheMedia|X-Forwarded-For=IpAddress</link>

However, in the regex section, you have to add for example the x-forward and referer tags like this:
Example:

<regex>
  <name>get-page</name>
  <expres>"m3u8_url":"(.*?)"</expres>
  <page>http://WebpageAddress.com</page>
  <x-forward>1.1.1.2</x-forward>
  <referer>http://myref.com</referer>
  <agent />
  <accept />
</regex>



HTTP response headers are also supported in the page response using the includeheaders directive



Following is the sample which returns the fill html, its not playable as it just demostrate that how you can get the header and create cookie. The log file should tell the full html.
The format will be like:
$$HEADERS_START$$:HEADERNAME:HEADERVALUE
HEADERNAME:HEADERVALUE
HEADERNAME:HEADERVALUE
HEADERNAME:HEADERVALUE
$$HEADERS_END$$:


The problem is accept Header which they are checking and returning blank, so LSPRO passes the accept param like this in the regex:
<accept>*/*</accept>

Example 1:

<item>
    <title>testing headers</title>
    <link>$doregex[getPage]</link>
    <regex>
        <name>getPage</name>
        <expres />
        <page>http://torrent-tv.ru/torrent-online.php?translation=11642</page>
        <setcookie>BHC=$doregex[getCookie]</setcookie>
        <referer>http://torrent-tv.ru/torrent-online.php?translation=11642</referer>
    </regex>
    <regex>
        <name>getCookie</name>
        <expres>x-bh-token:(.*?)\s</expres>
        <page>http://torrent-tv.ru/banhammer/pid</page>
        <includeheaders></includeheaders>
    </regex>
</item>

Example 2:
<item>
    <title>Movistar F1</title>
    <link>plugin://plugin.video.p2p-streams/?url=$doregex[hash]&amp;mode=1&amp;name=acestream+title</link>
    <regex>
        <name>hash</name>
        <expres>this.loadPlayer."(.*?)"</expres>
        <page>http://torrent-tv.ru/torrent-online.php?translation=11642</page>
        <setcookie>BHC=$doregex[getCookie]</setcookie>
        <referer>http://torrent-tv.ru/torrent-online.php?translation=11642</referer>
    </regex>
    <regex>
        <name>getCookie</name>
        <expres>x-bh-token:(.*?)\s</expres>
        <page>http://torrent-tv.ru/banhammer/pid</page>
        <includeheaders></includeheaders>
    </regex>
    <thumbnail></thumbnail>
</item>

Edit - History - Print - Recent Changes - Search
Page last modified on June 03, 2016, at 08:27 AM
Free Web Hosting