"minus" sign doesn't fit because the list consists of ~2000 entries. I'm just beginner in python, so, please explain as to 5-year old, if possible Thank you much in advance!
1 Answers
Presumably you are fetching the Google search results from a Python program. So you can exclude the web pages in your list in your Python program as you read the results, instead of trying to make Google do it for you. You can use a functional programming technique like calling filter
for this.
Ideally you would do this by comparing the URLs of the links, but if you were willing to sacrifice accuracy you could do it by comparing the titles of the links instead, if you only had titles in your list and not URLs. But URLs are definitely better for this purpose.
So you could parse the Google search results using a library like Beautiful Soup, extract the URLs of the links, and filter out (using filter
) the ones that were equal to any of the URLs on your list (you could define a function using def
, for checking whether a given URL is on your list). You'll have to be careful though because sometimes Google search result links go via a Google website which redirects to the real URL, for ranking purposes.

- 32,079
- 16
- 104
- 187