0

Open browser and enter some text through python

I want to open chrome browser and add some text on google search automatically with the python script

6th Nov 2017, 3:26 PM
Narendra
2 odpowiedzi
+ 8
You might consider either using the Google Search API or simply opening a URL with added keywords (make some string concatenations to complete the lengthy URL). Bear in mind, though that too much automation in it might be considered webscraping and Google is really sensitive about it.
6th Nov 2017, 9:19 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
If you just want the browser to open a page, exec a subprocess and send the URL as a parameter. That's nearly the same as what your linked solutions are doing. If you want keyboard buffer control, it depends on the OS. Windows uses SendKeys and docs are trivial to find. But, if you aren't​ using Windows-aware Python imports you'll have to learn the Windows API and that is not trivial. That link is broken and definitely should not be a keyword.
6th Nov 2017, 4:48 PM
Kirk Schafer
Kirk Schafer - avatar