0

I have large amount of locally stored Google search results for wide variety of search queries about my business so that at the end of the month I can do aggregate about where my website stands for those wide variety of search queries. I tried to use

djangosnippets.org/snippets/221/

but that does not look to be working. I am no where close to it. Is there a better way to do this ?

Note:

  1. I have all the search results store as html pages in a directory!
  2. I have a cronjob running daily to fetch the html page of the result generated
Venkateshwaran Selvaraj
  • 1,745
  • 8
  • 30
  • 60

1 Answers1

1

Looks like the google url has changed.

Replace line #66 with

gurl = 'http://toolbarqueries.google.com/tbr?client=navclient-auto&ch=%s&features=Rank&q=info:%s' % (hsh,urllib.quote(URL))

works for me

Also, I am confused with what do you expect from this script. PageRank ranks website not search queries. If you want to see how high your website is on different google queries that's a different story and has little to do with PageRank. This script will tell you what's the pagerank of particular website, whatever the search query which will not tell you the relative position of your website for this particular query. These are different things.

matcheek
  • 4,887
  • 9
  • 42
  • 73
  • Ok.I updated it.! Btw I am confused where to give the URL for which I wanna get the rank!! Could you please help me? – Venkateshwaran Selvaraj Sep 21 '13 at 07:28
  • As a paramter: script_name.py PR example.com – matcheek Sep 21 '13 at 07:32
  • Yes. It worked. But how do I get the status of where my website stands in the Google search result page? – Venkateshwaran Selvaraj Sep 21 '13 at 10:42
  • That's very different from the question you posted. I suggest you post it as another question – matcheek Sep 21 '13 at 10:44
  • Sorry if I were unclear! But please do read my question again.! May be you got confused because I used this pagerank script – Venkateshwaran Selvaraj Sep 21 '13 at 10:53
  • Do you realize getting Pagerank to find out what position is your website on Google is a redundant step? Pagerank has got nothing to do with it. If you already have these result locally stored just parse them. That's all there is to find out what position is your website on Google. Use httplib or soap library, maybe xpath as well and look for the pattern... – matcheek Sep 21 '13 at 11:21
  • Search Results

– matcheek Sep 21 '13 at 11:21
  • Thanks matcheek. I got a way to rip through the page! Let me try it. Thanks for your effort – Venkateshwaran Selvaraj Sep 21 '13 at 12:02
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/37781/discussion-between-venky-and-matcheek) – Venkateshwaran Selvaraj Sep 21 '13 at 13:13