Exclude spam links from mememe results
Ben Welsh
ben.welsh at gmail.com
Mon Apr 21 01:49:59 EST 2008
Thanks Sam. I'll give it a hack!
Another mememe bug. If I feed in multiple Delicious feeds, when multiple
people link the same third-party page, the second one will replace the first
one. My hope is that they'd instead redouble each other and push it up the
meme poll. Know what I mean?
Here's the link: news.palewire.com
On Sun, Apr 20, 2008 at 4:01 AM, Sam Ruby <rubys at intertwingly.net> wrote:
> Ben Welsh wrote:
>
> > Hey,
> >
> > i'm curious if anyone can help me exclude specific links from mememe
> > compliation. An example would be self-promotional links that a site includes
> > with every post.
> >
>
> I haven't tested it, but a change like the one listed at the bottom of
> this email would probably meet your needs. If you get something that you
> can verify works for you, I'll gladly add it to my repository.
>
> Usage would be something like the following:
>
> [mememe.plugin]
> spam:
> http://foo.org/
> http://bar.com/
>
> - Sam Ruby
>
> === modified file 'filters/mememe.plugin'
> --- filters/mememe.plugin 2008-02-05 01:27:05 +0000
> +++ filters/mememe.plugin 2008-04-20 10:59:51 +0000
> @@ -28,6 +28,7 @@
> import feedparser
> log = planet.logger
> options = config.filter_options(sys.argv[0])
> +spam = options.get('spam', '').split()
>
> MEMES_ATOM = os.path.join(config.output_dir(),'memes.atom')
>
> @@ -375,6 +376,7 @@
> from urllib import quote_plus
> for i in range(0,len(weighted_links)):
> weight, link, updated = weighted_links[i]
> + if link in spam: continue
>
> # ensure that somebody new points to this entry. This guards against
> # groups of related links which several posts point to all.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /archives/devel/attachments/20080420/6673b719/attachment.htm
More information about the devel
mailing list