求谷歌 PR查询接口URL校验码Python算法或思路,校验码python,最新的GooglePR查


最新的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/

编橙之家文章,

评论关闭