【问题标题】:Grab the screenshot url from web page从网页中获取屏幕截图 url
【发布时间】:2012-06-16 02:17:52
【问题描述】:

我正在做一个应用程序,我想在其中获取谷歌应用程序的屏幕截图 url。在这里我可以抓取特定应用程序的网页,并且在该页面中,屏幕截图 url 位于 div 内(...) .这个 div 还包含标题、宽度等。但我只想获取屏幕截图 url。如何获取屏幕截图 url。 我的应用程序现在显示以下数组。

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] => />) 

【问题讨论】:

标签: php


【解决方案1】:

不知道你到底想要什么。

试试(jQuery)

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

【讨论】:

    猜你喜欢
    • 2010-10-12
    • 2010-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-01
    • 1970-01-01
    相关资源
    最近更新 更多