Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[ videodb-Bugs-1520726 ] Cover URL isn't working: msg#00027

video.videodb.devel

Subject: [ videodb-Bugs-1520726 ] Cover URL isn't working

Bugs item #1520726, was opened at 2006-07-11 13:07
Message generated for change (Comment added) made by bxmas13
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=586362&aid=1520726&group_id=88349

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: engines
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Sree (sjallipa)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cover URL isn't working

Initial Comment:
When I try to download Cover URL for some of the movies
and do a internet search (using the magnifying glass)
it returns no results almost every time (even for those
that actually VideoDB found before), not sure what the
problem is.
Thanks
Sree

----------------------------------------------------------------------

Comment By: Brian C. (bxmas13)
Date: 2006-09-10 21:32

Message:
Logged In: YES
user_id=1595144

OK last post! Someone already did this fix. It is in the
CVS portion of this site. Just click on the "Download" at
the top of this page:

http://videodb.cvs.sourceforge.net/videodb/videodb/engines/
google.php?view=log

----------------------------------------------------------------------

Comment By: Brian C. (bxmas13)
Date: 2006-09-10 21:26

Message:
Logged In: YES
user_id=1595144

Sorry, updated with no line spaces:


if(preg_match_all('#/imgres\?imgurl=(.+?)&.+?<img src=
(.+?)\swidth=(\d+).+?height=(\d+)#', $resp['data'], $data,
PREG_SET_ORDER)){
foreach ($data as $row) {
$info = array();
$info['title'] = $row[3].'x'.$row[4]; // Width x height
$info['imgsmall'] = $googleServer.$row[2]; // small
thumbnail url
$info['coverurl'] = $row[1]; // resulting target url
$result[] = $info;
}
}


----------------------------------------------------------------------

Comment By: Brian C. (bxmas13)
Date: 2006-09-10 21:19

Message:
Logged In: YES
user_id=1595144

I have it working somewhat. Here is what I did:

Modified /engines/google.php

FIND:
if (preg_match_all('#/imgres\?imgurl=(.+?)&.+?<img src=
(.+?)\swidth=(\d+).+?height=(\d+)#', $resp['data'], $data,
PREG_SET_ORDER))
{
foreach ($data as $row)
{
$info = array();
$info['title'] = $row[3].'x'.$row
[4]; // width x height
$info['imgsmall'] = $googleServer.$row
[2]; // small thumbnail url
$info['coverurl'] = $row
[1]; // resulting target url
$result[] = $info;
}
}


REPLACE WITH:
if (preg_match_all('#,"http:
(.+?)","(.+?)","(.+?)"#', $resp['data'], $data,
PREG_SET_ORDER)){
foreach ($data as $row)
{
$info = array();
$info['title'] = $row[2].'x'.$row
[3]; // width x height
$info['imgsmall'] = "http:".$row[1]; //
small thumbnail url
$info['coverurl'] = "http:".$row
[1]; // resulting target url
$result[] = $info;
}
}


The code isn't 100% perfect, but it works! Comments/Fixes
appreciated.

-Brian




----------------------------------------------------------------------

Comment By: bard_h (bard_h)
Date: 2006-07-11 18:34

Message:
Logged In: YES
user_id=1554022

Google have changed the layout of image result pages. The
image URL is now hidden in JavaScript functions.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=586362&aid=1520726&group_id=88349

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation