Remove meme spam
This commit is contained in:
parent
a4de0685a1
commit
ae21297a9d
@ -28,6 +28,7 @@ from planet.spider import filename
|
|||||||
import feedparser
|
import feedparser
|
||||||
log = planet.logger
|
log = planet.logger
|
||||||
options = config.filter_options(sys.argv[0])
|
options = config.filter_options(sys.argv[0])
|
||||||
|
spam = options.get('spam', '').split()
|
||||||
|
|
||||||
MEMES_ATOM = os.path.join(config.output_dir(),'memes.atom')
|
MEMES_ATOM = os.path.join(config.output_dir(),'memes.atom')
|
||||||
|
|
||||||
@ -375,6 +376,7 @@ log.debug("Fetch titles and collect the results")
|
|||||||
from urllib import quote_plus
|
from urllib import quote_plus
|
||||||
for i in range(0,len(weighted_links)):
|
for i in range(0,len(weighted_links)):
|
||||||
weight, link, updated = weighted_links[i]
|
weight, link, updated = weighted_links[i]
|
||||||
|
if link in spam: continue
|
||||||
|
|
||||||
# ensure that somebody new points to this entry. This guards against
|
# ensure that somebody new points to this entry. This guards against
|
||||||
# groups of related links which several posts point to all.
|
# groups of related links which several posts point to all.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user