Let's say http://www.foo.bar/?domain=wibble
returns a search page on the word "wibble" provided by an engine with the frontdoor address www.foo.bar
, and you have a variable called searchvar
that you want to search on.
You can assign the resulting search page to variable searchresult
like this:
searchresult = Import[StringJoin[{"http://www.foo.bar/?domain=", searchvar}], "HTML"];
And then you can look in searchresult for whatever it is that you are trying to find.
I am trying to do this to find whether a given string has been registered as a Twitter username.
When you browse to, say, https://twitter.com/aosododof
, you get a page that contains the words "This account doesn't exist", and then you can go ahead and register that name if you wish.
However, although the words "This account doesn't exist" are on my screen I am not seeing them in the source for the page, and therefore they are not being returned to Import[]
.
So my question is: how can I use Import[]
to grab the text from a page such as https://twitter.com/aosododof
that includes the words "doesn't exist" so that I can then log that name as available?
I have a few thousand that I would like to look up, so this needs to be automated.