I am using Mario Vilas' Google search API that can be found on github here: https://github.com/MarioVilas/googlesearch
Now, During the search, I want to remove certain sites from showing up. I've read the docs and it seems like there is nothing that allows us to exclude certain domains. Is there any work around for this? If not, do you know any other google search APIs that might do the trick.
Here's my code:
keyword = input("Keyword: ")
country = input("Country:")
tld_of_country = domain_names[country]
for website in search(keyword, tld=tld_of_country, num=2,
stop=2, country="canada", pause=2):
try:
links.append(website)
except:
continue