VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
Thread
  1. Hi all,

    I have been tried everything to get the streaming links from this webpage.

    http://canlitvlive.net

    I get the links so :

    http://yayin02.canlitvlive.org/kanal7/live.m3u8?tkn=gFflhPmtvX3K36LE2F7rfg&tms=1443501526

    But it doesnt work and i dont understand it, why i cant open the links with vlc or kodi ( m3u ).

    I have been aldo tried it with referer so :

    http://yayin02.canlitvlive.org/kanal7/live.m3u8?tkn=gFflhPmtvX3K36LE2F7rfg&tms=1443501...ayer.flash.swf

    is also not possible.

    Maybe any idea, how can i get the links ?

    I have a script and can search the tokens every minutes and can let write it in a m3u file and can so play it with token in kodi. But the links doesnt work, what i get.

    MAny thanks for your helps
    Quote Quote  
  2. Originally Posted by badsector View Post
    Hi all,

    I have been tried everything to get the streaming links from this webpage.

    http://canlitvlive.net

    I get the links so :

    http://yayin02.canlitvlive.org/kanal7/live.m3u8?tkn=gFflhPmtvX3K36LE2F7rfg&tms=1443501526

    But it doesnt work and i dont understand it, why i cant open the links with vlc or kodi ( m3u ).

    I have been aldo tried it with referer so :

    http://yayin02.canlitvlive.org/kanal7/live.m3u8?tkn=gFflhPmtvX3K36LE2F7rfg&tms=1443501...ayer.flash.swf

    is also not possible.

    Maybe any idea, how can i get the links ?

    I have a script and can search the tokens every minutes and can let write it in a m3u file and can so play it with token in kodi. But the links doesnt work, what i get.

    MAny thanks for your helps

    hi
    like here with LiveStreamsPro addon by Shanis you can create a .xml file with regex function to update automaticaly the token
    https://forum.videohelp.com/threads/374405-Is-it-possible-to-generate-a-static-link-4-t...=1#post2412110

    Code:
    <item>
    <title>kanal-7</title>
    <link>$doregex[get-M3U8]</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.canlitvlive.net/izle/kanal-7.html</page>
    </regex>
    </item>
    Quote Quote  
  3. Hi biezom,

    it is working. But what I cant understand ;

    I habe a script with php;

    Code:
    $site_carton = file_get_contents("http://www.canlitvlive.net/izle/cartoon-network.html");
    
    $soru_carton = explode('[{file:"http',$site_carton);
    $soru_carton = explode('"}]}]',$soru_carton[1]);
    
    
    echo "$soru_carton[0]";
    echo"<br />";
    
    $dosya_carton="m3u/cartonlive.m3u";
    $soru_icerik_carton="http" . $soru_carton[0] . "###referer=http://www.canlitvlive.net/jwplayer.flash.swf";
    echo "$soru_icerik_carton";
    @file_put_contents($dosya_carton, $soru_icerik_carton);


    I get the link with this script and write it in a m3u file, to play with Live TV in Kodi or VLC.

    But my link doesnt work, because it is same link ?

    Maybe can check it anyone MY script is working with more sites with tokens. Every 4m. check my script the webpage and get the link and write it in a m3u file, but it doesnt work with this webpage.

    With referer or not, is same.
    Quote Quote  
  4. Originally Posted by badsector View Post
    Hi biezom,

    it is working. But what I cant understand ;

    I habe a script with php;

    Code:
    $site_carton = file_get_contents("http://www.canlitvlive.net/izle/cartoon-network.html");
    
    $soru_carton = explode('[{file:"http',$site_carton);
    $soru_carton = explode('"}]}]',$soru_carton[1]);
    
    
    echo "$soru_carton[0]";
    echo"<br />";
    
    $dosya_carton="m3u/cartonlive.m3u";
    $soru_icerik_carton="http" . $soru_carton[0] . "###referer=http://www.canlitvlive.net/jwplayer.flash.swf";
    echo "$soru_icerik_carton";
    @file_put_contents($dosya_carton, $soru_icerik_carton);


    I get the link with this script and write it in a m3u file, to play with Live TV in Kodi or VLC.

    But my link doesnt work, because it is same link ?

    Maybe can check it anyone MY script is working with more sites with tokens. Every 4m. check my script the webpage and get the link and write it in a m3u file, but it doesnt work with this webpage.

    With referer or not, is same.

    it seems that the site filters the user agent kodi

    so use an external player like mpv or MPC-HC


    or add user agent in the php code

    Code:
    <?php
    $site_carton = file_get_contents("http://www.canlitvlive.net/izle/cartoon-network.html");
    preg_match('/file:"(.*?)"/', $site_carton, $soru_carton);
    $dosya_carton="m3u/cartonlive.m3u";
    $soru_icerik_carton=$soru_carton[1] . "|User-Agent=Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0";
    echo "$soru_icerik_carton\n";
    @file_put_contents($dosya_carton, $soru_icerik_carton);
    ?>
    Last edited by biezom; 29th Sep 2015 at 08:15.
    Quote Quote  
  5. many thanks,

    But I cant get the links from this webpage with same codes.

    http://www.hdtvizle.com/13-show-tv-hd-canli-izle.html

    The really link is also in file :

    What can I do ?
    Code:
    <item>
    <title>kanal-7</title>
    <link>$doregex[get-M3U8]</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.hdtvizle.com/13-show-tv-hd-canli-izle.html</page>
    </regex>
    </item>

    Many thanks.
    Quote Quote  
  6. Originally Posted by badsector View Post
    many thanks,

    But I cant get the links from this webpage with same codes.

    http://www.hdtvizle.com/13-show-tv-hd-canli-izle.html

    The really link is also in file :

    What can I do ?
    Code:
    <item>
    <title>kanal-7</title>
    <link>$doregex[get-M3U8]</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.hdtvizle.com/13-show-tv-hd-canli-izle.html</page>
    </regex>
    </item>

    Many thanks.
    not
    Code:
    <expres>file:"(.*?)"</expres>
    but

    Code:
    <expres>file: "(.*?)"</expres>
    Quote Quote  
  7. I think,

    this is the problem.

    It is 2 time file: inside. First in sources : and second in logo :

    How can i get file : in sources ?

    Code:
    <script type="text/javascript">
        jwplayer("HDtvizle_Player").setup({
            sources: [{
                file: "http://85.111.14.54:1935/showtv/showtv2/playlist.m3u8"
            },{
                file: "http://85.111.14.54:1935/showtv/showtv2/playlist.m3u8"
            }],
            image: "http://www.hdtvizle.com/preview.png",
            title: "Hdtvizle.com - iyi seyirler...",
       	    width: "100%",
       	    aspectratio: "16:9",
            stretching: "exactfit",
            autostart: "true",
            primary: "flash",
    		androidhls: "true",
    		skin: "stormtrooper",
            abouttext: "www.hdtvizle.com",
            aboutlink: "http://www.hdtvizle.com/",
            logo: {
            file: "http://www.hdtvizle.com/tvlogo2.png",
            link: "http://www.hdtvizle.com/",
            },
            sharing: {
            heading: "Bu videoyu paylas!"
        }
        });
    </script>
    Quote Quote  
  8. Originally Posted by badsector View Post
    I think,

    this is the problem.

    It is 2 time file: inside. First in sources : and second in logo :

    How can i get file : in sources ?

    Code:
    <script type="text/javascript">
        jwplayer("HDtvizle_Player").setup({
            sources: [{
                file: "http://85.111.14.54:1935/showtv/showtv2/playlist.m3u8"
            },{
                file: "http://85.111.14.54:1935/showtv/showtv2/playlist.m3u8"
            }],
            image: "http://www.hdtvizle.com/preview.png",
            title: "Hdtvizle.com - iyi seyirler...",
       	    width: "100%",
       	    aspectratio: "16:9",
            stretching: "exactfit",
            autostart: "true",
            primary: "flash",
    		androidhls: "true",
    		skin: "stormtrooper",
            abouttext: "www.hdtvizle.com",
            aboutlink: "http://www.hdtvizle.com/",
            logo: {
            file: "http://www.hdtvizle.com/tvlogo2.png",
            link: "http://www.hdtvizle.com/",
            },
            sharing: {
            heading: "Bu videoyu paylas!"
        }
        });
    </script>
    Code:
    <expres>file: "(.*?)"</expres>
    select the first by default so in this case it's good and it works
    Quote Quote  
  9. Originally Posted by badsector View Post
    many many thanks, it is working.

    Can I get also the f4m links and can let play it in kodi with livestreams ?

    http://stream-03.vty.dailymotion.com/01/dm/1/x31omum/live.isml/live.f4m?e=1443968737&s...7pK_XMDbrxyE8A

    from Webpage :

    http://www.hdtvizle.com/40-besiktas-tv-hd-canli-izle.html
    2 way

    first way HLS protocol (.m3u8)


    Code:
    <item>
    <title>HLS protocol http://www.hdtvizle.com/40-besiktas-tv-hd-canli-izle.html</title>
    <link>$doregex[get-CleanHLSPage]</link>
    <regex>
    <name>get-CleanHLSPage</name>
    <expres>$pyFunction:'$doregex[get-HLSPage]'.replace('\/','/')</expres>
    <page></page>
    </regex>
    <regex>
    <name>get-HLSPage</name>
    <expres>source=.*x-mpegURL","url":"(.*?)"</expres>
    <page>$doregex[get-DM-VidURL]</page>
    <referer>http://www.hdtvizle.com/</referer>
    </regex>
    <regex>
    <name>get-DM-VidURL</name>
    <expres>iframe src="(.*?)"</expres>
    <page>http://www.hdtvizle.com/40-besiktas-tv-hd-canli-izle.html</page>
    </regex>
    </item>


    second HDS protocol (.f4m) need f4mTester addon by shani


    Code:
    <item>
    <title>HDS protocol http://www.hdtvizle.com/40-besiktas-tv-hd-canli-izle.html</title>
    <link>plugin://plugin.video.f4mTester/?url=$doregex[encodedurl]</link>
    <regex>
    <name>encodedurl</name>
    <expres>$pyFunction:urllib.quote_plus('$doregex[get-manifest]')</expres>
    <page></page>
    </regex>
    <regex>
    <name>get-manifest</name>
    <expres>(.*)</expres>
    <page>$doregex[get-CleanHDSPage]&amp;redirect=0</page>
    </regex>
    <regex>
    <name>get-CleanHDSPage</name>
    <expres>$pyFunction:'$doregex[get-HDSPage]'.replace('\/','/')</expres>
    <page></page>
    </regex>
    <regex>
    <name>get-HDSPage</name>
    <expres>source=.*f4m","url":"(.*?)"</expres>
    <page>$doregex[get-DM-VidURL]</page>
    <referer>http://www.hdtvizle.com/</referer>
    </regex>
    <regex>
    <name>get-DM-VidURL</name>
    <expres>iframe src="(.*?)"</expres>
    <page>http://www.hdtvizle.com/40-besiktas-tv-hd-canli-izle.html</page>
    </regex>
    </item>
    Quote Quote  
  10. I will try it with f4m system. MAny thanks,

    Back to the another code :

    Code:
    <item>
    <title>kanal-7</title>
    <link>$doregex[get-M3U8]</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.hdtvizle.com/13-show-tv-hd-canli-izle.html</page>
    </regex>
    </item>
    But for the webpage canlitvlive.net this code is working for the canals :

    http://www.canlitvlive.net/izle/atv.html
    http://www.canlitvlive.net/izle/star-tv.html
    and any more.

    But doesnt work with same code system on same webpage for any canals :

    http://www.canlitvlive.net/izle/halk-tv.html
    http://www.canlitvlive.net/izle/bugun-tv.html
    and any more.

    I use live streams in kodi maybe should I use livestreams pro for this problem or I dont see anything else maybe ?

    Thanks a lot.
    Quote Quote  
  11. Originally Posted by badsector View Post
    I will try it with f4m system. MAny thanks,

    Back to the another code :

    Code:
    <item>
    <title>kanal-7</title>
    <link>$doregex[get-M3U8]</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.hdtvizle.com/13-show-tv-hd-canli-izle.html</page>
    </regex>
    </item>
    But for the webpage canlitvlive.net this code is working for the canals :

    http://www.canlitvlive.net/izle/atv.html
    http://www.canlitvlive.net/izle/star-tv.html
    and any more.

    But doesnt work with same code system on same webpage for any canals :

    http://www.canlitvlive.net/izle/halk-tv.html
    http://www.canlitvlive.net/izle/bugun-tv.html
    and any more.

    I use live streams in kodi maybe should I use livestreams pro for this problem or I dont see anything else maybe ?

    Thanks a lot.


    add user agent


    Code:
    <item>
    <title>http://www.canlitvlive.net/izle/halk-tv.html</title>
    <link>$doregex[get-M3U8]|User-Agent=Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.canlitvlive.net/izle/halk-tv.html</page>
    </regex>
    </item>
    Quote Quote  
  12. many thanks, with user agent is working all channels.

    Thanks a lot.
    Quote Quote  
  13. Hi again,

    I tried get to links from this webpage :

    http://www.cnbce.tv/canli-yayin

    I used everything ;

    get m3u8
    get rtmp
    with user agent and without.

    Can not open it with livestreams
    Quote Quote  
  14. Originally Posted by badsector View Post
    Hi again,

    I tried get to links from this webpage :

    http://www.cnbce.tv/canli-yayin

    I used everything ;

    get m3u8
    get rtmp
    with user agent and without.

    Can not open it with livestreams


    two ways


    Code:
    <item>
    <title>HLS http://www.cnbce.tv/canli-yayin</title>
    <link>$doregex[get-m3u8]|User-Agent=Mozilla/5.0 (Android 4.2; rv:19.0) Gecko/20121129 Firefox/19.0</link>
    <regex>
    <name>get-m3u8</name>
    <expres>mobileUrl : "(.*?)"</expres>
    <page>http://www.cnbce.tv/canli-yayin</page>
    <connection></connection>
    </regex>
    </item>

    Code:
    <item>
    <title>RTMP http://www.cnbce.tv/canli-yayin</title>
    <link>$doregex[get-rtmp] swfUrl=http://img-dygassets.mncdn.com/player2/plugins/flowplayer/flowplayer.commercial-3.2.18.swf</link>
    <regex>
    <name>get-rtmp</name>
    <expres>flashUrl :"(.*?)"</expres>
    <page>http://www.cnbce.tv/canli-yayin</page>
    <connection></connection>
    </regex>
    </item>



    you have the same channel here

    Code:
    http://www.canlitvlive.org/izle/cnbc-e-canli-yayin-izle.html
    thanks for an other user in an other forum for his help
    Last edited by biezom; 3rd Oct 2015 at 13:37. Reason: add connection param
    Quote Quote  
  15. Hi again,

    Many thanks. But it doesnt work with your two ways the links in livestreams. Maybe can you give me a link from this forum, where i can get more information for HLS and HDS.

    What do you mean with help in anotrher forum ?
    Quote Quote  
  16. Originally Posted by badsector View Post
    Hi again,

    Many thanks. But it doesnt work with your two ways the links in livestreams. Maybe can you give me a link from this forum, where i can get more information for HLS and HDS.

    What do you mean with help in anotrher forum ?
    see your PM
    Quote Quote  
  17. Hi biezom,
    Thanks a lot for your answers. They have been very helpful to point me in the right direction of a similar problem I am still having.

    I wanted to see some channels from canlitvlive.net either in VLC or in Kodi. So let me go step by step. For the next examples, let´s assume that in the example, the parameters "tkn" and "tms" are the correct ones.

    ===== VLC =====

    I managed to solve the VLC problem, but not exactly in the way described above. Instead, I open VLC and go to
    MEDIA - OPEN NETWORK STREAM - SHOW MORE OPTIONS
    There, I input the following

    Code:
    URL:
    http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050
    EDIT OPTIONS:    
    :http-user-agent="Mozilla/5.0"
    I only managed to have it working in this way. It never worked by appending |Mozilla/5.0 to the URL.

    ===== KODI =====

    I have tried with two ways, with a regular .strm playlist and with a .xml file for LivestreamsPro.

    ===== KODI: strm playlist =====

    My playlist includes two items, one with the url encoded:

    Code:
    #EXTM3U
    #EXTINF:-1, Fox URL encode
    #EXTVLCOPT:http-user-agent=foobar
    http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0
    #EXTINF:-1, Fox no URL encode
    http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0
    None of them works when I try to play them. I get this log in kodi.log

    Code:
    19:54:35 T:1961340928   ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0
    19:54:35 T:1961340928  NOTICE: DVDPlayer: Opening: http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0
    19:54:35 T:1961340928 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
    19:54:35 T:1556083728  NOTICE: Thread DVDPlayer start, auto delete: false
    19:54:35 T:1556083728  NOTICE: Creating InputStream
    19:54:36 T:1556083728   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    19:54:36 T:1556083728  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
    19:54:36 T:1556083728   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    19:54:36 T:1556083728   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
    19:54:36 T:1556083728   ERROR: Open - failed to open source <http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0>
    19:54:36 T:1556083728  NOTICE: Creating Demuxer
    19:54:36 T:1556083728   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_about.me	FALSE	/	TRUE	0	pumpkinhead	'
    19:54:36 T:1556083728   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_.tmdb.org	TRUE	/	FALSE	1478624293	__cfd	'
    19:54:36 T:1556083728   ERROR: OpenDemuxStream - Error creating demuxer
    19:54:36 T:1556083728  NOTICE: CDVDPlayer::OnExit()
    19:54:36 T:1961340928   ERROR: Playlist Player: skipping unplayable item: 0, path [http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0]
    19:54:37 T:1961340928   ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0
    19:54:37 T:1961340928  NOTICE: CDVDPlayer::CloseFile()
    19:54:37 T:1961340928  NOTICE: DVDPlayer: waiting for threads to exit
    19:54:37 T:1961340928  NOTICE: DVDPlayer: finished waiting
    19:54:37 T:1961340928  NOTICE: DVDPlayer: Opening: http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0
    19:54:37 T:1556083728  NOTICE: Thread DVDPlayer start, auto delete: false
    19:54:37 T:1556083728  NOTICE: Creating InputStream
    19:54:38 T:1556083728   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    19:54:38 T:1556083728  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
    19:54:38 T:1556083728   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    19:54:38 T:1556083728   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
    19:54:38 T:1556083728   ERROR: Open - failed to open source <http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0>
    19:54:38 T:1556083728  NOTICE: Creating Demuxer
    19:54:38 T:1556083728   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_about.me	FALSE	/	TRUE	0	pumpkinhead	'
    19:54:38 T:1556083728   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_.tmdb.org	TRUE	/	FALSE	1478624293	__cfd	'
    19:54:38 T:1556083728   ERROR: OpenDemuxStream - Error creating demuxer
    19:54:38 T:1556083728  NOTICE: CDVDPlayer::OnExit()
    19:54:38 T:1961340928   ERROR: Playlist Player: skipping unplayable item: 1, path [http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0]
    19:54:38 T:1961340928  NOTICE: CDVDPlayer::CloseFile()
    19:54:38 T:1961340928  NOTICE: DVDPlayer: waiting for threads to exit
    19:54:38 T:1961340928  NOTICE: DVDPlayer: finished waiting
    19:54:38 T:1961340928  NOTICE: CDVDPlayer::CloseFile()
    19:54:38 T:1961340928  NOTICE: DVDPlayer: waiting for threads to exit
    19:54:38 T:1961340928  NOTICE: DVDPlayer: finished waiting
    ===== KODI: xml playlist for LivestreamsPro =====

    It also does not work. This is the xml file I used:

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <items>
    <item>
    <title>Fox</title>
    <link>$doregex[get-M3U8]|User-Agent=Mozilla/5.0</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.canlitvlive.net/izle/fox-tv.html</page>
    <agent>Mozilla/5.0</agent>
    </regex>
    </item>
    </items>
    This is the log from Kodi. It looks like the final URL that is extracted from the regular expresion is OK, but there is a strange error (22) and the (403), as if the URL access were denied.

    Code:
    22:37:31 T:1581249552  NOTICE: file:"(.*?)"
    22:37:31 T:1581249552  NOTICE: final url
    22:37:31 T:1581249552  NOTICE: http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050|User-Agent=Mozilla/5.0
    22:37:31 T:1961340928   ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050|User-Agent=Mozilla/5.0
    22:37:31 T:1961340928  NOTICE: DVDPlayer: Opening: http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050|User-Agent=Mozilla/5.0
    22:37:31 T:1961340928 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
    22:37:31 T:1581249552  NOTICE: Thread DVDPlayer start, auto delete: false
    22:37:31 T:1581249552  NOTICE: Creating InputStream
    22:37:32 T:1581249552   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    22:37:32 T:1581249552  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
    22:37:32 T:1581249552   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    22:37:32 T:1581249552   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
    22:37:32 T:1581249552   ERROR: Open - failed to open source <http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050|User-Agent=Mozilla/5.0>
    22:37:32 T:1581249552  NOTICE: Creating Demuxer
    22:37:32 T:1581249552   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_about.me	FALSE	/	TRUE	0	pumpkinhead	'
    22:37:32 T:1581249552   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_.tmdb.org	TRUE	/	FALSE	1478212220	__cfd	'
    22:37:32 T:1581249552   ERROR: OpenDemuxStream - Error creating demuxer
    22:37:32 T:1581249552  NOTICE: CDVDPlayer::OnExit()
    22:37:32 T:1961340928   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.live.streamspro/?url=%24doregex%5Bget-M3U8%5D%7CUser-Agent%3DMozilla%2F5.0&mode=17&regexs=%7Bu%27get-M3U8%27%3A%20%7B%27expres%27%3A%20u%27file%3A%22%28.%2A%3F%29%22%27%2C%20%27name%27%3A%20u%27get-M3U8%27%2C%20%27agent%27%3A%20u%27Mozilla/5.0%27%2C%20%27page%27%3A%20u%27http%3A//www.canlitvlive.net/izle/fox-tv.html%27%7D%7D]
    22:37:32 T:1961340928  NOTICE: CDVDPlayer::CloseFile()

    Sorry for the super long post but I wanted to be very specific of the case in order to facilitate potential answers.
    Any guidance is much appreciated!
    Thanks again,
    R.
    Quote Quote  
  18. Originally Posted by marabelec View Post
    Hi biezom,
    Thanks a lot for your answers. They have been very helpful to point me in the right direction of a similar problem I am still having.

    I wanted to see some channels from canlitvlive.net either in VLC or in Kodi. So let me go step by step. For the next examples, let´s assume that in the example, the parameters "tkn" and "tms" are the correct ones.

    ===== VLC =====

    I managed to solve the VLC problem, but not exactly in the way described above. Instead, I open VLC and go to
    MEDIA - OPEN NETWORK STREAM - SHOW MORE OPTIONS
    There, I input the following

    Code:
    URL:
    http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050
    EDIT OPTIONS:    
    :http-user-agent="Mozilla/5.0"
    I only managed to have it working in this way. It never worked by appending |Mozilla/5.0 to the URL.

    ===== KODI =====

    I have tried with two ways, with a regular .strm playlist and with a .xml file for LivestreamsPro.

    ===== KODI: strm playlist =====

    My playlist includes two items, one with the url encoded:

    Code:
    #EXTM3U
    #EXTINF:-1, Fox URL encode
    #EXTVLCOPT:http-user-agent=foobar
    http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0
    #EXTINF:-1, Fox no URL encode
    http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0
    None of them works when I try to play them. I get this log in kodi.log

    Code:
    19:54:35 T:1961340928   ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0
    19:54:35 T:1961340928  NOTICE: DVDPlayer: Opening: http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0
    19:54:35 T:1961340928 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
    19:54:35 T:1556083728  NOTICE: Thread DVDPlayer start, auto delete: false
    19:54:35 T:1556083728  NOTICE: Creating InputStream
    19:54:36 T:1556083728   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    19:54:36 T:1556083728  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
    19:54:36 T:1556083728   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    19:54:36 T:1556083728   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
    19:54:36 T:1556083728   ERROR: Open - failed to open source <http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0>
    19:54:36 T:1556083728  NOTICE: Creating Demuxer
    19:54:36 T:1556083728   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_about.me	FALSE	/	TRUE	0	pumpkinhead	'
    19:54:36 T:1556083728   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_.tmdb.org	TRUE	/	FALSE	1478624293	__cfd	'
    19:54:36 T:1556083728   ERROR: OpenDemuxStream - Error creating demuxer
    19:54:36 T:1556083728  NOTICE: CDVDPlayer::OnExit()
    19:54:36 T:1961340928   ERROR: Playlist Player: skipping unplayable item: 0, path [http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla%2F5.0]
    19:54:37 T:1961340928   ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0
    19:54:37 T:1961340928  NOTICE: CDVDPlayer::CloseFile()
    19:54:37 T:1961340928  NOTICE: DVDPlayer: waiting for threads to exit
    19:54:37 T:1961340928  NOTICE: DVDPlayer: finished waiting
    19:54:37 T:1961340928  NOTICE: DVDPlayer: Opening: http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0
    19:54:37 T:1556083728  NOTICE: Thread DVDPlayer start, auto delete: false
    19:54:37 T:1556083728  NOTICE: Creating InputStream
    19:54:38 T:1556083728   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    19:54:38 T:1556083728  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
    19:54:38 T:1556083728   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    19:54:38 T:1556083728   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
    19:54:38 T:1556083728   ERROR: Open - failed to open source <http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0>
    19:54:38 T:1556083728  NOTICE: Creating Demuxer
    19:54:38 T:1556083728   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_about.me	FALSE	/	TRUE	0	pumpkinhead	'
    19:54:38 T:1556083728   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_.tmdb.org	TRUE	/	FALSE	1478624293	__cfd	'
    19:54:38 T:1556083728   ERROR: OpenDemuxStream - Error creating demuxer
    19:54:38 T:1556083728  NOTICE: CDVDPlayer::OnExit()
    19:54:38 T:1961340928   ERROR: Playlist Player: skipping unplayable item: 1, path [http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=Kf9drpv8LwNg87WKUP4xuw&tms=1447030899|User-Agent=Mozilla/5.0]
    19:54:38 T:1961340928  NOTICE: CDVDPlayer::CloseFile()
    19:54:38 T:1961340928  NOTICE: DVDPlayer: waiting for threads to exit
    19:54:38 T:1961340928  NOTICE: DVDPlayer: finished waiting
    19:54:38 T:1961340928  NOTICE: CDVDPlayer::CloseFile()
    19:54:38 T:1961340928  NOTICE: DVDPlayer: waiting for threads to exit
    19:54:38 T:1961340928  NOTICE: DVDPlayer: finished waiting
    ===== KODI: xml playlist for LivestreamsPro =====

    It also does not work. This is the xml file I used:

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <items>
    <item>
    <title>Fox</title>
    <link>$doregex[get-M3U8]|User-Agent=Mozilla/5.0</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.canlitvlive.net/izle/fox-tv.html</page>
    <agent>Mozilla/5.0</agent>
    </regex>
    </item>
    </items>
    This is the log from Kodi. It looks like the final URL that is extracted from the regular expresion is OK, but there is a strange error (22) and the (403), as if the URL access were denied.

    Code:
    22:37:31 T:1581249552  NOTICE: file:"(.*?)"
    22:37:31 T:1581249552  NOTICE: final url
    22:37:31 T:1581249552  NOTICE: http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050|User-Agent=Mozilla/5.0
    22:37:31 T:1961340928   ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050|User-Agent=Mozilla/5.0
    22:37:31 T:1961340928  NOTICE: DVDPlayer: Opening: http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050|User-Agent=Mozilla/5.0
    22:37:31 T:1961340928 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
    22:37:31 T:1581249552  NOTICE: Thread DVDPlayer start, auto delete: false
    22:37:31 T:1581249552  NOTICE: Creating InputStream
    22:37:32 T:1581249552   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    22:37:32 T:1581249552  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
    22:37:32 T:1581249552   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
    22:37:32 T:1581249552   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
    22:37:32 T:1581249552   ERROR: Open - failed to open source <http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=pTXg2OBIO8RUqO-IIbKbvg&tms=1447033050|User-Agent=Mozilla/5.0>
    22:37:32 T:1581249552  NOTICE: Creating Demuxer
    22:37:32 T:1581249552   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_about.me	FALSE	/	TRUE	0	pumpkinhead	'
    22:37:32 T:1581249552   ERROR: CCurlFile::GetCookies - invalid cookie: '#HttpOnly_.tmdb.org	TRUE	/	FALSE	1478212220	__cfd	'
    22:37:32 T:1581249552   ERROR: OpenDemuxStream - Error creating demuxer
    22:37:32 T:1581249552  NOTICE: CDVDPlayer::OnExit()
    22:37:32 T:1961340928   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.live.streamspro/?url=%24doregex%5Bget-M3U8%5D%7CUser-Agent%3DMozilla%2F5.0&mode=17&regexs=%7Bu%27get-M3U8%27%3A%20%7B%27expres%27%3A%20u%27file%3A%22%28.%2A%3F%29%22%27%2C%20%27name%27%3A%20u%27get-M3U8%27%2C%20%27agent%27%3A%20u%27Mozilla/5.0%27%2C%20%27page%27%3A%20u%27http%3A//www.canlitvlive.net/izle/fox-tv.html%27%7D%7D]
    22:37:32 T:1961340928  NOTICE: CDVDPlayer::CloseFile()

    Sorry for the super long post but I wanted to be very specific of the case in order to facilitate potential answers.
    Any guidance is much appreciated!
    Thanks again,
    R.

    hi

    try without user-agent

    Code:
    <item>
    <title>Fox</title>
    <link>$doregex[get-M3U8]</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.canlitvlive.net/izle/fox-tv.html</page>
    </regex>
    </item>

    Click image for larger version

