Can I use Powershell on Windows to extract information from multiple Google searches? -
i have list of several hundred quoted phrases , 1 number google search each of these phrases. number need estimate of number of search results each phrase. (for example, "n" line "about n results (y seconds)"
ps: ask powershell because of comment on question use cmd prompt search word on google or other search engine user https://stackoverflow.com/users/1240980/timwagaman implied easy powershell. if there way without complications of powershell, please let me know. have never use powershell before.
something start with:
$useragent = 'mozilla/5.0 (windows nt 6.3; wow64) applewebkit/537.36 (khtml, gecko) chrome/33.0.1750.146 safari/537.36' $searchphrases = @("supercalifragilisticexpialidocious", "david") $searchphrases | %{ $searchlink = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=$_" $results = invoke-webrequest -uri $searchlink -useragent $useragent $json = $results.content | convertfrom-json write-host "searchphrase: $_ count: $($json.responsedata.cursor.resultcount)" }
Comments
Post a Comment