| | |
Google Results and Python
![]() |
•
•
Join Date: Jan 2009
Posts: 8
Reputation:
Solved Threads: 0
Question about gathering search results for a phrase with Python. I wrote a simple script for my personal SEO purposes that would go out and collect the top 30 search results on Google and then return a list of those URL's. The trouble is everytime I try to run my script Google starts returning an error about the search not being allowed. The URL I'm using works fine if entered manually but Google seems to know I'm trying to get access through a script. Is there a way around this or an API that I should be using? My searches into the subject haven't given me much.
•
•
Join Date: Nov 2007
Posts: 140
Reputation:
Solved Threads: 29
Google does not allow searches from any devices that does not provide a commonly used agent string. When you gather data using python the agent string is something like "python 2.6". Google doesn't allow that because they don't want people using scripts to gather their search results.
The answer is to spoof your agent string. I recently wrote up a script that does something similar to what you're trying to do. I wrote a blog entry about it and included sample code that you might want to check out.
http://blackfistsecurity.blogspot.co...king-with.html
The answer is to spoof your agent string. I recently wrote up a script that does something similar to what you're trying to do. I wrote a blog entry about it and included sample code that you might want to check out.
http://blackfistsecurity.blogspot.co...king-with.html
![]() |
Similar Threads
- adding list items (Python)
- Using mechanize to do website authentication (Python)
- RE:playing media files in python (Python)
- The "Did you mean" feature (Python)
- python + web (Python)
- please help me... (Python)
- It has been over 45 days since googlebot visited my site, what shoudl I do? (Search Engine Optimization)
- Sorting in Python (Python)
Other Threads in the Python Forum
- Previous Thread: pygame window not werking
- Next Thread: query inside a webpage with Python
| Thread Tools | Search this Thread |
abrupt ansi anti apache approximation array assignment avogadro backend beginner binary bluetooth book builtin calculator character code converter countpasswordentry curved customdialog dan08 dictionaries dictionary dynamic examples exe file float format function gnu graphics gui heads homework ideas import inches input java launcher library line lines linux list lists loop mouse mysqlquery number numbers numeric output parsing path phonebook plugin pointer port prime programming progressbar projects py2exe pygame python random recursion redirect scrolledtext software statictext statistics string strings sum table terminal text textarea thread threading time tlapse trick tricks tuple tutorial twoup ubuntu unicode urllib urllib2 variable wordgame write wxpython xlib





