I looked into this question which asked how a bot could input text on a webpage. One of the answers recommended using Selenium, but a comment there suggested using it was an inefficient way of accomplishing that task.
Say I wanted to create a bot that looks up a set of words on Wikipedia (using the search bar on Wikipedia) and gives me the first 20 words in each article. Would Selenium be the best tool for this?
(Note that I'm aware I could do this manually by just looking up https://en.wikipedia.org/wiki/<word I want> for each item in the list, but I'm specifically looking for how a bot would interact with search bars.)