Getting Company URL from a list of Company Names using python
I have a list of company names in my excel sheet, and I want to get the corresponding website URL. After trying hard using WEBSERVICES and FILTERXML using excel VBA, I didn't get much of a result. I then switched to Python, for better results. Turns out there is a library called googlesearch which helps achieve the same. I am providing the steps below: Save the list of companies in a text file. Here is the code that achieves the task from googlesearch import search file = open ( "your_file_name.txt" , "r" ) links = file. read (). split ( ' \n ' ) #print(links) with open ( "yourfilenamewithlinks.txt" , "w" ) as f: for query in links: print (query) for results in search (query, tld = "co.in" , num = 1 , start = 1 , stop = 1 , pause = 10 ): f. write (query) f. write ( "," ) ...