最新的GooglePR查询接口:http://toolbarqueries.google.com/tbr?client=navclient-auto&ch={gchecksum}&features=Rank&q=info:{url|encode}
下面是Python的gchecksum(&ch)算法,看着晕乎乎的,求指导。
GPR_HASH_SEED = "Mining PageRank is AGAINST GOOGLE'S TERMS OF SERVICE. Yes, I'm talking to you, scammer."
def google_hash(value):
magic = 0x1020345
for i in xrange(len(value)):
magic ^= ord(GPR_HASH_SEED[i % len(GPR_HASH_SEED)]) ^ ord(value[i])
magic = (magic >> 23 | magic << 9) & 0xFFFFFFFF
return "8%08x" % (magic)
出处链接:http://james.slaterspage.com/scraping-google-related-with-bonus-pagerank/