so i was thinking of making an basic application to take inputs of a word and return say the first five synonyms
and antonyms
. I want to use Google to make the searches, now without opening the browser i want to print the results with in my terminal. How can i do this?
CodePudding user response:
You may use the selenium framework to automate interactions with a (headless) web-brower. There is plenty of examples and tutorials on how to do this, either on SO (How to make Firefox headless programmatically in Selenium with Python?) or https://realpython.com/modern-web-automation-with-python-and-selenium/
CodePudding user response:
If you can find a synonym/antonym service that you can interact with via plain get you could use something like curl (or wget) to make a call to this service.
A basic search rendered a few options.