|
RawpostSend HTTP POST to web server To give support to Wat TV, so can play some of their channels, but also for other purposes such as posting form content, HTTP/Post can be done with the <post> or <rawpost> element. <item> <title>NT1 channel sample</title> <link>$doregex[get-media]|Cookie=$get_cookies$&X-Forwarded-For=77.132.237.189&User-Agent=Mozilla%2F5.0%20(Windows%20NT%206.1%3B%20rv%3A32.0)%20Gecko%2F20100101%20Firefox%2F32.0</link> <regex> <name>get-media</name> <expres>(http.*440k.*)</expres> <page>$doregex[convert-url]</page> <agent>Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0</agent> <x-forward>77.132.237.189</x-forward> <cookieJar></cookieJar> </regex> <regex> <name>convert-url</name> <expres>$pyFunction:'$doregex[get-url]'.replace('\\/','/')</expres> <page></page> <cookieJar></cookieJar> </regex> <regex> <name>get-url</name> <expres>"(http.*?)"</expres> <page>http://api.wat.tv/services/Delivery</page> <agent>MYTF1 4.1.2 rv:60010000.384 (iPod touch; iPhone OS 6.1.5; fr_FR)</agent> <rawpost>udid=FD6180E5-187C-4981-B23B-8CD2D8A3D8EF&useragent=Mozilla%252F5.0%2B%2528iPhone%253B%2BU%253B%2BCPU%2Blike%2BMac%2BOS%2BX%253B%2Ben%2529%2BAppleWebKit%252FXX%2B%2528KHTML%252C%2Blike%2BGecko%2529&context=WIFI&deviceType=sph&mediaId=L_NT1&appName=sdk%2FIphone%2F1.0&authKey=$doregex[get-token]&method=getLiveUrl</rawpost> <cookieJar></cookieJar> </regex> <regex> <name>get-token</name> <expres>$pyFunction:wattv.getWatToken('L_NT1')</expres> <page></page> </regex> </item> <item> Example 2 for hd1: <item> <title>LiveHD1 channel sample</title> <link>$doregex[get-media]|Cookie=$get_cookies$&X-Forwarded-For=77.132.237.189&User-Agent=Mozilla%2F5.0%20(Windows%20NT%206.1%3B%20rv%3A32.0)%20Gecko%2F20100101%20Firefox%2F32.0</link> <regex> <name>get-media</name> <expres>(http.*896k.*)</expres> <page>$doregex[convert-url]</page> <agent>Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0</agent> <x-forward>77.132.237.189</x-forward> <cookieJar></cookieJar> </regex> <regex> <name>convert-url</name> <expres>$pyFunction:'$doregex[get-url]'.replace('\\/','/')</expres> <page></page> <cookieJar></cookieJar> </regex> <regex> <name>get-url</name> <expres>"(http.*?)"</expres> <page>http://api.wat.tv/services/Delivery</page> <agent>MYTF1 4.1.2 rv:60010000.384 (iPod touch; iPhone OS 6.1.5; fr_FR)</agent> <rawpost>udid=FD6180E5-187C-4981-B23B-8CD2D8A3D8EF&useragent=Mozilla%252F5.0%2B%2528iPhone%253B%2BU%253B%2BCPU%2Blike%2BMac%2BOS%2BX%253B%2Ben%2529%2BAppleWebKit%252FXX%2B%2528KHTML%252C%2Blike%2BGecko%2529&context=WIFI&deviceType=sph&mediaId=L_HD1&appName=sdk%2FIphone%2F1.0&authKey=$doregex[get-token]&method=getLiveUrl</rawpost> <cookieJar></cookieJar> </regex> <regex> <name>get-token</name> <expres>$pyFunction:wattv.getWatToken('L_HD1')</expres> <page></page> </regex> </item> You should be able to get TMC as well, if you just change the media id (replace L_HD1 in two places). Not all channel work like that, its only the ones requiring auth key. For login or form data with rawpost, this explains how the login and cookie regex would work for the following example data:
<item> <title>Sony Mix</title> <link>plugin://plugin.video.f4mTester/?maxbitrate=1500000&streamtype=HLS&url=$doregex[encodedurl]</link> <regex> <name>encodedurl</name> <expres>$pyFunction:urllib.quote_plus('$doregex[get-url]|Cookie=$get_cookies$&User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko&X-Playback-Session-Id=$GUID$$doregex[get-Logout]')</expres> <page></page> </regex> <regex> <name>get-url</name> <expres>blank\^(.*?)\^</expres> <page>http://watchsuntv.com/tv_episodes/system/1.0/framework.php</page> <referer>http://watchsuntv.com/tv_episodes/system/1.0/framework.php?view_name=web_channels</referer> <rawpost>ajax=1&ajaxView=web_channels&view_name=web_channels&t=$epoctime$&action=loadChannel&channelID=170</rawpost> <x-req>XMLHttpRequest</x-req> <cookieJar>$doregex[LoginAndCookie]</cookieJar> </regex> <regex> <name>LoginAndCookie</name> <expres></expres> <page>http://www.watchsuntv.com/users/login</page> <referer>http://www.watchsuntv.com/users/member/index</referer> <x-req>XMLHttpRequest</x-req> <rawpost>amember_login=XXXXXXXX&amember_pass=XXXXXXXX&login_attempt_id=$doregex[LoginAttemptID]&amember_redirect_url=http%3A%2F%2Fwatchsuntv.com%2Fusers%2Fmember</rawpost> <cookieJar></cookieJar> </regex> <regex> <name>LoginAttemptID</name> <expres>login_attempt_id" value="(.*?)"</expres> <page>http://www.watchsuntv.com/users/member/index</page> <referer>http://watchsuntv.com/</referer> <cookieJar></cookieJar> </regex> <regex> <name>get-Logout</name> <expres></expres> <page>http://watchsuntv.com/users/logout</page> <referer>http://watchsuntv.com/tv_episodes/system/1.0/framework.php?view_name=web_channels</referer> <cookieJar></cookieJar> </regex> <thumbnail></thumbnail> </item> |