Search country domains using Google

Tweet about this on Twitter0Share on Facebook0Share on Google+0Share on LinkedIn0

Here is small research that I did two months ago to search country domains using Google for my country TLD, “.ba”. I already wrote about Getting http response headers with python which is basically result of script that will be shown here. Approach that I used is without using Google API, so I just used URL parameters to go through search results:

As you see, I was searching for “site:.ba”, 100 results per page and used start parameter to go through all search results. So here is that simple python3 script:

As I already said this is python3 script, so to run it you will need to have python3 installed. Also it can be executed from Windows or Linux and search results will be written to file “domains_google.txt” at same working directory where the script is. To run the script:

This means that script will go to 500 results. After each iteration of 100 results it will wait for 30 seconds to not spam google. I am not an python expert, so all suggestions are welcome.

Tweet about this on Twitter0Share on Facebook0Share on Google+0Share on LinkedIn0
Posted in Useful tips and tagged , , .

Alen Komljen

I'm a DevOps/Cloud engineer with experience that spans a broad portfolio of skills, including cloud computing, software deployment, process automation, shell scripting and configuration management, as well as Agile development and Scrum. This allowed me to excel in solving challenges in cloud computing, and the entire IT infrastructure along with my deep interest in OpenStack, Ceph, Docker and the open-source community.