Scraper now dislikes sprite images

This commit is contained in:
Mike
2009-04-10 12:23:28 -07:00
parent f45011496f
commit 486ed581a1
2 changed files with 8 additions and 3 deletions

View File

@@ -201,6 +201,11 @@ class Scraper:
log.debug('ignore dimensions %s' % image_url)
continue
#penalize images with "sprite" in their name
if 'sprite' in image_url.lower():
log.debug('penalizing sprite %s' % image_url)
area /= 10
if area > max_area:
max_area = area
max_url = image_url
@@ -324,7 +329,7 @@ scrapers = {'youtube.com': YoutubeScraper,
'metacafe.com': MetacafeScraper}
def test():
from r2.lib.pool2 import WorkQueue
#from r2.lib.pool2 import WorkQueue
jobs = []
f = open('/tmp/testurls.txt')
for url in f:

View File

@@ -765,7 +765,7 @@ a.star { text-decoration: none; color: #ff8b60 }
.linkcompressed .score.likes { color: #FF8B60; }
.linkcompressed .score.dislikes { color: #9494FF; }
.linkcompressed .rank {
margin-top: 2px;
margin-top: 3px;
float:left;
color: #c6c6c6;
font-family: arial;
@@ -780,7 +780,7 @@ a.star { text-decoration: none; color: #ff8b60 }
.linkcompressed .entry .buttons li.first {padding-left: .5em;}
.linkcompressed .entry .buttons li a {
padding: 0 2px;
background-color: #f1f1f1;
background-color: #f2f2f2;
font-weight: bold
}