検索でポイント

ずっと忘れてたので設定しました。Googleのトレンドワードが1回に20個しか取れないので上限の30までやるにはこのバッチを1日2回走らせる必要があります。AM,PM8時で様子見中。

@set args=%*
@powershell "iex*1-join[char]10)"
@exit /b %ERRORLEVEL%

 

[xml]$Response = Invoke-WebRequest -Uri "https://trends.google.co.jp/trends/hottrends/atom/hourly"

 

ForEach ($msg in $Response.rss.channel.item){start microsoft-edge:"https://www.bing.com/search?q=$($msg.title.Replace(" ", "+"))" -WindowStyle Minimized; Start-Sleep -s 10; start microsoft-edge:"https://websearch.rakuten.co.jp/Web?qt=$($msg.title.Replace(" ", "+"))&query=$($msg.title.Replace(" ", "+"))&ref=top&col=OW&svx=101210&x=0&y=0&sg=1&hs=1" -WindowStyle Minimized; Start-Sleep -s 10}

 

Stop-Process -Name msedge

 

楽天Microsoft以外にもあったっけ?

 

*1:@('')*3+(cat '%~f0'|select -skip 3