2012-06-13 144 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');    
});​