2012-06-13 85 views
1

我正在做一个应用程序,我想要获取谷歌应用程序的屏幕截图网址。在这里我可以抓住一个特定应用程序的网页,并在该网页屏幕截图的网址里面该div(...)。这个div还包含标题,宽度等,但我只想得到截图的网址。我怎样才能得到截图的网址。 我的应用程序现在显示以下数组。从网页抓取屏幕截图

Array ( 
[0] => src="https://lh5.ggpht.comV07YvaK8lOPyiXOQmC4xTce7VskJzhavKOkEhoMw4KWnFNfOBB8ruIiVmRKhJ6nq8aE=h230" [1] => class="doc-screenshot-img 
[2] => lightbox 
[3] => goog-inline-block"data-baseUrl="https://lh5.ggpht.com/V07YvaK8lOPyiXOQmC4xTce7VskJzhavKOkEhoMw4KWnFNfOBB8ruIiVmRKhJ6nq8aE" 
[4] => title="Angry 
[5] => Birds 
[6] => Space" 
[7] => itemprop="screenshots" 
[8] => />) 
+0

它是ASP.NET但是我相信你会明白的招数http://stackoverflow.com/questions/2715385/convert-webpage-to-image-from- ASP-网 – Yaniv

回答

1

不确定你在这里之后。

尝试(jQuery的)

// Cycle through all screenshots 
$('.doc-screenshot-img')​.each(function() { 
    // Get the URL to the screenshot 
    $(this).attr('src');    
});​