Use internet search to obtain valuable data
From Impure Wiki
Let's take a specific look at a powerful technique for getting information from the Internet, which we call multi-search.
We are all used to conduction searches in search engines, such as Google. They return a list webpages with occurrences of the string you typed. But sometimes you want to obtain more information than is present on any single page, or you are not interested in a specific word or idea, but in the relations among a set of concepts.
Imagine you want to find out about the similarities and differences between Internet browsers - not a specific pair, but all of them. We would usually search for a web page posted by someone who has already invested the time and effort necessary to do the comparison. We need to be lucky. It is certainly much more likely that a lot of people would have done comparisons for specific pairs. If we could ask Google to return all the pages in which any two browser are compared, we would obtain very more valuable information. But, how to do that? It would be great if we could type something like this:
“[browser_name] compared with [browser_name]"
or:
“[browser_name] is faster than [browser_name]”
You could also search for all the possible combinations. With 5 browsers it is not a huge task (only 20 possible pairs of different browsers)
- “safari is faster than firefox”
- “safari is faster than chrome”
- “safari is faster than explorer”
- “safari is faster than opera”
- “firefox is faster than safari”
- “firefox is faster than chrome”
- “firefox is faster than explorer”
- “firefox is faster than opera”
- “chrome is faster than safari”
- “chrome is faster than firefox”
- “chrome is faster than explorer”
- “chrome is faster than opera”
- “explorer is faster than safari”
- “explorer is faster than firefox”
- “explorer is faster than chrome”
- “explorer is faster than opera”
- “opera is faster than safari”
- “opera is faster than firefox”
- “opera is faster than chrome”
- “opera is faster than explorer”
But you have to perform the searches one by one, then copy all the results. What if you want to compare 50 car models? That would be 2450 different search operations.
Well, you can do that automatically within Impure. First you load or type the list of browsers. Then you combine this List, creating a table with two Lists that contains all possible combinations of pairs. After that, you just need to build the search queries: add "compared to" to the first List (addition operation), and then add the second List. Finally, use the operator again to add quotation marks at the end and the beginning. After that, you should have a StringList with all the possible queries that follow the pattern: “[browser_name] is faster than [browser_name]”
Quotation marks are important because they guarantee the search will be strict, meaning Google will only return pages in which the complete sentences are found. Once your StringList is ready, just connect it to InternetMultiNSearchResults. Just watch as the module performs the searches one after another, and populates a NumberList with the amount of results for each of them.
This wonderful cartoon by http://xkcd.com depicts some of the questions it is possible to ask by following the method we just described:
