diff options
| author | Nick Mathewson <nickm@torproject.org> | 2008-11-24 20:06:18 +0000 |
|---|---|---|
| committer | Nick Mathewson <nickm@torproject.org> | 2008-11-24 20:06:18 +0000 |
| commit | 86cb0047c540b656417c073f88e79dada409ddd0 (patch) | |
| tree | 05e6d955ab45bdf780d7dbecf4389ca4f46584f7 | |
| parent | 0b3b5ce961e62b1754986e09b35d512e56472bed (diff) | |
| download | anonbib-86cb0047c540b656417c073f88e79dada409ddd0.tar.gz | |
exclude useless owens.mit.edu urls.
svn:r306
| -rw-r--r-- | rank.py | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -141,6 +141,16 @@ def TestScholarFormat(): assert(getCite("Stop-and-Go MIXes: Providing Probabilistic Anonymity in an Open System", False)[0] > 0) assert(getCite("Mixes protected by Dragons and Pixies: an empirical study", False, save=False)[0] == None) +def urlIsUseless(u): + if u.find("freehaven.net/anonbib/") >= 0: + # Our own cache is not the primary citation for anything. + return True + elif u.find("owens.mit.edu") >= 0: + # These citations only work for 'members of the MIT community'. + return True + else: + return False + URLTYPES=[ "pdf", "ps", "txt", "ps_gz", "html" ] if __name__ == '__main__': @@ -171,10 +181,7 @@ if __name__ == '__main__': if haveOne: continue print ent.key, "has no URLs given." - urls = [ u for u in getPaperURLs(ent['title']) - if u.find("freehaven.net/anonbib") < 0 ] + urls = [ u for u in getPaperURLs(ent['title']) if not urlIsUseless(u) ] for u in urls: print "\t", u - - |
