Reputation: 81
Hi I am trying to get an iframe from wathfree.to.
Here is the code I am using for this purpose:
function getSecondBody(url2)
{
url2 = 'http://www.watchfree.to/watch-366-Forrest-Gump-movie-online-free-putlocker.html';
request(url2, function(err, resp, body)
{
var $ = cheerio.load(body);
var embedcode = $('.links_left_container');
embedcodetext2 = embedcode.html();
console.log(embedcodetext2);
return embedcodetext2;
});
}
But response returned doesn't contain the iframe that I need.
here is the response I am receiving:
while the actual page looks like this:
Only the iframe part is missing in my response.
Upvotes: 1
Views: 2161
Reputation: 1491
view-source:http://www.watchfree.to/watch-366-Forrest-Gump-movie-online-free-putlocker.html
Please take a look the source of the page. There is no iframe. It's generic content. So when you request it, it won't load to DOM.
You need to crawl probably this line if you want openload embed link:
var locations = ["http:\/\/streamin.to\/embed-k2msgp8yhhd8-580x326.html","http:\/\/streamin.to\/embed-cbp8zxw3yo3f-580x326.html","http:\/\/embed.nowvideo.sx\/embed.php?v=2729070a4365a","http:\/\/thevideo.me\/embed-wm815ejm5uvb-580x326.html","https:\/\/estream.to\/embed-6u49dntawgr0.html","http:\/\/thevideo.me\/embed-n14mh2bjj2nz-580x326.html","http:\/\/vidtodo.com\/embed-bmjw5u1e18js.html","http:\/\/vidtodo.com\/embed-z8614uxy1824.html","https:\/\/openload.co\/embed\/xTLPXjSGz7o\/","https:\/\/openload.co\/embed\/F8gJS5Y1o1o\/"];
Upvotes: 2