[如何在Google上搜索用户输入的内容并在浏览器中打开它而没有错误? [关闭]

问题描述 投票:-2回答:2

想制作一个python代码,这样,如果用户在IDE中输入搜索词,就应该将用户带到google网站。

python python-requests
2个回答
-1
投票
import webbrowser

url = 'https://www.google.com/search?q='   #Search Query Url 

search_words = input("Search your words")   # User inputs data as per search requirements

webbrowser.open(url+search_words)          # Opens the webbrowser

2
投票

尝试:

© www.soinside.com 2019 - 2024. All rights reserved.