Really cool��� and in few lines you get your own �� google �� powered search engine ;-).
Nevertheless this is a bit slow (5 seconds for one page, around 20s for the 5 from the script (I think this might be doable to speed things a bit).
searches := OrderedCollection new.
query := 'black friday' urlEncoded.
"chrome plugin"
browser := GoogleChrome new.
browser headless: true.
browser open.
page := browser firstTab.
0 to: 50 by: 10 do: [:paging |
result := page html.
dom := result parseHTML. "uses XMLHTMLParser"
searches addAll: (dom xpath: '//div[@class="g"]/div/div/div/a/@href').
].
searches size
"64".
searches first.