You're right, the issue is that if the search result is only one location, the response is not the search results page but the actual forecast page for that location.
To solve the problem and improve the approach I changed it a little.
The new version no longer uses the search box of the mobile site to get the data. Instead it's now using the autocomplete feature of the search box of the regular website. The benefits are that instead of handling complete websites, we are now retrieving only the relevant data as a json string. Which makes everything a little more robust and performs faster, because less data has to be transfered and parsed.
Have a look at the attached file weer_NEW.sbp.
If you want to have a look at what your browser is doing in the background, you can use the
web console feature in firefox for even more details you can use the
tamper data addon
EDIT:
I found another way to solve the problem, it's much closer to what you originally asked, because it allows you to enter text programmatically in to the search box. It only uses the webbrowser library and doesn't need the http lib.
It works by running some javascript in the browser.navigate() method.
It will prompt a script error when running it on the desktop, but not in the compiled version on the device.
For that example, have a look at weer_WB_only.sbp