Name:	00fox.png
Views:	1834
Size:	186.8 KB
ID:	34429
    Quote Quote  
  19. hi

    try without user-agent

    Code:
    <item>
    <title>Fox</title>
    <link>$doregex[get-M3U8]</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.canlitvlive.net/izle/fox-tv.html</page>
    </regex>
    </item>

    Hi, thanks for the answer.
    I have tried without user agent but no luck.

    Which version of Kodi are you using? Any other ideas why it is not working? (maybe geoblocking?)
    Quote Quote  
  20. Ok, I think I am narrowing down the problem.
    My Kodi is running in a Raspberry Pi 2 (using Raspbian).
    If I extract the stream URL (e.g. http://yayin8.canlitvlive.net/foxtv/live.m3u8?tkn=LQJ_l2n4nC0440EvDRd9ig&tms=1447940605)
    - in Windows browser, it gives me the option to open it in VLC.
    - in the Raspbian browser, directly I get the error "403 Forbidden nginx/1.7.4"

    Is it possible that they are filtering by OS?
    Is there any way to change that, in the same way we manipulate the user agent?ç

    Thanks!
    Quote Quote  
  21. SOLVED IT!
    It must have been a problem with IP blocking (not geoblocking).
    I was accessing with my VPN from a particular server. I changed the VPN server and now it´s working.
    Again, thank you very much for your support.
    Quote Quote  
  22. hi

    anyone knows where i put the xml file and how to create one
    im a newbie so this is my first time with kodi if any step by step explanation giving would hep me a lot

    thanks
    Quote Quote  
  23. i tried putting the regex script in to items.xml
    its this script
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <item>
    <title>kanal-7</title>
    <link>$doregex[get-M3U8]</link>
    <regex>
    <name>get-M3U8</name>
    <expres>file:"(.*?)"</expres>
    <page>http://www.canlitvlive.net/izle/kanal-7.html</page>
    </regex>
    </item>
    but im getting live streams pro we failed with error code 404
    this is my log if anyone can help me out
    21:32:06 T:2316 NOTICE: Thread LanguageInvoker start, auto delete: false
    21:32:06 T:2316 NOTICE: -->Python Interpreter Initialized<--
    21:32:06 T:2316 NOTICE: CommonFunctions-2.5.1
    21:32:06 T:508 NOTICE: Thread BackgroundLoader start, auto delete: false
    21:32:08 T:4236 NOTICE: Thread LanguageInvoker start, auto delete: false
    21:32:08 T:4236 NOTICE: -->Python Interpreter Initialized<--
    21:32:08 T:4236 NOTICE: CommonFunctions-2.5.1
    21:32:11 T:4236 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
    Error Type: <type 'exceptions.TypeError'>
    Error Contents: expected string or buffer
    Traceback (most recent call last):
    File "C:\Users\pascal\AppData\Roaming\Kodi\addons\plugin.video.live.streamspro\default.py", line 2726, in <module>
    get_xml_database(url, True)
    File "C:\Users\pascal\AppData\Roaming\Kodi\addons\plugi n.video.live.streamspro\default.py", line 242, in get_xml_database
    soup = BeautifulSoup(makeRequest(url), convertEntities=BeautifulSoup.HTML_ENTITIES)
    File "C:\Users\pascal\AppData\Roaming\Kodi\addons\scrip t.module.beautifulsoup\lib\BeautifulSoup.py", line 1522, in __init__
    BeautifulStoneSoup.__init__(self, *args, **kwargs)
    File "C:\Users\pascal\AppData\Roaming\Kodi\addons\scrip t.module.beautifulsoup\lib\BeautifulSoup.py", line 1147, in __init__
    self._feed(isHTML=isHTML)
    File "C:\Users\pascal\AppData\Roaming\Kodi\addons\scrip t.module.beautifulsoup\lib\BeautifulSoup.py", line 1171, in _feed
    smartQuotesTo=self.smartQuotesTo, isHTML=isHTML)
    File "C:\Users\pascal\AppData\Roaming\Kodi\addons\scrip t.module.beautifulsoup\lib\BeautifulSoup.py", line 1773, in __init__
    self._detectEncoding(markup, isHTML)
    File "C:\Users\pascal\AppData\Roaming\Kodi\addons\scrip t.module.beautifulsoup\lib\BeautifulSoup.py", line 1918, in _detectEncoding
    '^<\?.*encoding=[\'"](.*?)[\'"].*\?>').match(xml_data)
    TypeError: expected string or buffer
    -->End of Python script error report<--
    21:32:11 T:4008 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.live.streamspro/?fanart=C%3a%5cUsers%5cpascal%5cAppData%5cRoaming% 5cKodi%5caddons%5cplugin.video.live.streamspro%5cf anart.jpg&mode=15&name=XML%20Database&url=http%3a% 2f%2fxbmcplus.xb.funpic.de%2fwww-data%2ffilesystem%2f
    21:32:11 T:4008 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.live.streamspro/?fanart=C%3a%5cUsers%5cpascal%5cAppData%5cRoaming% 5cKodi%5caddons%5cplugin.video.live.streamspro%5cf anart.jpg&mode=15&name=XML%20Database&url=http%3a% 2f%2fxbmcplus.xb.funpic.de%2fwww-data%2ffilesystem%2f) failed
    21:32:11 T:3820 NOTICE: Thread LanguageInvoker start, auto delete: false
    21:32:11 T:3820 NOTICE: -->Python Interpreter Initialized<--
    21:32:11 T:3820 NOTICE: CommonFunctions-2.5.1
    21:32:11 T:4508 NOTICE: Thread BackgroundLoader start, auto delete: false
    Last edited by boss100; 24th Feb 2016 at 02:20.
    Quote Quote  
  24. ignore my above post i figured out how it workd
    but any help how to get the stream from this site
    http://iptv-planet.com/mbc2.php

    i tried everything but it seems its not working i want ot play this with kodi in iptv simple client or livestream pro
    Quote Quote  
  25. Originally Posted by boss100 View Post
    ignore my above post i figured out how it workd
    but any help how to get the stream from this site
    http://iptv-planet.com/mbc2.php

    i tried everything but it seems its not working i want ot play this with kodi in iptv simple client or livestream pro
    hi
    code for livestream pro
    Code:
    <item>
    <title>http://iptv-planet.com/mbc2.php</title>
    <link>rtmp://web3.iptv-planet.com:1937/live2 app=live2 swfUrl=http://embed.iptv-planet.com/swfs/player.swf pageUrl=http://embed.iptv-planet.com/embed.php?id=Hi_mbc2 live=1 playpath=$doregex[get-playpath] flashVer=LNX\2019,0,0,207 swfVfy=1</link>
    <regex>
    <name>get-playpath</name>
    <expres>'file': '(.*?)'</expres>
    <page>http://embed.iptv-planet.com/embed.php?id=Hi_mbc2</page>
    <agent>Mozilla/5.0 (X11; Linux i686; rv:42.0) Gecko/20100101 Firefox/42.0 Iceweasel/42.0</agent>
    <referer>http://iptv-planet.com</referer>
    </regex>
    <thumbnail></thumbnail>
    </item>
    Quote Quote  
  26. thanks a lot biezom it worked.

    i only need 2 more regex code to work with
    http://karwan.tv/kurdistan24-tv.html

    and for
    https://www.filmon.com/channel/rotana-classic

    i tried some script but its not working
    any help would be great
    thanks in advance
    Quote Quote  
  27. Originally Posted by boss100 View Post
    thanks a lot biezom it worked.

    i only need 2 more regex code to work with
    http://karwan.tv/kurdistan24-tv.html

    and for
    https://www.filmon.com/channel/rotana-classic

    i tried some script but its not working
    any help would be great
    thanks in advance

    Code:
    <item>
    <title>kurdistan24-tv</title> 
    <link>$doregex[get-m3u8-referer]</link>
    
    <regex>
    <name>get-m3u8-referer</name>
    <expres><![CDATA[#$pyFunction
    def GetLSProData(page_data,Cookie_Jar,m):
     import requests
     import re
    
     headers = {'User-Agent': 'python-requests/2.9.1','Referer': 'http://karwan.tv/kurdistan24-tv.html'}
     source = requests.get('http://karwan.tv/live/kurdistan24-tv/kurdistan24-tv.php', headers=headers)
     streamfn = re.findall('file:.*?\n.*?file: (.*?)\(', source.text)[0]
    
     formula1 = re.search(r'function ' + streamfn + '.*\n.*\[(.*?)\].join.*?\+ (.*?).join.*?ById\("(.*?)"', source.text)
    
     par1 = formula1.group(1).replace('\"', '').replace(',', '').replace('\\/', '/')
     
     prepar2 = re.findall('var ' + formula1.group(2) + '.*?\[(".*?)\]', source.text)[0]
     par2 = prepar2.replace('\"', '').replace(',', '').replace('\\/', '/')
     par3 = re.findall('id=' + formula1.group(3) + '>(.*?)<', source.text)[0]
     finalm3u8= par1 + par2 +par3
    
     m3u8_referer_agent = par1 + par2 + par3 + '|Referer=http://p.jwpcdn.com/6/12/jwplayer.flash.swf&User-Agent=python-requests/2.9.1'
    
     return m3u8_referer_agent
    
    ]]></expres>
    <page></page>
    </regex>
    </item>
    Code:
    <item>
    <title>https://www.filmon.com/channel/rotana-classic</title>
    <link>$doregex[get-rtmp]</link>
    
    <regex>
    <name>get-rtmp</name>
    <expres><![CDATA[#$pyFunction
    def GetLSProData(page_data,Cookie_Jar,m):
    
     import requests
     import re
    
     pageUrl='https://www.filmon.com/channel/rotana-classic'
     headers = {'User-Agent': 'python-requests/2.9.0'}
     source = requests.get(pageUrl, headers=headers)
     cookie1 = source.cookies['PHPSESSID']
     cookie2 = source.cookies['ftv_token']
     cookie = {'PHPSESSID': cookie1, 'ftv_token': cookie2, 'ftv_defq': 'hd', 'flash-player-type': 'rtmp'}
     headers = {'User-agent': 'Mozilla/5.0', 'X-Requested-With': 'XMLHttpRequest'}
     r2 = requests.post("http://www.filmon.com/ajax/getChannelInfo", headers = headers, data={'channel_id' : '2609'}, cookies=cookie)
     url = re.findall('high","url":"(.*?)"', r2.text)[0]
     cleanurl = url.replace('\\/','/')
     rtmp = re.findall('(rtmp.*)\?', cleanurl)[0]
     app = re.findall('(live/.*)', cleanurl)[0]
    
     final = rtmp + ' app=' + app + ' swfUrl=' + 'http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf' + ' pageUrl=' + 'https://www.filmon.com/channel/rotana-classic' + ' playpath=' + '2609.high.stream' + ' live=1'
    
     return final
    
    ]]></expres>
    <page></page>
    </regex>
    </item>
    Quote Quote  
  28. you my man are a expert in regex, they both worked.

    i appreciate your help thank you.
    Quote Quote  
  29. both two codes work for a few second then the stream stops.
    any idea what could be wrong.
    Last edited by boss100; 25th Feb 2016 at 10:14.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!