|
CookiesSessions can be created from a regex and saved into a cookie file. The cookie jar can be reopened to persist sessions. Cookies can also be appended to the link url and read in regex using <includeheaders>.
There are some sites which stops you login in multi time until the last session expires. This means, for every video that you play, you can't login->get url->play Url etc. You either would need to logout via regex at the end of the video play or keep the session so second video or so on use that same session. <regex> <name>savecookie</name> <expres></expres> <page></page> <cookieJar>save[siteName.lwp]</cookieJar> </regex> Afterwards for the second or third video, you have open the cookie Jar. Example: <regex> <name>LoadCookie</name> <expres></expres> <page>http://www.MySite.com/</page> <cookieJar>open[siteName.lwp]</cookieJar> <ignorecache/> </regex> You could call these regex right after the login to save the cookie and in the begining of second video to load the cookie. It would be better to create an entry to login into perticular site, which does nothing but login and save cookie. and rest of entries from that site should load the cookie and get the page that you want to load. NOTE: I am not providing login code as its different to different sites and you should be able to perform that step ,otherwise you dont need these functions. Use different name for lwp file for each site., dont share these are it would overrite the cookies.
<item> <title>live stream test</title> <link>$doregex[get-page]$doregex[get-initsesion]|Cookie=$get_cookies$&User-Agent=AppleCoreMedia/1.0.0.11B554a (iPhone; U; CPU OS 7_0_4 like Mac OS X; en_gb)&X-Playback-Session-Id=$GUID$</link> <regex> <name>get-initsesion</name> <expres></expres> <page>$doregex[get-page]</page> <agent>AppleCoreMedia/1.0.0.11B554a (iPhone; U; CPU OS 7_0_4 like Mac OS X; en_gb)</agent> <cookieJar></cookieJar> </regex> <regex> <name>get-page</name> <expres>"m3u8_url":"(.*?)"</expres> <page>http://new.livestream.com/popsugar/live</page> <agent>Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53</agent> <cookieJar></cookieJar> </regex> </item> |