View Single Post
  #691  
Old 04-04-2017, 01:22 AM
TheUltraLisk TheUltraLisk is offline
Junior Member
 
Join Date: Jul 2016
Posts: 2
TheUltraLisk is on a distinguished road
Default

Re: www.myfreecams.com: How can I record free sex web-cam chat (rtmp:// .flv)


Here is some quick greasemonkey script that gives you livestream URL that you can copy paste into into the cmd and console if you have livestreamer installed.

Code:
// ==UserScript==
// @name        tersttest
// @namespace   ok
// @include     http://www.myfreecams.com/*
// @version     1
// @grant       none
// ==/UserScript==

//alert(11222);


var myVar = setInterval(myTimer, 4000);

function myTimer() 
{
	$('#fvideo').children('param').each(function () {
		var attr = this.getAttribute("name");

		if (attr == "flashvars")
		{
			var lastVideoID = 0;
			var lastRoomID = 0

			var re = /video(\d+)/;
			var re2 = /roomID=(\d+)/;

			var myArray = re.exec(this.value);
			var myArray2 = re2.exec(this.value);

			if (myArray[1])
				var videoID = myArray[1];
			else
				console.error("Unable to get video ID");

			if (myArray2[1])
				var roomID = myArray2[1];
			else
				console.error("Unable to get room ID");


			if ((lastVideoID == videoID) && (lastRoomID == roomID))
			{

			}
			else
			{
				lastVideoID = videoID;
				lastRoomID = roomID;

				if ( $( "#mytest123" ).length ) 
				{

				}
				else
				{
					var para = document.createElement("p");
					para.setAttribute("ID", "mytest123");
					var node = document.createTextNode("");
					para.appendChild(node);
					var aaa = $("#video_controls");
					aaa.append(para);
				}
				var newURL = "livestreamer hlsvariant://http://video" + videoID + ".myfreecams.com:1935/NxServer/ngrp:mfc_" + lastRoomID + ".f4v_mobile/playlist.m3u8";

				// if the URL is new, update it (don't auto update URL as you lose selected text as a user)
				if ($("#mytest123").html() != newURL)
					$("#mytest123").html(newURL);
			}
		}
	});
}
Reply With Quote