| | |
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: 117
Reputation:
Solved Threads: 21
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 |
alarm ansi anydbm app assignment backend beginner binary bluetooth character cipher cmd coordinates customdialog cx-freeze data decimals development directory dynamic exe feet file float format function generator getvalue gnu graphics halp handling heads homework http ideas input ip itunes java keycontrol leftmouse line linux list lists loop maintain maze millimeter module mouse number numbers output parsing path pointer prime programming progressbar push py2exe pygame pymailer python queue random recursion recursive schedule screensaverloopinactive script slicenotation sqlite ssh statistics string strings sudokusolver text thread time tlapse tuple ubuntu unicode url urllib urllib2 variable ventrilo vigenere web webservice wikipedia write wxpython xlib xlwt





